/* Proctor RL. One continuous dark canvas: type, imagery and soft glows sit
   directly on the page. Cut-corner frames are kept for three signature
   pieces only: the hero headline, the worked example and the process
   timeline. No external resources: system fonts, inline SVG and CSS. */

/* ---------- Tokens ---------- */

:root {
  color-scheme: dark;

  --bg: #08070c;
  --text: #f5f3fa;
  --text-2: #bcb6ca;
  --text-3: #938da4;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);

  --amber: #ffb547;
  --rose: #ff5c8a;
  --magenta: #e04ff0;
  --violet: #a78bfa;
  --cyan: #6ee7f2;
  --cta: linear-gradient(100deg, var(--amber) 0%, #ff8a6a 48%, var(--rose) 100%);

  --maxw: 75rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --header-h: 4.5rem;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI Variable Display", "Segoe UI", Inter, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- Base ---------- */

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

/* The page colour lives on the root only, so section glows (z-index: -1)
   paint above it. */
html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  overflow-x: hidden;
  overflow-x: clip;
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* A whisper of grain, so the dark gradients don't band. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h1,
h2 {
  text-wrap: balance;
}

p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

p {
  text-wrap: pretty;
}

img,
video,
svg {
  display: block;
}

a {
  color: var(--text);
  text-decoration-color: rgba(255, 92, 138, 0.7);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-color: var(--amber);
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 0.1em 0.38em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #ece8f5;
  overflow-wrap: anywhere;
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  padding: 0.65rem 1.1rem;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-250%);
}

.skip-link:focus {
  transform: none;
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: clamp(4rem, 8vw, 7.5rem);
}

.section-tight {
  padding-block: clamp(3rem, 6vw, 5.5rem);
}

.section h2 {
  font-size: clamp(2rem, 1.15rem + 2.3vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
}

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

.lede {
  margin-top: 1.25rem;
  color: var(--text-2);
  font-size: clamp(1.08rem, 1rem + 0.3vw, 1.2rem);
  line-height: 1.6;
}

.group-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.group-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-2), transparent 80%);
}

.eyebrow,
.lbl {
  color: #e9a8f7;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* Finding-type and status labels: coloured mono text with a small dot. */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--k, var(--text-2));
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.tag::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.tag[data-kind="exploit"] { --k: #ff7d9f; }
.tag[data-kind="lenient"] { --k: #ffc46b; }
.tag[data-kind="shortcut"] { --k: #a3b2ff; }
.tag[data-kind="rejects"] { --k: #c9aaff; }
.tag[data-kind="nonrepro"] { --k: #b8b2c6; }
.tag[data-kind="channel"],
.tag[data-kind="proof"] { --k: var(--cyan); }

/* ---------- Buttons: cut corners at top left and bottom right ---------- */

.btn {
  --cut: 10px;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.75rem;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.97rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

/* The shape lives on a pseudo-element, so the focus outline isn't clipped. */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: filter 0.2s ease, background-color 0.2s ease;
}

.btn-primary {
  color: #1d0b14;
}

.btn-primary::before {
  background: var(--cta);
}

.btn-primary:hover::before {
  filter: brightness(1.08) saturate(1.08);
}

.btn-glass::before {
  --edge: rgba(255, 255, 255, 0.2);
  --diag: transparent calc(50% - 1.2px), var(--edge) calc(50% - 1.2px) 50%, transparent 50%;
  border: 1px solid var(--edge);
  background:
    linear-gradient(to top left, var(--diag)) left top / var(--cut) var(--cut) no-repeat border-box,
    linear-gradient(to bottom right, var(--diag)) right bottom / var(--cut) var(--cut) no-repeat border-box,
    rgba(255, 255, 255, 0.045);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.btn-glass:hover::before {
  --edge: rgba(255, 255, 255, 0.34);
  background-color: rgba(255, 255, 255, 0.08);
}

.btn-sm {
  --cut: 8px;
  min-height: 2.5rem;
  padding: 0 1.2rem;
  font-size: 0.9rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(8, 7, 12, 0.74);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  justify-self: start;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.site-nav ul {
  display: flex;
  gap: clamp(1.25rem, 2.4vw, 2.4rem);
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--text-2);
  font-size: 0.94rem;
  text-decoration: none;
}

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

.header-actions {
  display: flex;
  justify-self: end;
  gap: 0.7rem;
}

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

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  overflow: hidden;
  overflow: clip;
  /* About 16:9 on desktop, so the full-bleed film is barely cropped and the
     brain stays on the right (it spans x 47-89% of the frame). */
  min-height: max(36rem, min(calc(100vh - var(--header-h)), 56.25vw));
  min-height: max(36rem, min(calc(100svh - var(--header-h)), 56.25vw));
  padding-block: clamp(2.5rem, 5vw, 4rem) 7rem;
}

/* Full-bleed: a full-width 16:9 film, centred and clipped by the hero.
   Shorter heroes crop its faded top and bottom (as cover would); taller
   ones show the page above and below it, which is the same #08070c, so the
   sides never crop and the brain stays at x 47-89%. */
.hero-film {
  position: absolute;
  z-index: -4;
  top: 50%;
  left: 0;
  right: 0;
  aspect-ratio: 16 / 9;
  transform: translateY(-50%);
}

@supports not (aspect-ratio: 1) {
  .hero-film {
    height: 56.25vw;
  }
}

.hero-film > img,
.hero-film > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The bottom of the hero dissolves into the page, glows included. Layers,
   back to front: film, glows, this fade, the circuit trace, the copy. */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -2;
  height: 28%;
  background: linear-gradient(180deg, rgba(8, 7, 12, 0), var(--bg) 92%);
  pointer-events: none;
}

/* Never show native media chrome over the art. */
.hero-video::-webkit-media-controls,
.hero-video::-webkit-media-controls-start-playback-button,
.hero-video::-webkit-media-controls-overlay-play-button {
  display: none !important;
  -webkit-appearance: none;
}

.film-held .hero-video {
  visibility: hidden;
}

.hero-glow {
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(34% 46% at 16% 42%, rgba(124, 58, 237, 0.17), transparent 72%),
    radial-gradient(26% 34% at 34% 88%, rgba(224, 79, 240, 0.1), transparent 70%),
    radial-gradient(30% 30% at 4% 6%, rgba(99, 102, 241, 0.12), transparent 70%);
}

.hero-inner {
  position: relative;
}

.hero-copy {
  max-width: min(38rem, 47vw);
}

.hero-panel {
  position: relative;
  isolation: isolate;
  width: fit-content;
  max-width: 100%;
  /* The headline's size, set here so the panel's shape, drawn in em,
     scales with it. Sized so the panel always ends left of the brain
     (about 45% of the width): narrow screens grow with the viewport,
     wide ones with the centred column. */
  font-size: clamp(2.4rem, min(5.77vw - 10.3px, 74.2px - 0.7vw), 4rem);
  padding: clamp(1.3rem, 2.3vw, 2.1rem) 1.05em clamp(1.4rem, 2.5vw, 2.3rem) 1.5rem;
}

/* Glass in the panel's shape: chamfered left corners, a rounded top right
   that steps out at 45 degrees into a tab, and a shelf under the tab that
   cuts back down to the bottom. The polygons are generated (hero_shape.py
   in the film project): ::before is the glass, ::after a 1px outline ring
   (the outline, then the same outline inset by 1px, evenodd). */
.hero-panel::before,
.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero-panel::before {
  clip-path: polygon(0 0.4831em, 0.0061em 0.4525em, 0.0234em 0.4266em, 0.4266em 0.0234em, 0.4525em 0.0061em, 0.4831em 0, calc(100% - 1.0500em) 0, calc(100% - 0.9735em) 0.0152em, calc(100% - 0.9086em) 0.0586em, calc(100% - 0.8652em) 0.1235em, calc(100% - 0.8500em) 0.2000em, calc(100% - 0.8500em) 0.6669em, calc(100% - 0.8439em) 0.6975em, calc(100% - 0.8266em) 0.7234em, calc(100% - 0.0234em) 1.5266em, calc(100% - 0.0061em) 1.5525em, 100% 1.5831em, 100% calc(100% - 1.1500em), calc(100% - 0.0152em) calc(100% - 1.0735em), calc(100% - 0.0586em) calc(100% - 1.0086em), calc(100% - 0.1235em) calc(100% - 0.9652em), calc(100% - 0.2000em) calc(100% - 0.9500em), calc(100% - 1.5169em) calc(100% - 0.9500em), calc(100% - 1.5475em) calc(100% - 0.9439em), calc(100% - 1.5734em) calc(100% - 0.9266em), calc(100% - 2.4766em) calc(100% - 0.0234em), calc(100% - 2.5025em) calc(100% - 0.0061em), calc(100% - 2.5331em) 100%, 0.4831em 100%, 0.4525em calc(100% - 0.0061em), 0.4266em calc(100% - 0.0234em), 0.0234em calc(100% - 0.4266em), 0.0061em calc(100% - 0.4525em), 0 calc(100% - 0.4831em));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02) 55%, rgba(255, 255, 255, 0.035)),
    rgba(18, 13, 26, 0.55);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
}

.hero-panel::after {
  clip-path: polygon(evenodd, 0 0.4831em, 0.0061em 0.4525em, 0.0234em 0.4266em, 0.4266em 0.0234em, 0.4525em 0.0061em, 0.4831em 0, calc(100% - 1.0500em) 0, calc(100% - 0.9735em) 0.0152em, calc(100% - 0.9086em) 0.0586em, calc(100% - 0.8652em) 0.1235em, calc(100% - 0.8500em) 0.2000em, calc(100% - 0.8500em) 0.6669em, calc(100% - 0.8439em) 0.6975em, calc(100% - 0.8266em) 0.7234em, calc(100% - 0.0234em) 1.5266em, calc(100% - 0.0061em) 1.5525em, 100% 1.5831em, 100% calc(100% - 1.1500em), calc(100% - 0.0152em) calc(100% - 1.0735em), calc(100% - 0.0586em) calc(100% - 1.0086em), calc(100% - 0.1235em) calc(100% - 0.9652em), calc(100% - 0.2000em) calc(100% - 0.9500em), calc(100% - 1.5169em) calc(100% - 0.9500em), calc(100% - 1.5475em) calc(100% - 0.9439em), calc(100% - 1.5734em) calc(100% - 0.9266em), calc(100% - 2.4766em) calc(100% - 0.0234em), calc(100% - 2.5025em) calc(100% - 0.0061em), calc(100% - 2.5331em) 100%, 0.4831em 100%, 0.4525em calc(100% - 0.0061em), 0.4266em calc(100% - 0.0234em), 0.0234em calc(100% - 0.4266em), 0.0061em calc(100% - 0.4525em), 0 calc(100% - 0.4831em), 0 0.4831em, 1.000px 0.4831em, 1.000px 0.4831em, calc(0.0061em + 0.924px) calc(0.4525em + 0.383px), calc(0.0234em + 0.707px) calc(0.4266em + 0.707px), calc(0.4266em + 0.707px) calc(0.0234em + 0.707px), calc(0.4525em + 0.383px) calc(0.0061em + 0.924px), 0.4831em 1.000px, calc(100% - 1.0500em) 1.000px, calc(100% - 0.9735em - 0.383px) calc(0.0152em + 0.924px), calc(100% - 0.9086em - 0.707px) calc(0.0586em + 0.707px), calc(100% - 0.8652em - 0.924px) calc(0.1235em + 0.383px), calc(100% - 0.8500em - 1.000px) 0.2000em, calc(100% - 0.8500em - 1.000px) 0.6669em, calc(100% - 0.8439em - 0.924px) calc(0.6975em + 0.383px), calc(100% - 0.8266em - 0.707px) calc(0.7234em + 0.707px), calc(100% - 0.0234em - 0.707px) calc(1.5266em + 0.707px), calc(100% - 0.0061em - 0.924px) calc(1.5525em + 0.383px), calc(100% - 1.000px) 1.5831em, calc(100% - 1.000px) calc(100% - 1.1500em), calc(100% - 0.0152em - 0.924px) calc(100% - 1.0735em - 0.383px), calc(100% - 0.0586em - 0.707px) calc(100% - 1.0086em - 0.707px), calc(100% - 0.1235em - 0.383px) calc(100% - 0.9652em - 0.924px), calc(100% - 0.2000em) calc(100% - 0.9500em - 1.000px), calc(100% - 1.5169em) calc(100% - 0.9500em - 1.000px), calc(100% - 1.5475em - 0.383px) calc(100% - 0.9439em - 0.924px), calc(100% - 1.5734em - 0.707px) calc(100% - 0.9266em - 0.707px), calc(100% - 2.4766em - 0.707px) calc(100% - 0.0234em - 0.707px), calc(100% - 2.5025em - 0.383px) calc(100% - 0.0061em - 0.924px), calc(100% - 2.5331em) calc(100% - 1.000px), 0.4831em calc(100% - 1.000px), calc(0.4525em + 0.383px) calc(100% - 0.0061em - 0.924px), calc(0.4266em + 0.707px) calc(100% - 0.0234em - 0.707px), calc(0.0234em + 0.707px) calc(100% - 0.4266em - 0.707px), calc(0.0061em + 0.924px) calc(100% - 0.4525em - 0.383px), 1.000px calc(100% - 0.4831em), 1.000px 0.4831em);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.12) 45%, rgba(255, 255, 255, 0.1) 75%, rgba(255, 255, 255, 0.2));
}

.hero h1 {
  max-width: 6.9em;
  font-size: 1em;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-sub {
  max-width: min(33rem, 40vw);
  margin-top: 2rem;
  padding-left: 1.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
  color: var(--text-2);
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.18rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
  padding-left: 1.5rem;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 0.55rem 2rem;
  margin-top: 2.25rem;
  padding: 0 0 0 1.5rem;
  list-style: none;
  color: var(--text-3);
  font-size: 0.9rem;
}

.hero-facts li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hero-facts li::before {
  content: "";
  flex: none;
  width: 0.36rem;
  height: 0.62rem;
  margin: -0.2rem 0.1rem 0 0.1rem;
  border: solid var(--amber);
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(45deg);
}

/* The circuit trace along the bottom of the hero. */
.hero-trace {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 1.25rem;
  overflow: visible;
  fill: none;
  pointer-events: none;
}

.trace-rail {
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 1;
}

.trace-dash {
  stroke: var(--magenta);
  stroke-width: 1.4;
  stroke-dasharray: 5 4;
  filter: drop-shadow(0 0 3px rgba(224, 79, 240, 0.75));
}

.film-toggle {
  position: absolute;
  z-index: 2;
  /* Seated on the circuit trace, like a node on it. */
  right: max(var(--gutter), calc((100% - var(--maxw)) / 2));
  bottom: calc(1.25rem + 46px - 1.25rem);
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.6rem;
  background: rgba(14, 11, 20, 0.92);
  color: var(--text-2);
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.film-toggle:hover {
  border-color: rgba(255, 255, 255, 0.32);
  color: var(--text);
}

/* No visible button on the hero (a design call). It shows only when a
   keyboard user tabs to it, like a skip link, so the film can still be
   paused (WCAG 2.2.2); screen readers still find it. */
.film-toggle:not(:focus-visible) {
  opacity: 0;
  pointer-events: none;
}

.film-toggle {
  transition: opacity 0.2s ease;
}

.film-toggle[hidden] {
  display: none;
}

.film-toggle svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.film-toggle .i-play {
  display: none;
  fill: currentColor;
  stroke: none;
}

.film-toggle[aria-pressed="true"] .i-pause {
  display: none;
}

.film-toggle[aria-pressed="true"] .i-play {
  display: block;
}

/* ---------- Supported frameworks: one quiet line ---------- */

.strip {
  padding-block: 1rem clamp(1rem, 3vw, 2rem);
}

.strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.6rem 1.75rem;
  text-align: center;
}

.strip-label {
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.strip-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 0;
  padding: 0;
  list-style: none;
  color: var(--text-2);
  font-size: 0.97rem;
}

.strip-list li {
  position: relative;
}

.strip-list li + li {
  padding-left: 2.25rem;
}

.strip-list li + li::before {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(1.125rem - 2px);
  width: 4px;
  height: 4px;
  margin-top: -2px;
  border-radius: 50%;
  background: var(--rose);
  opacity: 0.85;
}

.strip-list code {
  padding: 0;
  background: none;
  font-size: 0.92em;
}

/* ---------- Two-column sections with art ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
}

.feature-flip .art {
  order: 2;
}

.feature-copy {
  max-width: 33rem;
}

.feature-copy > p + p {
  margin-top: 1rem;
}

.feature-copy > p:not(.lede) {
  color: var(--text-2);
}

.feature-copy > .lede + p {
  margin-top: 1.1rem;
}

.feature-copy > .btn {
  margin-top: 2.25rem;
}

/* Art floats on the page: lighten drops its near-black ground, and the mask
   feathers what's left, so no square edge shows. */
.art {
  position: relative;
  justify-self: center;
  width: min(100%, 33rem);
}

.art::before {
  content: "";
  position: absolute;
  inset: 4%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(99, 102, 241, 0.2), rgba(124, 58, 237, 0.07) 60%, transparent 100%);
  pointer-events: none;
}

.art img {
  width: 100%;
  height: auto;
  mix-blend-mode: lighten;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent), linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent), linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
  mask-composite: intersect;
}

/* ---------- Who it's for ---------- */

.audience-title {
  max-width: 21em;
}

.audience {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem clamp(1.5rem, 4vw, 4rem);
  margin-top: clamp(2rem, 4vw, 3rem);
  padding: 0;
  list-style: none;
}

.audience h3 {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 1.2rem;
  letter-spacing: -0.015em;
}

.audience h3::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 10px rgba(255, 92, 138, 0.65);
  transform: translateY(-0.15em);
}

.audience p {
  margin-top: 0.6rem;
  padding-left: calc(7px + 0.75rem);
  color: var(--text-2);
}

/* ---------- What we find ---------- */

#findings::before,
#deliverables::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(34% 40% at 88% 30%, rgba(99, 102, 241, 0.07), transparent 72%);
}

#deliverables::before {
  background: radial-gradient(36% 46% at 8% 60%, rgba(139, 92, 246, 0.07), transparent 72%);
}

.finds {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.75rem clamp(1.5rem, 3.5vw, 3.5rem);
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.finds + .group-label {
  margin-top: clamp(3.5rem, 6vw, 5rem);
}

.find {
  display: flex;
  flex-direction: column;
}

.find .tag {
  order: -1;
  margin-bottom: 0.7rem;
}

.find h4 {
  font-size: 1.2rem;
  letter-spacing: -0.015em;
}

.find p:not(.tag) {
  margin-top: 0.55rem;
  color: var(--text-2);
  font-size: 1rem;
}

.find .eg {
  margin-top: 0.85rem;
}

.find .eg code {
  font-size: 0.82rem;
}

/* ---------- Worked example: the framed showcase ---------- */

.example::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42% 44% at 72% 40%, rgba(186, 64, 230, 0.13), transparent 72%),
    radial-gradient(36% 40% at 20% 70%, rgba(99, 102, 241, 0.1), transparent 72%);
}

.showcase {
  position: relative;
  isolation: isolate;
  padding: clamp(1.75rem, 4.5vw, 4.25rem);
}

.showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  --edge: rgba(255, 255, 255, 0.11);
  --diag: transparent calc(50% - 1.2px), var(--edge) calc(50% - 1.2px) 50%, transparent 50%;
  --tl: 14px;
  --tr: 64px;
  --br: 14px;
  --bl: 64px;
  border: 1px solid var(--edge);
  clip-path: polygon(0 var(--tl), var(--tl) 0, calc(100% - var(--tr)) 0, 100% var(--tr), 100% calc(100% - var(--br)), calc(100% - var(--br)) 100%, var(--bl) 100%, 0 calc(100% - var(--bl)));
  background:
    linear-gradient(to top left, var(--diag)) left top / var(--tl) var(--tl) no-repeat border-box,
    linear-gradient(to top right, var(--diag)) right top / var(--tr) var(--tr) no-repeat border-box,
    linear-gradient(to bottom right, var(--diag)) right bottom / var(--br) var(--br) no-repeat border-box,
    linear-gradient(to bottom left, var(--diag)) left bottom / var(--bl) var(--bl) no-repeat border-box,
    radial-gradient(60% 80% at 90% 0%, rgba(224, 79, 240, 0.15), transparent 70%),
    radial-gradient(55% 75% at 0% 100%, rgba(99, 102, 241, 0.12), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(165deg, rgba(32, 15, 37, 0.94), rgba(13, 9, 19, 0.94));
}

/* The offset dashed outline, at two corners. */
.showcase-dash {
  position: absolute;
  z-index: -1;
  overflow: visible;
  fill: none;
  stroke: var(--magenta);
  stroke-width: 1.2;
  stroke-dasharray: 4 4;
  filter: drop-shadow(0 0 3px rgba(224, 79, 240, 0.7));
  pointer-events: none;
}

.showcase-dash-tr {
  top: -16.5px;
  right: -16.5px;
}

.showcase-dash-bl {
  bottom: -16.5px;
  left: -16.5px;
  max-width: calc(100% + 16.5px);
}

.showcase-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 5vw, 4.5rem);
}

.showcase .eyebrow {
  margin-bottom: 1rem;
}

.showcase-intro {
  max-width: 38rem;
}

.finding-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.25rem;
  margin-top: 2rem;
}

.finding-head h3 {
  font-size: 1.3rem;
  letter-spacing: -0.015em;
}

.finding-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
}

.finding-task {
  margin-top: 1rem;
  color: var(--text);
}

.finding-task .lbl {
  margin-right: 0.6rem;
}

.finding-verdict {
  margin-top: 1rem;
  color: var(--text-2);
}

.showcase-trace {
  align-self: center;
  overflow-x: auto;
}

/* Separate borders with no spacing: collapsed translucent borders can
   double-paint into brighter segments. */
.trace,
.board {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
}

.trace th,
.trace td,
.board th,
.board td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: baseline;
}

.trace th:first-child,
.board th:first-child {
  padding-left: 0;
}

.trace th:last-child,
.trace td:last-child,
.board th:last-child,
.board td:last-child {
  padding-right: 0;
  text-align: right;
  white-space: nowrap;
}

.trace thead th,
.board thead th {
  padding-top: 0;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.trace tbody th {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

.trace code {
  padding: 0;
  background: none;
  font-size: 0.86rem;
}

.trace-note {
  display: inline-block;
  margin-left: 0.35rem;
  color: #ff9ab4;
  font-size: 0.82rem;
}

.trace tr.is-evidence > * {
  background: rgba(255, 92, 138, 0.075);
}

.trace tr.is-evidence th {
  box-shadow: inset 2px 0 0 var(--rose);
  padding-left: 0.75rem;
}

.rw {
  font-family: var(--mono);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.rw small {
  margin-left: 0.3rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rw-pass {
  color: var(--cyan);
}

.rw-fail {
  color: #ff7d9f;
}

.showcase-fix,
.showcase-retest {
  padding-top: clamp(2rem, 3.5vw, 2.75rem);
  border-top: 1px solid var(--line);
}

.showcase-fix > p:not(.diff-cap) {
  margin-top: 0.75rem;
  color: var(--text);
}

.diff {
  margin: 1.4rem 0 0;
  padding: 0.15rem 0 0.15rem 1.1rem;
  overflow-x: auto;
  border-left: 1px solid rgba(224, 79, 240, 0.5);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.7;
}

.diff-cap {
  margin-top: 0.85rem;
  color: var(--text-3);
  font-size: 0.85rem;
}

.diff code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

.c-com { color: var(--text-3); }
.c-del { color: #ff9ab4; }
.c-add { color: #8deff6; }

.board {
  margin-top: 1rem;
}

.board tbody th {
  color: var(--text);
  font-weight: 500;
}

.board-kind {
  display: inline-block;
  min-width: 4.75rem;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.board-sub {
  margin-left: 0.5rem;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: none;
}

.board-delta {
  display: block;
  margin: 0.2rem 0 0 4.75rem;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.verdict {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.verdict[data-v="fixed"] { color: var(--cyan); }
.verdict[data-v="ok"] { color: var(--text-2); }

.board-note {
  margin-top: 1rem;
  color: var(--text-3);
  font-size: 0.9rem;
}

.showcase-cap {
  margin-top: clamp(2rem, 4vw, 3rem);
  color: var(--text-3);
  font-size: 0.9rem;
}

/* ---------- Reward gaps: one open number ---------- */

.gaps {
  text-align: center;
}

.gaps::before {
  content: "";
  position: absolute;
  inset: -10% 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(40% 50% at 50% 55%, rgba(139, 92, 246, 0.1), transparent 72%);
}

.section .bench-title {
  font-size: clamp(1.5rem, 1.15rem + 1.1vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.gaps-lede {
  max-width: 40rem;
  margin: 1rem auto 0;
  color: var(--text-2);
}

.stat-lead {
  max-width: 36rem;
  margin: clamp(2.5rem, 4.5vw, 3.5rem) auto 0;
}

.stat-lead .stat-num {
  font-size: clamp(4.25rem, 2.5rem + 5.5vw, 7.5rem);
}

.stat-lead .stat-label {
  max-width: 31rem;
  font-size: 1.08rem;
}

.stat-num {
  color: #fff;
  font-size: clamp(3rem, 1.5rem + 4vw, 5.25rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
  line-height: 1;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .stat-num {
    background: linear-gradient(180deg, #ffffff 35%, #c4b5fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.stat-label {
  max-width: 18rem;
  margin: 0.9rem auto 0;
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.5;
}

/* ---------- How we prove it: a list with a progress rule ---------- */

.method-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
}

.method-copy {
  max-width: 38rem;
}

.steps {
  position: relative;
  margin-top: clamp(2rem, 4vw, 2.75rem);
  padding-left: 1.75rem;
}

.steps::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 0;
  width: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.step {
  position: relative;
}

.step > summary {
  padding: 0.8rem 0;
  list-style: none;
  cursor: pointer;
}

.step > summary::-webkit-details-marker {
  display: none;
}

.step > summary h3 {
  color: var(--text-3);
  font-size: clamp(1.3rem, 1rem + 1vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  transition: color 0.2s ease;
}

.step > summary:hover h3 {
  color: var(--text-2);
}

.step[open] > summary h3 {
  color: var(--text);
  font-weight: 700;
}

.step[open]::before {
  content: "";
  position: absolute;
  top: 0.8rem;
  bottom: 0.9rem;
  left: -1.75rem;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--amber), var(--rose));
  box-shadow: 0 0 12px rgba(255, 92, 138, 0.55);
}

.step-body {
  max-width: 35rem;
  padding: 0.1rem 0 1.4rem;
  color: var(--text-2);
}

.step-body p + p {
  margin-top: 0.85rem;
}

/* The diagram beside the list explains the open step. The five panels
   share one grid cell and crossfade; motion.js marks the open step's panel
   .is-active, and the section .is-live once it's on screen, which plays
   the panel's build. Without JavaScript, or with reduced motion, each
   panel shows its finished state. Under 900px motion.js moves each panel
   into its own step, under the text. */
.viz-sprite {
  position: absolute;
  overflow: hidden;
}

.method-viz {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-self: center;
  width: min(100%, 31rem);
}

.method-viz::before {
  content: "";
  position: absolute;
  inset: -14% -12%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(99, 102, 241, 0.13), rgba(124, 58, 237, 0.045) 62%, transparent);
  pointer-events: none;
}

.method-viz.is-empty {
  display: none;
}

.viz {
  display: grid;
  gap: 1.4rem;
  align-content: center;
  min-width: 0;
  color: var(--text-2);
  font-size: 0.875rem;
  line-height: 1.5;
  container-type: inline-size;
}

.method-viz > .viz {
  grid-area: 1 / 1;
  align-self: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

.method-viz > .viz.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s ease 0.1s, visibility 0s;
}

.step-body > .viz {
  margin-top: 1.75rem;
}

.viz p,
.viz ul,
.viz ol {
  margin: 0;
}

.viz ul,
.viz ol {
  padding: 0;
  list-style: none;
}

.viz code {
  padding: 0;
  background: none;
  font-size: 0.74rem;
}

.viz-k {
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.viz-k span {
  margin-left: 0.6em;
  letter-spacing: 0.04em;
  text-transform: none;
  opacity: 0.8;
}

.vi {
  flex: none;
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.viz-cap {
  color: var(--text-3);
  font-size: 0.84rem;
}

.viz-ok {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* 1. Honest work sets the bar: honest rewards, and the bar drawn from them. */
.viz-habits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin-top: -0.65rem !important;
  color: var(--text);
  font-size: 0.84rem;
}

.viz-habits li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.viz-habits .vi {
  color: var(--cyan);
}

.chart {
  position: relative;
  height: 11rem;
  margin-top: 1.1rem;
  border-bottom: 1px solid var(--line-2);
}

.chart-cols {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: clamp(0.45rem, 2.6cqi, 0.95rem);
  align-items: end;
  height: 100%;
  padding-right: 5rem !important;
}

.chart-cols li {
  position: relative;
  height: calc(var(--r) * 100%);
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, rgba(110, 231, 242, 0.42), rgba(110, 231, 242, 0.05));
  box-shadow: inset 0 2px 0 var(--cyan), 0 -6px 18px -10px rgba(110, 231, 242, 0.9);
  transform-origin: bottom;
}

.chart-cols b {
  position: absolute;
  bottom: calc(100% + 0.4rem);
  left: 50%;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transform: translateX(-50%);
}

.chart-cols .is-low {
  background: none;
  box-shadow: none;
}

.chart-cols .is-low::after,
.viz-flag::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  color: var(--violet);
  background: var(--bg);
  box-shadow: 0 0 10px currentColor;
}

.chart-cols .is-low::after {
  position: absolute;
  bottom: -5px;
  left: calc(50% - 4.5px);
}

.chart-cols .is-low b {
  bottom: 0.75rem;
  color: var(--violet);
}

.chart-bar {
  position: absolute;
  right: 0;
  bottom: calc(var(--bar) * 100%);
  left: 0;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--amber) 0 6px, transparent 6px 10px);
  filter: drop-shadow(0 0 4px rgba(255, 181, 71, 0.75));
  transform-origin: left;
}

.chart-bar span {
  position: absolute;
  right: 0;
  bottom: 0.45rem;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-align: right;
  text-transform: uppercase;
}

.chart-bar b {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.viz-cap + .viz-flag {
  margin-top: -0.75rem;
}

.viz-flag {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.86rem;
}

.viz-flag::before {
  flex: none;
  transform: translateY(1px);
}

/* 2. Attacks: what they see, and each run's reward against the bar. */
.viz-task {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  color: var(--text);
  font-size: 0.9rem;
}

.sees {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem 1rem;
}

.sees ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.05rem;
  color: var(--text);
  font-size: 0.86rem;
}

.sees li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.sees .vi {
  color: var(--cyan);
}

.sees .is-hidden {
  color: var(--text-3);
}

.sees .is-hidden .vi {
  color: #ff7d9f;
}

.viz s {
  text-decoration-color: rgba(255, 125, 159, 0.75);
  text-decoration-thickness: 1px;
}

.runs {
  --name: 13.5rem;
  --rw: 2.5rem;
  --gap: 0.85rem;
  --x: calc(var(--name) + var(--gap) + var(--bar) * (100% - var(--name) - var(--rw) - 2 * var(--gap)));
  position: relative;
  display: grid;
  padding-top: 0.2rem;
}

/* The pass bar crosses every track. */
.runs::after {
  content: "";
  position: absolute;
  top: 1.6rem;
  bottom: 0.2rem;
  left: var(--x);
  width: 1px;
  background: repeating-linear-gradient(180deg, var(--amber) 0 5px, transparent 5px 9px);
  filter: drop-shadow(0 0 4px rgba(255, 181, 71, 0.75));
  transform-origin: top;
}

.runs-bar {
  position: absolute;
  top: 0;
  left: var(--x);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translateX(-50%);
}

.runs-head:not(:nth-child(2)) {
  margin-top: 0.8rem !important;
}

.run {
  display: grid;
  grid-template-columns: var(--name) minmax(0, 1fr) var(--rw);
  align-items: center;
  gap: var(--gap);
  min-height: 1.95rem;
  font-size: 0.86rem;
}

.run-name code {
  display: block;
  margin-top: 0.1rem;
  color: var(--text);
  font-size: 0.7rem;
  white-space: nowrap;
}

.run-track {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
}

.run-track::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: calc(var(--r) * 100%);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(110, 231, 242, 0.2), var(--cyan));
  box-shadow: 0 0 14px rgba(110, 231, 242, 0.5);
  transform-origin: left;
}

.run-r {
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.run.is-hit .run-name {
  color: var(--text);
}

.run.is-hit .run-r {
  color: var(--cyan);
}

/* 3. Replay: the episode reproduces, then the passing reply is varied. */
.plays {
  display: grid;
  gap: 0.4rem;
}

.play {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.75rem;
}

.play-n {
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.play-calls {
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.play-calls i {
  margin: 0 0.15rem;
  color: var(--text-3);
  font-style: normal;
}

.play-r {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.plays .viz-ok {
  margin-top: 0.2rem !important;
  padding-left: 4.15rem;
}

.tree ol {
  margin-top: 0.55rem !important;
  padding-left: 1.15rem !important;
}

.tree li {
  position: relative;
  display: grid;
  grid-template-columns: 7.4rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.55rem 0.5rem 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

/* The rail and a tick to each variant. */
.tree li::before,
.tree li::after {
  content: "";
  position: absolute;
  left: -1.15rem;
  background: var(--line-2);
}

.tree li::before {
  top: 0;
  bottom: 0;
  width: 1px;
}

.tree li::after {
  top: 1.2rem;
  width: 0.75rem;
  height: 1px;
}

.tree .tree-root::before {
  top: 1.2rem;
}

.tree li:last-child::before {
  bottom: auto;
  height: 1.2rem;
}

.tree .tree-root::after {
  top: calc(1.2rem - 3.5px);
  left: calc(-1.15rem - 3px);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  color: var(--cyan);
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.tree-name {
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
}

.tree code {
  color: var(--text-2);
}

.tree .is-evidence {
  background: rgba(255, 92, 138, 0.08);
  box-shadow: inset 2px 0 0 var(--rose);
}

.tree .is-evidence {
  grid-template-columns: 6.8rem minmax(0, 1fr) auto;
  padding-left: 0.6rem;
}

.tree .rw {
  font-size: 0.8rem;
}

.viz-verdict {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  color: var(--text);
  font-size: 0.9rem;
}

.viz-verdict .tag {
  flex: none;
}

/* 4. Judges: two rulings disagree, an adjudicator settles it and quotes. */
.judges {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem;
  margin-top: -0.2rem;
}

.judges::before {
  content: "";
  position: absolute;
  top: 0.25rem;
  bottom: 0.25rem;
  left: 50%;
  width: 1px;
  background: var(--line);
}

.judge,
.adjudicator {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.45rem;
  text-align: center;
}

.judge-who {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
}

.judge-why {
  max-width: 15rem;
  font-size: 0.84rem;
}

.merge {
  position: relative;
  height: 4rem;
  margin: -0.4rem 0 -0.2rem;
}

.merge::after {
  content: "";
  position: absolute;
  bottom: -4.5px;
  left: calc(50% - 4.5px);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  color: var(--violet);
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

.merge svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke-width: 1.1;
  stroke-dasharray: 1;
}

.merge-a {
  stroke: rgba(255, 125, 159, 0.7);
}

.merge-b {
  stroke: rgba(110, 231, 242, 0.7);
}

.merge p {
  position: absolute;
  top: 0.35rem;
  left: 50%;
  padding: 0 0.5rem;
  color: #ff9ab4;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translateX(-50%);
}

.adjudicator {
  gap: 0.55rem;
}


.adj-blind {
  color: var(--text-3);
  font-size: 0.82rem;
}

.adj-blind .vi {
  display: inline-block;
  margin-right: 0.4rem;
  vertical-align: -0.2em;
}

.quote {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.quote-line code {
  color: var(--text-2);
  font-size: 0.72rem;
}

.quote-line mark {
  padding: 0.1em 0.15em;
  border-radius: 3px;
  color: var(--text);
  background: linear-gradient(rgba(110, 231, 242, 0.2), rgba(110, 231, 242, 0.2)) no-repeat 0 0 / 100% 100%;
  box-shadow: inset 0 -1px 0 rgba(110, 231, 242, 0.8);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* 5. Check by hand: every candidate is read; only confirmed ones stay. */
.hand li {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.hand .vi {
  transform: translateY(0.15rem);
}

.hand .is-kept .vi {
  color: var(--cyan);
}

.hand .is-dropped .vi {
  color: #ff7d9f;
}

.hand-name {
  color: var(--text);
  font-weight: 500;
}

.hand-name small {
  display: block;
  color: var(--text-3);
  font-size: 0.8rem;
  font-weight: 400;
}

.hand .is-dropped s {
  color: var(--text-3);
}

.hand-out {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hand .is-kept .hand-out {
  color: var(--cyan);
}

.hand .is-dropped .hand-out {
  color: var(--text-3);
}

.hand-sum {
  color: var(--text-2);
}

.hand-sum b {
  color: var(--text);
  font-family: var(--mono);
  font-weight: 600;
}

/* Narrow panels: names stack over values. */
@container (max-width: 25rem) {
  .runs {
    --name: 9rem;
  }

  .run-name code {
    white-space: normal;
    overflow-wrap: normal;
  }

  .tree li,
  .tree .is-evidence {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.15rem 0.75rem;
  }

  .runs-head span {
    display: block;
    margin: 0.15rem 0 0;
  }

  .tree code {
    grid-row: 2;
  }

  .play {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.1rem 0.75rem;
  }

  .play-calls {
    grid-row: 2;
  }

  .plays .viz-ok {
    padding-left: 0;
  }

  .judges {
    gap: 1rem;
  }
}

/* The builds. Each panel plays its own when its step opens. */
@media (prefers-reduced-motion: no-preference) {
  .is-live .viz.is-active :is(.viz-k, .viz-task, .viz-cap, .viz-flag, .viz-habits li, .sees, .runs-head, .run, .runs-bar, .play, .viz-ok, .tree li, .viz-verdict, .judge, .merge p, .adjudicator > *, .quote > *, .hand li, .hand-sum) {
    animation: viz-in 0.6s cubic-bezier(0.2, 0.75, 0.25, 1) both;
  }

  /* 1 */
  .is-live .viz-honest.is-active .viz-habits li { animation-delay: calc(150ms + var(--i) * 110ms); }
  .is-live .viz-honest.is-active .chart-cols li { animation: viz-grow-y 0.75s cubic-bezier(0.2, 0.75, 0.25, 1) both; animation-delay: calc(450ms + var(--i) * 70ms); }
  .is-live .viz-honest.is-active .chart-bar { animation: viz-grow-x 0.8s cubic-bezier(0.6, 0, 0.2, 1) 1.15s both, viz-march 1.8s linear 2s infinite; }
  .is-live .viz-honest.is-active .chart-bar span { animation: viz-in 0.5s ease 1.6s both; }
  .is-live .viz-honest.is-active .chart-cols .is-low::after { animation: viz-pulse 2.4s ease-in-out 1.9s infinite; }
  .is-live .viz-honest.is-active .viz-cap { animation-delay: 1.8s; }
  .is-live .viz-honest.is-active .viz-flag { animation-delay: 2s; }

  /* 2 */
  .is-live .viz-attack.is-active .sees { animation-delay: 0.12s; }
  .is-live .viz-attack.is-active .runs-head { animation-delay: 0.3s; }
  .is-live .viz-attack.is-active .runs-head ~ .runs-head { animation-delay: 1.05s; }
  .is-live .viz-attack.is-active .run { animation-delay: calc(380ms + var(--i) * 150ms); }
  .is-live .viz-attack.is-active .run-track::before { animation: viz-grow-x 0.6s cubic-bezier(0.2, 0.75, 0.25, 1) both; animation-delay: calc(560ms + var(--i) * 150ms); }
  .is-live .viz-attack.is-active .runs::after { animation: viz-grow-y 0.9s cubic-bezier(0.6, 0, 0.2, 1) 0.3s both, viz-march-y 1.8s linear 1.4s infinite; }
  .is-live .viz-attack.is-active .runs-bar { animation-delay: 0.5s; }
  .is-live .viz-attack.is-active .run.is-hit .run-track::before { animation: viz-grow-x 0.6s cubic-bezier(0.2, 0.75, 0.25, 1) both, viz-glow 2.6s ease-in-out infinite; animation-delay: calc(560ms + var(--i) * 150ms), calc(1300ms + var(--i) * 150ms); }
  .is-live .viz-attack.is-active .viz-cap { animation-delay: 1.6s; }

  /* 3 */
  .is-live .viz-replay.is-active .play { animation-delay: calc(120ms + var(--i) * 140ms); }
  .is-live .viz-replay.is-active .play-calls { background: linear-gradient(90deg, transparent, rgba(110, 231, 242, 0.28), transparent) no-repeat; background-size: 30% 100%; animation: viz-scan 1.1s ease-in-out 0.45s both; }
  .is-live .viz-replay.is-active .plays .viz-ok { animation-delay: 1.2s; }
  .is-live .viz-replay.is-active .tree .viz-k { animation-delay: 1.35s; }
  .is-live .viz-replay.is-active .tree li { animation-delay: calc(1450ms + var(--i) * 170ms); }
  .is-live .viz-replay.is-active .tree .is-evidence { animation: viz-in 0.6s cubic-bezier(0.2, 0.75, 0.25, 1) both, viz-flash 1.2s ease 2.5s both; animation-delay: 1790ms, 2.5s; }
  .is-live .viz-replay.is-active .tree-root::after { animation: viz-pulse 2.4s ease-in-out 2.2s infinite; }
  .is-live .viz-replay.is-active .viz-verdict { animation-delay: 2.35s; }

  /* 4 */
  .is-live .viz-judges.is-active .judge { animation-delay: calc(150ms + var(--i) * 160ms); }
  .is-live .viz-judges.is-active .merge path { animation: viz-draw 0.7s cubic-bezier(0.6, 0, 0.2, 1) 0.65s both; }
  .is-live .viz-judges.is-active .merge p { animation-delay: 0.8s; }
  .is-live .viz-judges.is-active .adjudicator > * { animation-delay: 1.25s; }
  .is-live .viz-judges.is-active .merge::after { animation: viz-in 0.4s ease 1.2s both, viz-pulse 2.4s ease-in-out 1.6s infinite; }
  .is-live .viz-judges.is-active .adj-blind .vi { animation: viz-spin 0.9s cubic-bezier(0.6, 0, 0.2, 1) 1.45s both; }
  .is-live .viz-judges.is-active .adjudicator > .adj-blind { animation-delay: 1.4s; }
  .is-live .viz-judges.is-active .adjudicator > .tag { animation-delay: 1.75s; }
  .is-live .viz-judges.is-active .adjudicator > .quote { animation-delay: 2s; }
  .is-live .viz-judges.is-active .quote > * { animation-delay: 2.05s; }
  .is-live .viz-judges.is-active .quote-line mark { animation: viz-sweep 0.9s ease-in-out 2.3s both; }
  .is-live .viz-judges.is-active .quote > .viz-ok { animation-delay: 3.1s; }

  /* 5 */
  .is-live .viz-hand.is-active .hand li { animation-delay: calc(150ms + var(--i) * 260ms); }
  .is-live .viz-hand.is-active .hand .vi { animation: viz-pop 0.45s cubic-bezier(0.3, 1.5, 0.5, 1) both; animation-delay: calc(450ms + var(--i) * 260ms); }
  .is-live .viz-hand.is-active .hand s { text-decoration-color: transparent; animation: viz-strike 0.4s ease both; animation-delay: calc(600ms + var(--i) * 260ms); }
  .is-live .viz-hand.is-active .hand-out { animation: viz-in 0.4s ease both; animation-delay: calc(650ms + var(--i) * 260ms); }
  .is-live .viz-hand.is-active .hand .is-kept .vi { animation: viz-pop 0.45s cubic-bezier(0.3, 1.5, 0.5, 1) both, viz-glow 2.8s ease-in-out infinite; animation-delay: calc(450ms + var(--i) * 260ms), 2s; }
  .is-live .viz-hand.is-active .hand-sum { animation-delay: 1.45s; }
}

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

@keyframes viz-grow-y {
  from { transform: scaleY(0); }
}

@keyframes viz-grow-x {
  from { transform: scaleX(0); }
}

@keyframes viz-march {
  to { background-position: 10px 0; }
}

@keyframes viz-march-y {
  to { background-position: 0 9px; }
}

@keyframes viz-pulse {
  50% { box-shadow: 0 0 1px currentColor; }
}

@keyframes viz-glow {
  50% { opacity: 0.6; }
}

@keyframes viz-scan {
  from { background-position: -150% 0; }
  to { background-position: 250% 0; }
}

@keyframes viz-flash {
  30% { background-color: rgba(255, 92, 138, 0.2); }
}

@keyframes viz-draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes viz-spin {
  from { transform: rotate(-180deg); opacity: 0; }
}

@keyframes viz-sweep {
  from { background-size: 0 100%; box-shadow: inset 0 -1px 0 transparent; }
}

@keyframes viz-pop {
  from { opacity: 0; transform: translateY(0.15rem) scale(0.4); }
}

@keyframes viz-strike {
  to { text-decoration-color: rgba(255, 125, 159, 0.75); }
}

/* ---------- Re-test ---------- */

.points {
  display: grid;
  gap: 1.35rem;
  margin-top: 2rem;
  padding: 0;
  list-style: none;
}

.points li {
  position: relative;
  padding-left: 1.4rem;
}

.points li::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 10px rgba(255, 92, 138, 0.6);
}

.points h3 {
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.points p {
  margin-top: 0.3rem;
  color: var(--text-2);
  font-size: 1rem;
}

.verdicts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem clamp(1.5rem, 3vw, 3rem);
  margin-top: clamp(3.5rem, 6vw, 5rem);
  padding-top: 2.25rem;
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--line-2) 20%, var(--line-2) 80%, transparent) 1;
}

.verdicts dt {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--v, var(--text-2));
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.verdicts dt::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.verdicts dt[data-v="fixed"] { --v: var(--cyan); }
.verdicts dt[data-v="notfixed"] { --v: #ffc46b; }
.verdicts dt[data-v="regression"] { --v: #f390ff; }
.verdicts dt[data-v="unknown"] { --v: #b8b2c6; }

.verdicts dd {
  margin-top: 0.6rem;
  color: var(--text-2);
  font-size: 0.95rem;
}

/* ---------- What you get ---------- */

.deliver {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem clamp(1.5rem, 4vw, 4rem);
}

.deliver h3 {
  font-size: 1.25rem;
  letter-spacing: -0.015em;
}

.deliver h3::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 2px;
  margin-bottom: 1.25rem;
  background: var(--cta);
}

.ticks {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.2rem;
  padding: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--text-2);
  font-size: 0.98rem;
}

.ticks li::before {
  content: "";
  position: absolute;
  top: 0.38em;
  left: 0.2rem;
  width: 0.38rem;
  height: 0.68rem;
  border: solid var(--amber);
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(45deg);
}

.deliver-note {
  margin-top: 1.75rem;
  color: var(--text);
  font-weight: 500;
}

.deliver .btn {
  margin-top: 1rem;
}

/* ---------- Process: the timeline ---------- */

.process::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(44% 30% at 50% 22%, rgba(186, 64, 230, 0.08), transparent 72%);
}

.timeline {
  --tl-edge: rgba(255, 181, 71, 0.42);
  position: relative;
  max-width: 62rem;
  margin: clamp(3rem, 6vw, 4.5rem) auto 0;
  padding: 0;
  list-style: none;
}

/* The track the nodes sit on. */
.timeline::before {
  content: "";
  position: absolute;
  top: -1.25rem;
  bottom: -1.25rem;
  left: 50%;
  width: 1.25rem;
  margin-left: -0.625rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.008));
}

.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 9rem minmax(0, 1fr);
  align-items: center;
}

.tl-item + .tl-item {
  margin-top: -1.6rem;
}

.tl-node {
  position: relative;
  z-index: 1;
  grid-area: 1 / 2;
  justify-self: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #241d2e, #0e0b14 72%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09), 0 0 0 0.5rem var(--bg), 0 0 2rem rgba(224, 79, 240, 0.16);
}

.tl-node::before {
  content: "";
  position: absolute;
  top: 46%;
  left: 50%;
  width: 0.45rem;
  height: 0.85rem;
  border: solid var(--magenta);
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -50%) rotate(45deg);
  filter: drop-shadow(0 0 4px rgba(224, 79, 240, 0.7));
}

/* Connector from the node to its card. */
.tl-item::after {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(50% + 1.75rem);
  width: 3.75rem;
  height: 24px;
  margin-top: -4px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='24' viewBox='0 0 60 24'%3E%3Cpath d='M4 4h20l16 16h20' fill='none' stroke='%23ffb547' stroke-opacity='.5'/%3E%3Ccircle cx='3' cy='4' r='2.5' fill='%23ffb547'/%3E%3Ccircle cx='58' cy='20' r='2' fill='%23ffb547'/%3E%3C/svg%3E") left top / 100% 100% no-repeat;
  pointer-events: none;
}

.tl-item:nth-child(even)::after {
  left: auto;
  right: calc(50% + 1.75rem);
  transform: scaleX(-1);
}

.tl-card {
  position: relative;
  isolation: isolate;
  grid-area: 1 / 3;
  justify-self: start;
  width: 100%;
  max-width: 25rem;
  margin-left: 1rem;
  padding: 1.3rem 1.6rem 1.45rem;
}

.tl-item:nth-child(even) .tl-card {
  grid-area: 1 / 1;
  justify-self: end;
  margin: 0 1rem 0 0;
  text-align: right;
}

/* The card outline: solid sides, a dashed run along the top and bottom,
   cut corners. Drawn for a right-hand card and mirrored for the left. */
.tl-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  --edge: var(--tl-edge);
  --diag: transparent calc(50% - 1.2px), var(--edge) calc(50% - 1.2px) 50%, transparent 50%;
  --c1: 10px;
  --c2: 24px;
  --c3: 34px;
  border: solid var(--edge);
  border-width: 0 1px;
  clip-path: polygon(0 var(--c1), var(--c1) 0, calc(100% - var(--c2)) 0, 100% var(--c2), 100% calc(100% - var(--c1)), calc(100% - var(--c1)) 100%, var(--c3) 100%, 0 calc(100% - var(--c3)));
  background:
    linear-gradient(to top left, var(--diag)) left top / var(--c1) var(--c1) no-repeat border-box,
    linear-gradient(to top right, var(--diag)) right top / var(--c2) var(--c2) no-repeat border-box,
    linear-gradient(to bottom right, var(--diag)) right bottom / var(--c1) var(--c1) no-repeat border-box,
    linear-gradient(to bottom left, var(--diag)) left bottom / var(--c3) var(--c3) no-repeat border-box,
    linear-gradient(var(--edge), var(--edge)) left var(--c1) top 0 / calc(24% - var(--c1)) 1px no-repeat border-box,
    repeating-linear-gradient(90deg, var(--edge) 0 5px, transparent 5px 10px) 50% 0 / 30% 1px no-repeat border-box,
    linear-gradient(var(--edge), var(--edge)) right var(--c2) top 0 / calc(24% - var(--c2)) 1px no-repeat border-box,
    linear-gradient(var(--edge), var(--edge)) left var(--c3) bottom 0 / calc(36% - var(--c3)) 1px no-repeat border-box,
    repeating-linear-gradient(90deg, var(--edge) 0 5px, transparent 5px 10px) right 3.4rem bottom 0 / calc(58% - 3.4rem) 1px no-repeat border-box,
    linear-gradient(180deg, rgba(255, 181, 71, 0.03), rgba(255, 181, 71, 0));
}

/* Chevrons at the end of the bottom run. */
.tl-card::after {
  content: "";
  position: absolute;
  right: 1.15rem;
  bottom: -4px;
  width: 22px;
  height: 9px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='9' viewBox='0 0 22 9'%3E%3Cpath d='M5.5 1 2 4.5 5.5 8M12.5 1 9 4.5 12.5 8M19.5 1 16 4.5 19.5 8' fill='none' stroke='%23ffb547' stroke-opacity='.8' stroke-width='1.2'/%3E%3C/svg%3E") center / 22px 9px no-repeat;
}

.tl-item:nth-child(even) .tl-card::before {
  transform: scaleX(-1);
}

.tl-item:nth-child(even) .tl-card::after {
  right: auto;
  left: 1.15rem;
  transform: scaleX(-1);
}

.tl-num {
  color: #ffc77a;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
}

.tl-card h3 {
  margin-top: 0.35rem;
  font-size: 1.15rem;
  letter-spacing: -0.015em;
}

.tl-card p:not(.tl-num) {
  margin-top: 0.4rem;
  color: var(--text-2);
  font-size: 0.97rem;
  line-height: 1.55;
}

/* ---------- Security ---------- */

.sec-points {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2.5rem clamp(1.5rem, 4vw, 4rem);
  margin-top: clamp(3.5rem, 6vw, 5rem);
}

.sec-points h3 {
  font-size: 1.2rem;
  letter-spacing: -0.015em;
}

.sec-points p {
  margin-top: 0.6rem;
  color: var(--text-2);
  font-size: 1rem;
}

.sec-points p + p {
  margin-top: 0.8rem;
}

.retention {
  max-width: 52rem;
  margin-top: clamp(3.5rem, 6vw, 5rem);
}

.data-table {
  width: 100%;
  margin-top: 1.25rem;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table caption {
  padding-top: 0.9rem;
  caption-side: bottom;
  color: var(--text-3);
  font-size: 0.9rem;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table thead th {
  padding-top: 0;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.data-table tbody th {
  padding-right: 2rem;
  color: var(--text);
  font-weight: 500;
}

.data-table td {
  color: var(--text-2);
}

.retention-note {
  margin-top: 1rem;
  color: var(--text-2);
  font-size: 0.97rem;
}

/* ---------- FAQ: a hairline list ---------- */

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  align-items: start;
  gap: 2.5rem clamp(2rem, 6vw, 6rem);
}

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

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

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.35rem 0;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary h3 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.faq summary:hover h3 {
  color: #fff;
}

.faq summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1.6px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.6px 100% no-repeat;
  color: var(--text-3);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  background-size: 100% 1.6px, 1.6px 0;
  color: var(--rose);
}

.faq details p {
  max-width: 42rem;
  padding: 0 2.5rem 1.6rem 0;
  color: var(--text-2);
}

/* ---------- Contact ---------- */

.contact {
  padding-block: clamp(6rem, 12vw, 11rem);
  text-align: center;
}

.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(34% 46% at 50% 52%, rgba(224, 79, 240, 0.14), transparent 72%),
    radial-gradient(46% 56% at 50% 60%, rgba(99, 102, 241, 0.1), transparent 72%);
}

.section .contact-title,
.contact h2 {
  font-size: clamp(2.6rem, 1.4rem + 4vw, 5rem);
  letter-spacing: -0.045em;
}

.contact-lede {
  max-width: 38rem;
  margin: 1.4rem auto 0;
  color: var(--text-2);
  font-size: clamp(1.08rem, 1rem + 0.3vw, 1.2rem);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 2.5rem;
}

.contact-email {
  margin-top: 1.75rem;
  color: var(--text-2);
}

.contact-note {
  margin-top: 0.4rem;
  color: var(--text-3);
  font-size: 0.92rem;
}

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

.site-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(3rem, 6vw, 4.5rem) 0 2.5rem;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2) 20%, var(--line-2) 80%, transparent);
}

.footer-mesh {
  position: absolute;
  z-index: -1;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: rgba(167, 139, 250, 0.16);
  stroke-width: 1;
  -webkit-mask-image: linear-gradient(180deg, transparent 10%, #000 85%);
  mask-image: linear-gradient(180deg, transparent 10%, #000 85%);
  pointer-events: none;
}

.footer-mesh path {
  vector-effect: non-scaling-stroke;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 2rem;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  color: var(--text-2);
  font-size: 0.94rem;
  text-decoration: none;
}

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

.footer-icons {
  display: flex;
  justify-self: end;
  gap: 0.6rem;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.icon-btn:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.09);
}

.icon-btn svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-bottom {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  color: var(--text-3);
  font-size: 0.9rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .header-sample {
    display: none;
  }
}

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

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

  .sec-points > :first-child {
    grid-column: 1 / -1;
    max-width: 40rem;
  }

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

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

  .showcase-trace {
    align-self: start;
  }
}

@media (max-width: 899px) {
  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    display: none;
  }

  /* Phones: the film can't sit behind the text, so it runs full width
     above it, cropped so the brain fills the screen. */
  .hero {
    --film-w: calc(min(100vw, 36rem) * 0.86 / 0.42);
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding-block: 0 5.5rem;
  }

  .hero-film {
    position: relative;
    inset: auto;
    width: 100%;
    height: calc(var(--film-w) * 0.5625 * 0.7);
    aspect-ratio: auto;
    transform: none;
  }

  .hero::after {
    height: 16%;
  }

  .hero-film > img,
  .hero-film > video {
    inset: auto;
    left: calc(50% - 0.68 * var(--film-w));
    top: calc(50% - 0.495 * var(--film-w) * 0.5625);
    width: var(--film-w);
    height: calc(var(--film-w) * 0.5625);
  }

  .hero-glow {
    background:
      radial-gradient(60% 30% at 20% 62%, rgba(124, 58, 237, 0.16), transparent 72%),
      radial-gradient(50% 24% at 70% 92%, rgba(224, 79, 240, 0.08), transparent 70%);
  }

  .hero-copy {
    max-width: 38rem;
    margin-top: -0.5rem;
  }

  .hero-sub {
    max-width: 33rem;
  }

  .film-toggle {
    top: calc(var(--film-w) * 0.5625 * 0.7 - 3.25rem);
    bottom: auto;
  }

  .feature-grid,
  .method-grid,
  .faq-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .art,
  .feature-flip .art {
    order: -1;
    width: min(78%, 24rem);
  }

  .method-viz {
    order: -1;
  }

  .feature-copy,
  .method-copy {
    max-width: 40rem;
  }

  .audience {
    grid-template-columns: minmax(0, 1fr);
    max-width: 40rem;
  }

  .footer-top {
    grid-template-columns: 1fr auto;
  }

  .footer-nav {
    grid-row: 2;
    grid-column: 1 / -1;
  }

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

@media (max-width: 720px) {
  .finds,
  .deliver,
  .sec-points,
  .verdicts {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .strip-list {
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
  }

  .strip-list li + li {
    padding-left: 0;
  }

  .strip-list li + li::before {
    display: none;
  }

  .trace tbody th {
    white-space: normal;
  }

  .rw small {
    display: block;
    margin: 0.15rem 0 0;
  }

  .contact-actions {
    flex-direction: column;
    align-items: center;
  }

  .contact-actions .btn {
    width: min(100%, 20rem);
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .showcase {
    padding: 2.25rem 1.35rem 2rem;
  }

  .showcase::before {
    --tr: 40px;
    --bl: 40px;
  }

  .showcase-dash {
    display: none;
  }

  .trace th,
  .trace td {
    padding-inline: 0.5rem;
  }

  .trace code {
    font-size: 0.78rem;
  }

  /* Timeline: the track moves to the left and every card sits to its right. */
  .timeline::before {
    left: 1.75rem;
  }

  .tl-item {
    grid-template-columns: 3.5rem minmax(0, 1fr);
    gap: 0 1.6rem;
  }

  .tl-item + .tl-item {
    margin-top: 1.4rem;
  }

  .tl-node {
    grid-area: 1 / 1;
  }

  .tl-card,
  .tl-item:nth-child(even) .tl-card {
    grid-area: 1 / 2;
    justify-self: stretch;
    max-width: none;
    margin: 0;
    text-align: left;
  }

  .tl-item:nth-child(even) .tl-card::before {
    transform: none;
  }

  .tl-item:nth-child(even) .tl-card::after {
    right: 1.15rem;
    left: auto;
    transform: none;
  }

  .tl-item::after,
  .tl-item:nth-child(even)::after {
    right: auto;
    left: 3.5rem;
    width: 1.6rem;
    height: 1px;
    margin-top: 0;
    background: var(--tl-edge);
    transform: none;
  }

  .faq details p {
    padding-right: 0;
  }

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

  .footer-icons {
    justify-self: start;
  }

  .footer-nav {
    grid-row: auto;
  }
}

@media (max-width: 480px) {
  .header-actions .btn {
    padding-inline: 1rem;
  }

  .brand {
    font-size: 1.1rem;
  }

  .board-kind {
    display: block;
    min-width: 0;
  }

  .board-delta {
    margin-left: 0;
  }
}

@media (max-width: 420px) {
  .diff {
    font-size: 0.7rem;
  }
}

/* ---------- Motion ---------- */

/* Reduced motion: no film, only its poster. This works without JavaScript;
   the video's sources also carry a media query, so it doesn't load. */
@media (prefers-reduced-motion: reduce) {
  .hero-video {
    display: none;
  }

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

/* ---------- Forced colours (Windows high contrast) ---------- */

@media (forced-colors: active) {
  .btn::before,
  .hero-panel::before,
  .showcase::before,
  .tl-card::before {
    border: 1px solid CanvasText;
    background: Canvas;
  }

  .hero-panel::after {
    background: CanvasText;
  }

  .hero-glow,
  .art::before,
  .footer-mesh,
  .showcase-dash,
  .hero-trace,
  body::after {
    display: none;
  }

  .stat-num {
    color: CanvasText;
    background: none;
  }
}

/* 404 page */
.not-found {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: 4rem;
  text-align: center;
}

.not-found .brand {
  margin-bottom: 2.75rem;
}

.not-found h1 {
  font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.4rem);
  letter-spacing: -0.035em;
}

.not-found p {
  max-width: 30rem;
  margin: 1rem auto 2.25rem;
  color: var(--text-2);
}
