/* ===========================================================================
   Deteryx landing page
   ---------------------------------------------------------------------------
   The page is set like an inspection report, not a SaaS template: bone paper
   and black ink, one signal colour that only ever means "this was found",
   square corners, hairline rules and a visible column grid. Type does the
   work — a condensed grotesk for headlines, a dot-matrix face for every
   number, a mono for labels.

   Two surfaces alternate: paper sections and `.ink` bands. Components read
   only the semantic tokens (--bg, --fg, --fg-2, --mute, --line), so the same
   component works on either surface without a variant.
   =========================================================================== */

/* ---------------------------------------------------------------- tokens -- */

:root {
  --paper: #e8e5dd;
  --paper-2: #dcd8ce;
  --sheet: #f5f3ee;
  --night: #0f0f0d;
  --signal: #ff4a1c;

  --bg: var(--paper);
  --fg: var(--night);
  --fg-2: #3a3934;
  --mute: #7a776e;
  --line: rgba(15, 15, 13, 0.16);
  --col-line: rgba(120, 118, 110, 0.11);

  --display: "Archivo", "Arial Narrow", "Helvetica Neue", sans-serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --dot: "Doto", "IBM Plex Mono", ui-monospace, monospace;

  --shell: 1440px;
  --gut: clamp(16px, 3vw, 40px);
  --gap: clamp(12px, 1.6vw, 24px);
  /* Left edge of the shell's content box, for things that bleed right. */
  --edge: max(var(--gut), calc((100vw - var(--shell)) / 2 + var(--gut)));

  --ease: cubic-bezier(0.7, 0, 0.2, 1);
}

.ink {
  --bg: var(--night);
  --fg: var(--paper);
  --fg-2: #bdb9ae;
  --mute: #8a877e;
  --line: rgba(232, 229, 221, 0.15);
  background: var(--bg);
  color: var(--fg);
}

/* ------------------------------------------------------------------ base -- */

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { margin: 0; font-weight: 800; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); font-size: 0.92em; }
[hidden] { display: none !important; }

::selection { background: var(--signal); color: var(--night); }

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

.skip {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 200;
  padding: 10px 14px;
  background: var(--night);
  color: var(--paper);
  font: 500 12px/1 var(--mono);
  text-transform: uppercase;
  transition: top 0.18s ease;
}
.skip:focus { top: 16px; }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: var(--gut);
}

/* The column grid, drawn. It sits over everything at a strength that reads
   on paper and on ink alike, and it is the grid the sections actually use. */
.cols {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: var(--gut);
}
.cols::before {
  content: "";
  position: absolute;
  inset: 0 var(--gut);
  border-right: 1px solid var(--col-line);
  background: repeating-linear-gradient(90deg, var(--col-line) 0 1px, transparent 1px calc(100% / 12));
}
@media (max-width: 760px) {
  .cols::before {
    background: repeating-linear-gradient(90deg, var(--col-line) 0 1px, transparent 1px calc(100% / 4));
  }
}

/* Paper tooth. Multiply, so on the ink bands it all but disappears. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: multiply;
  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.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
}

/* ------------------------------------------------------------ shared type -- */

.h2 {
  font-family: var(--display);
  font-stretch: 62%;
  font-weight: 800;
  font-size: clamp(2.8rem, 7vw, 6.6rem);
  line-height: 0.86;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  text-wrap: balance;
}

.lede {
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 46ch;
}

/* A section opens on a rule with its index and a running label, the way a
   report section does. */
.sec-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--fg);
  font: 500 11.5px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sec-head b { font-weight: 500; color: var(--signal); }
.sec-head i { flex: 1; }
.sec-head span:last-child { color: var(--mute); }
@media (max-width: 560px) { .sec-head span:last-child { display: none; } }

.sec-intro {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 28px;
  align-items: end;
  margin-top: clamp(28px, 4vw, 52px);
}
.sec-intro .h2 { grid-column: 1 / span 8; }
.sec-intro .lede { grid-column: 9 / span 4; }
@media (max-width: 960px) {
  .sec-intro .h2, .sec-intro .lede { grid-column: 1 / -1; }
}

/* --------------------------------------------------------------- buttons -- */

.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  border: 1px solid var(--fg);
  background: var(--fg);
  color: var(--bg);
  font: 600 15px/1 var(--sans);
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease);
}
/* The fill rises from below on hover rather than the whole button fading. */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--signal);
  transform: translateY(101%);
  transition: transform 0.35s var(--ease);
}
.btn:hover { color: var(--night); border-color: var(--signal); }
.btn:hover::before { transform: translateY(0); }
.btn-sm { padding: 11px 14px; font-size: 13px; }
.btn-lg { padding: 19px 22px; font-size: 16px; }
.arr { display: inline-block; transition: transform 0.35s var(--ease); }
.btn:hover .arr { transform: translate(2px, -2px); }

.link-under {
  display: inline-flex;
  gap: 0.5em;
  padding: 6px 0;
  font: 500 14px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 100% 1px;
  transition: background-size 0.35s var(--ease), color 0.2s ease;
}
button.link-under { border: 0; color: inherit; cursor: pointer; }
/* The case window needs landing.js; without it its openers are not shown. */
[data-case-open] { display: none; }
.has-case [data-case-open] { display: inline-flex; }
.has-case .hero-tally { display: inline-block; }
.link-under:hover { color: var(--signal); background-size: 0% 1px; background-position: 100% 100%; }

/* ------------------------------------------------------------------- nav -- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 10px var(--gut);
  background: var(--paper);
  color: var(--night);
  border-bottom: 1px solid rgba(15, 15, 13, 0.16);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  font: 800 21px/1 var(--display);
  font-stretch: 70%;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
/* The mark: four arms crossing on one finding. On hover the arms close in. */
.brand-mark { width: 24px; height: 24px; flex: none; overflow: visible; }
.brand-arms polygon { fill: var(--night); transition: transform 0.35s var(--ease); }
.brand-dot { fill: var(--signal); transition: transform 0.35s var(--ease); transform-origin: center; transform-box: fill-box; }
.brand:hover .brand-arms polygon:nth-child(1) { transform: translate(2px, 2px); }
.brand:hover .brand-arms polygon:nth-child(2) { transform: translate(-2px, 2px); }
.brand:hover .brand-arms polygon:nth-child(3) { transform: translate(2px, -2px); }
.brand:hover .brand-arms polygon:nth-child(4) { transform: translate(-2px, -2px); }
.brand:hover .brand-dot { transform: rotate(45deg); }

.nav-links {
  display: flex;
  gap: 26px;
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-links a {
  padding: 8px 0;
  color: #57554e;
  background: linear-gradient(var(--night), var(--night)) no-repeat 0 100% / 0% 1px;
  transition: color 0.2s ease, background-size 0.35s var(--ease);
}
.nav-links a i { font-style: normal; color: var(--signal); margin-right: 7px; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--night); background-size: 100% 1px; }

.nav-end { justify-self: end; }

@media (max-width: 860px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
}

/* ------------------------------------------------------------------ hero -- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  padding-top: 62px;
  overflow: hidden;
  isolation: isolate;
}
.hero-shell {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(28px, 4vw, 52px);
  padding-top: clamp(16px, 3vw, 36px);
  padding-bottom: 22px;
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 10px;
  border-top: 1px solid var(--fg);
  font: 500 11.5px/1.3 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}
.hero-meta p:first-child { color: var(--fg); }
.hero-tally {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  cursor: pointer;
  transition: color 0.2s ease;
}
.hero-tally:hover { color: var(--fg); }
.hero-tally b { font-weight: 500; color: var(--signal); }
@media (max-width: 560px) { .hero-tally { display: none; } }

.hero-title {
  font-family: var(--display);
  font-stretch: 62%;
  font-weight: 800;
  font-size: clamp(3.6rem, 12.2vw, 12.6rem);
  line-height: 0.84;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  max-width: 11ch;
}
.hero-title em { font-style: normal; color: var(--signal); }

/* Footnote marker: a boxed numeral in the mono, as a report would set it. */
.fn {
  display: inline-block;
  margin: 0.32em 0 0 0.25em;
  padding: 0.25em 0.4em 0.2em;
  border: 1px solid currentColor;
  font: 500 clamp(12px, 1.4vw, 18px)/1 var(--mono);
  letter-spacing: 0;
  vertical-align: top;
  transition: background 0.2s ease, color 0.2s ease;
}
.fn:hover { background: var(--fg); color: var(--bg); }

.hero-foot {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 32px;
  align-items: end;
  padding-top: 20px;
  border-top: 1px solid var(--fg);
}
.hero-sub {
  grid-column: 1 / span 5;
  max-width: 50ch;
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.55;
  color: var(--fg-2);
}
.hero-cta {
  grid-column: 6 / span 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.hero-access {
  margin-top: -6px;
  font: 500 10.5px/1.3 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}
.hero-stats {
  grid-column: 9 / span 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-left: 1px solid var(--line);
}
.hero-stats > div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 12px;
  border-right: 1px solid var(--line);
}
.hero-stats dt {
  font: 500 10.5px/1.3 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}
.hero-stats dd {
  font: 900 clamp(2rem, 3.2vw, 3.1rem)/0.9 var(--dot);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 1100px) {
  .hero-sub { grid-column: 1 / span 7; }
  .hero-cta { grid-column: 8 / span 5; align-items: flex-end; }
  .hero-stats { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .hero-sub, .hero-cta { grid-column: 1 / -1; align-items: flex-start; }
  .hero-stats > div { padding: 0 10px; }
}

.hero-fn {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font: 400 11.5px/1.5 var(--mono);
  color: var(--mute);
}
.hero-fn span {
  flex: none;
  padding: 2px 5px;
  border: 1px solid currentColor;
  font-size: 10px;
  line-height: 1;
}

/* --- the lens ---------------------------------------------------------- */
/* An ink layer the size of the hero holding a crawl's route listing, clipped
   to a circle at (--lx, --ly). landing.js moves the circle and adds
   .has-lens; without it none of this exists. */

.lens, .lens-ring { display: none; }
.has-lens .lens, .has-lens .lens-ring { display: block; }

.lens {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
  background: var(--night);
  color: rgba(232, 229, 221, 0.5);
  clip-path: circle(var(--lr, 0px) at var(--lx, 70%) var(--ly, 40%));
}
.lens-text {
  margin: 0;
  padding: 70px 0 0 var(--edge);
  font: 400 12px/1.9 var(--mono);
  white-space: pre;
}
.lens-text b { font-weight: 500; color: var(--signal); }
.lens-text i { font-style: normal; color: var(--paper); }

/* The pinned finding: a report entry sitting in the listing, centred where
   the lens rests (--fx, --fy), sized to fit inside the circle. */
.finding {
  position: absolute;
  left: var(--fx, 74%);
  top: var(--fy, 40%);
  width: 232px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--signal);
  background: var(--night);
  color: var(--paper);
  font: 400 10.5px/1.45 var(--mono);
  box-shadow: 0 0 0 6px var(--night);
}
.finding > p { padding: 0 10px; }
.finding-head {
  display: flex;
  justify-content: space-between;
  padding-block: 6px !important;
  background: var(--signal);
  color: var(--night);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.finding-head b { font-weight: 500; }
.finding-title {
  margin-top: 8px;
  font: 800 18px/1 var(--display);
  font-stretch: 66%;
  text-transform: uppercase;
}
.finding-route { margin-top: 6px; color: var(--signal); }
.finding-what { margin-top: 4px; color: rgba(232, 229, 221, 0.7); }
.finding-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding-block: 6px !important;
  gap: 10px;
  border-top: 1px solid rgba(232, 229, 221, 0.18);
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-transform: uppercase;
}
.finding-foot span { color: rgba(232, 229, 221, 0.55); }
.finding-foot b { font-weight: 500; color: var(--signal); }
@media (max-width: 760px) {
  .finding { transform: translate(-50%, -50%) scale(0.74); }
}

.lens-ring {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  pointer-events: none;
  width: calc(var(--lr, 0px) * 2 + 12px);
  height: calc(var(--lr, 0px) * 2 + 12px);
  border: 1px solid var(--signal);
  border-radius: 50%;
  transform: translate(var(--lx, 70%), var(--ly, 40%)) translate(-50%, -50%);
}
/* Crosshair ticks, outside the ring, on both axes. */
.lens-ring::before, .lens-ring::after {
  content: "";
  position: absolute;
  background: var(--signal);
}
.lens-ring::before {
  left: -16px; right: -16px; top: 50%; height: 1px;
  background: linear-gradient(90deg, var(--signal) 0 12px, transparent 12px calc(100% - 12px), var(--signal) calc(100% - 12px));
}
.lens-ring::after {
  top: -16px; bottom: -16px; left: 50%; width: 1px;
  background: linear-gradient(180deg, var(--signal) 0 12px, transparent 12px calc(100% - 12px), var(--signal) calc(100% - 12px));
}
.lens-read {
  position: absolute;
  left: calc(100% + 10px);
  top: 4px;
  padding: 5px 7px 4px;
  background: var(--signal);
  color: var(--night);
  font: 500 10.5px/1 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}
.lens-ring.is-closed .lens-read { opacity: 0; }
/* Near the right edge the readout drops below the ring instead, where it
   cannot land on the headline. */
.lens-ring.is-flip .lens-read { left: 50%; top: calc(100% + 22px); transform: translateX(-50%); }
/* Over the finding, the readout reports it and inverts. */
.lens-ring.is-hit .lens-read { background: var(--night); color: var(--signal); outline: 1px solid var(--signal); }

.has-lens.fine .hero { cursor: crosshair; }
.has-lens.fine .hero a, .has-lens.fine .hero button { cursor: pointer; }
.has-lens.fine .hero:has(.lens-ring.is-hit) { cursor: zoom-in; }

/* --- the case window --------------------------------------------------- */
/* The lens, opened up: a modal report window on the ink surface, framed in
   signal like the pinned finding. Square, hairlines, mono labels. */

.case {
  width: min(960px, calc(100vw - 32px));
  max-height: min(680px, calc(100svh - 32px));
  padding: 0;
  border: 1px solid var(--signal);
  overflow: hidden;
  flex-direction: column;
  box-shadow: 0 0 0 8px var(--night), 0 30px 80px rgba(0, 0, 0, 0.45);
}
.case[open] { display: flex; animation: case-in 0.42s var(--ease); }
.case::backdrop {
  background: rgba(15, 15, 13, 0.55);
  backdrop-filter: blur(3px) grayscale(1);
}
@keyframes case-in {
  from { clip-path: circle(0 at 50% 50%); }
  to { clip-path: circle(75% at 50% 50%); }
}
.case-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 9px 12px;
  background: var(--signal);
  color: var(--night);
  font: 500 11.5px/1.3 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.case-bar b { font-weight: 500; }
.case-x {
  padding: 4px 8px;
  border: 1px solid var(--night);
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.case-x:hover { background: var(--night); color: var(--signal); }

.case-body {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  min-height: 0;
  flex: 1;
}
.case-tabs {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}
.case-tabs button {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--fg-2);
  font: 500 12px/1.35 var(--mono);
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.case-tabs button span { grid-row: span 2; font: 900 22px/1 var(--dot); color: var(--mute); }
.case-tabs button b {
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--signal);
}
.case-tabs button:hover { background: rgba(232, 229, 221, 0.04); color: var(--fg); }
.case-tabs button[aria-selected="true"] {
  background: rgba(255, 74, 28, 0.08);
  color: var(--fg);
  box-shadow: inset 3px 0 0 var(--signal);
}
.case-tabs button[aria-selected="true"] span { color: var(--signal); }

.case-pane {
  min-height: 0;
  padding: clamp(18px, 3vw, 32px);
  overflow-y: auto;
}
.case-id {
  font: 500 11px/1.3 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}
.case-pane h3 {
  margin-top: 12px;
  font: 800 clamp(2rem, 4.4vw, 3.4rem)/0.9 var(--display);
  font-stretch: 62%;
  text-transform: uppercase;
}
.case-route { margin-top: 12px; font: 500 13px/1.4 var(--mono); color: var(--signal); }
.case-facts { margin-top: 24px; border-top: 1px solid var(--line); }
.case-facts > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.case-facts dt {
  font: 500 10.5px/1.6 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}
.case-facts dd { color: var(--fg); line-height: 1.45; }
.case-facts .sev { font: 500 13px/1.6 var(--mono); text-transform: uppercase; color: var(--signal); }

.case-note {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font: 400 11px/1.4 var(--mono);
  color: var(--mute);
}

/* --- rules of engagement ------------------------------------------------ */
/* Same window as the case, holding three numbered rules. Without landing.js
   it opens as the #rules target, fixed over the page without a backdrop. */

.rules { width: min(860px, calc(100vw - 32px)); max-height: min(860px, calc(100svh - 32px)); }
.rules:target:not([open]) {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 300;
  margin: auto;
}
.rules .case-x { flex: none; line-height: 1.3; white-space: nowrap; }
.rules-body { min-height: 0; overflow-y: auto; }

.rule {
  display: grid;
  grid-template-columns: clamp(52px, 8vw, 88px) 1fr;
  gap: clamp(12px, 2vw, 24px);
  padding: clamp(20px, 3vw, 30px) clamp(18px, 3vw, 32px);
  border-bottom: 1px solid var(--line);
}
.rules-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rules-pair .rule { grid-template-columns: 64px 1fr; gap: 14px; border-bottom: 0; }
.rules-pair .rule + .rule { border-left: 1px solid var(--line); }
.rules-pair .rule-no { font-size: 24px; }
.rule p { color: var(--fg-2); font-size: 15px; line-height: 1.55; max-width: 60ch; }
.rule .rule-no { font: 900 clamp(36px, 4.4vw, 56px)/0.8 var(--dot); color: var(--mute); }
.rules-body > .rule:first-child .rule-no { color: var(--signal); }
.rule h3 {
  margin-bottom: 12px;
  font: 800 clamp(1.6rem, 3vw, 2.3rem)/0.92 var(--display);
  font-stretch: 62%;
  text-transform: uppercase;
}

.rule-ways {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  background: var(--line);
  border: 1px solid var(--line);
}
.rule-ways { position: relative; }
.rule-ways > div { padding: 14px 22px; background: var(--bg); }
/* Both steps are required: a "+" sits on the seam between them. */
.rule-ways::after {
  content: "+";
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  background: var(--signal);
  color: var(--night);
  font: 500 15px/1 var(--mono);
}
.rule .rule-ways p { font-size: 14px; }
.rule .rule-tag {
  margin-bottom: 8px;
  font: 500 10.5px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal);
}
.rule .rule-fine { margin-top: 14px; font: 400 12px/1.5 var(--mono); color: var(--mute); }

.rule-list { margin-top: 16px; border-top: 1px solid var(--line); }
.rule-list li {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font: 400 13px/1.45 var(--mono);
  color: var(--fg);
}
.rule-list li::before { content: "×"; color: var(--signal); flex: none; }

.foot-note .link-under { font-size: 13px; }

@media (max-width: 720px) {
  .rules-pair { grid-template-columns: 1fr; }
  .rules-pair .rule + .rule { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .rule { grid-template-columns: 1fr; }
  .rule-ways { grid-template-columns: 1fr; }
  .rule-ways::after { left: auto; right: 16px; margin: -11px 0 0; }
}

@media (max-width: 760px) {
  .case-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .case-tabs { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .case-tabs button { flex: none; width: 180px; border-bottom: 0; border-right: 1px solid var(--line); }
  .case-tabs button[aria-selected="true"] { box-shadow: inset 0 -3px 0 var(--signal); }
  .case-facts > div { grid-template-columns: 1fr; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .case[open] { animation: none; }
}

/* --------------------------------------------------------------- the run -- */

.run { padding-top: clamp(64px, 9vw, 120px); }

.run-track { padding: clamp(40px, 5vw, 64px) 0 clamp(72px, 9vw, 120px); }

/* The meter doubles as the run's table of contents: six segments, one per
   stage, each filling as its stage is crossed. Without scripts they are
   plain anchors into the stage list. */
.run-meter {
  display: flex;
  align-items: flex-start;
  gap: clamp(18px, 3vw, 44px);
  margin-bottom: 28px;
  font: 500 11.5px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}
.run-count { flex: none; padding-top: 1px; white-space: nowrap; }
.run-count b { display: inline-block; min-width: 2ch; font-weight: 500; color: var(--fg); }

.run-steps {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}
.run-steps a {
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
  color: var(--mute);
  transition: color 0.3s ease;
}
.run-steps a > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding-top: 1px; }
.run-steps i { font-style: normal; margin-right: 8px; opacity: 0.6; }
.run-steps b { font-weight: 500; }
.run-steps a:hover,
.run-steps a.is-active { color: var(--fg); }
.run-steps a.is-done { color: var(--fg-2); }
.run-steps em { position: relative; display: block; height: 2px; background: var(--line); overflow: hidden; }
.run-steps s {
  position: absolute;
  inset: 0;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left center;
}
@media (max-width: 760px) {
  .run-steps b { display: none; }
  .run-steps i { margin: 0; }
}
@media (max-width: 480px) { .run-count { display: none; } }

/* Base state — narrow screens, reduced motion, no scripts — is a hairline
   table of the six stages. The pinned horizontal lane is an upgrade that
   landing.js applies, and only then. */
.run-lane {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: calc(var(--shell) - 2 * var(--gut));
  margin: 0 auto;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 1100px) { .run-lane { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .run-lane { grid-template-columns: 1fr; } }
@media (max-width: 1520px) { .run-lane { margin-inline: var(--gut); } }

.stage {
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 2.4vw, 32px);
  background: var(--bg);
}

/* On the stacked layout the meter rides along under the nav. */
.run-track:not(.is-pinned) .run-meter {
  position: sticky;
  top: 57px;
  z-index: 5;
  padding-block: 16px 14px;
  margin-bottom: 14px;
  background: var(--bg);
}
.run-track:not(.is-pinned) .stage { scroll-margin-top: 130px; }

.run-track.is-pinned {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 84px 40px;
}
.run-track.is-pinned .run-lane {
  display: flex;
  width: max-content;
  max-width: none;
  margin: 0;
  padding: 0 var(--edge);
  gap: 0;
  background: none;
  border: 0;
  will-change: transform;
}
.run-track.is-pinned .stage {
  width: clamp(340px, 29vw, 440px);
  min-height: min(62svh, 560px);
  border-left: 1px solid var(--line);
}
.run-track.is-pinned .stage:last-child { border-right: 1px solid var(--line); }
.run-track.is-pinned .stage:not(.is-active) { opacity: 0.42; }
.run-track.is-pinned .stage { transition: opacity 0.6s var(--ease); }

/* The wire runs along the top edge of the lane. A node sits where each
   stage begins; the head is the run itself, and it lights each node as it
   crosses it. Nodes are placed by landing.js. */
.run-wire,
.run-reticle { display: none; }
.run-track.is-pinned .run-lane { position: relative; }
.run-track.is-pinned .run-wire {
  display: block;
  position: absolute;
  top: 0;
  left: var(--edge);
  right: var(--edge);
  z-index: 3;
  height: 1px;
  background: var(--line);
  pointer-events: none;
}
.run-wire-fill {
  position: absolute;
  inset: -0.5px 0 auto;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 74, 28, 0.15), var(--signal));
  transform: scaleX(0);
  transform-origin: left center;
}
.run-node {
  position: absolute;
  top: 0;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  background: var(--bg);
  border: 1px solid var(--mute);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.run-node-end { width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; }
.run-node.is-on { background: var(--signal); border-color: var(--signal); }
.run-head {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  background: var(--signal);
  box-shadow: 0 0 0 3px rgba(255, 74, 28, 0.2), 0 0 26px 6px rgba(255, 74, 28, 0.45);
}
.run-head::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1px solid var(--signal);
  animation: run-ping 1.8s var(--ease) infinite;
}
@keyframes run-ping {
  from { transform: scale(0.35); opacity: 0.9; }
  to { transform: scale(1.7); opacity: 0; }
}

/* The reticle is the brand mark taken apart: its four arms, locked onto
   the corners of the stage that is running. landing.js moves it. */
.run-track.is-pinned .run-reticle {
  display: block;
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  z-index: 2;
  pointer-events: none;
}
.run-reticle svg { position: absolute; width: 22px; height: 22px; fill: var(--signal); }
.run-reticle svg:nth-child(1) { top: 0; left: 0; }
.run-reticle svg:nth-child(2) { top: 0; right: 0; }
.run-reticle svg:nth-child(3) { bottom: 0; left: 0; }
.run-reticle svg:nth-child(4) { bottom: 0; right: 0; }

.stage-no {
  font: 900 clamp(64px, 6.4vw, 108px)/0.8 var(--dot);
  letter-spacing: -0.02em;
}
.stage-end .stage-no { color: var(--signal); }
/* Live states: a stage that has not run yet is drawn in outline, and says so. */
.run-track.is-live .stage { position: relative; }
.run-track.is-live .stage-no {
  color: transparent;
  -webkit-text-stroke: 1px var(--mute);
  transition: color 0.45s ease, -webkit-text-stroke-color 0.45s ease;
}
.run-track.is-live .stage.is-active .stage-no,
.run-track.is-live .stage.is-done .stage-no { color: var(--fg); -webkit-text-stroke-color: transparent; }
.run-track.is-live .stage-end.is-active .stage-no { color: var(--signal); }

.stage-state {
  position: absolute;
  top: clamp(22px, 2.4vw, 32px);
  right: clamp(22px, 2.4vw, 32px);
  display: flex;
  align-items: center;
  gap: 8px;
  font: 500 10.5px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
}
.stage-state::before { content: ""; width: 6px; height: 6px; background: currentColor; }
.stage.is-done .stage-state { color: var(--fg-2); }
.stage.is-active .stage-state { color: var(--signal); }
.stage.is-active .stage-state::before { animation: run-blink 1s step-end infinite; }
@keyframes run-blink { 50% { opacity: 0; } }
.stage-tag {
  margin-top: clamp(22px, 3vw, 40px);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal);
}
.stage h3 {
  margin: 10px 0 16px;
  font-family: var(--display);
  font-stretch: 70%;
  font-weight: 800;
  font-size: clamp(1.7rem, 2.3vw, 2.25rem);
  line-height: 0.92;
  text-transform: uppercase;
}
.stage p:not(.stage-tag) { color: var(--fg-2); font-size: 15px; line-height: 1.6; }
.stage-facts { margin-top: auto; padding-top: 28px; }
.stage-facts li {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font: 400 12px/1.4 var(--mono);
  color: var(--mute);
}
.stage-facts li::before { content: "+"; color: var(--signal); flex: none; }

/* --------------------------------------------------------------- arsenal -- */

.arsenal { padding: clamp(64px, 9vw, 120px) 0 clamp(80px, 10vw, 140px); }

.units {
  --u: clamp(9px, 2.1vw, 30px);
  --ug: clamp(2px, 0.3vw, 4px);
  margin: clamp(44px, 6vw, 80px) 0 0;
  border-top: 1px solid var(--fg);
}
.units-head, .units-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  font: 500 11.5px/1.3 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.units-head { border-bottom: 1px solid var(--line); }
.units-read { color: var(--signal); text-align: right; }
.units-foot { border-top: 1px solid var(--fg); color: var(--mute); }
.units-foot b { font: 900 1.6em/1 var(--dot); color: var(--fg); vertical-align: -0.12em; }

.units-rows li {
  display: grid;
  grid-template-columns: 44px minmax(150px, 240px) minmax(0, 1fr) 64px;
  align-items: center;
  column-gap: var(--gap);
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  transition: opacity 0.2s ease;
}
.units-rows li:last-child { border-bottom: 0; }
.u-i { font: 500 11.5px/1 var(--mono); color: var(--mute); }
.u-name { font-size: 15px; font-weight: 500; }
.u-c {
  justify-self: end;
  font: 900 clamp(1.5rem, 2.2vw, 2.1rem)/1 var(--dot);
  font-variant-numeric: tabular-nums;
}
.u-cells { display: flex; flex-wrap: wrap; gap: var(--ug); }
.u-cells i {
  width: var(--u);
  height: var(--u);
  background: var(--fg);
  transition: background 0.15s ease, transform 0.15s ease;
}
/* Before (or without) the script, a row is drawn as a strip of the same
   squares, so the figure reads the same with nothing running. */
.u-cells:empty {
  height: var(--u);
  width: calc(var(--n) * (var(--u) + var(--ug)));
  max-width: 100%;
  background: repeating-linear-gradient(90deg, var(--fg) 0 var(--u), transparent var(--u) calc(var(--u) + var(--ug)));
}

.units[data-focus] .units-rows li { opacity: 0.3; }
.units[data-focus] .units-rows li.is-on { opacity: 1; }
.units-rows li.is-on .u-cells i { background: var(--signal); }
.units-rows li.is-on .u-c { color: var(--signal); }
.u-cells i.is-hot { background: var(--fg) !important; transform: scale(1.35); }

@media (max-width: 760px) {
  .units-rows li { grid-template-columns: 30px minmax(0, 1fr) auto; row-gap: 10px; }
  .u-cells { grid-column: 2 / -1; }
  .u-c { grid-row: 1; grid-column: 3; }
  .units-head { flex-direction: column; }
  .units-read { text-align: left; }
}

/* ----------------------------------------------------------------- proof -- */

.proof {
  padding: clamp(64px, 9vw, 120px) 0 clamp(80px, 10vw, 140px);
  background: var(--paper-2);
  --bg: var(--paper-2);
}

.slips {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(20px, 3vw, 48px);
  align-items: start;
  margin-top: clamp(44px, 6vw, 80px);
}
@media (max-width: 900px) { .slips { grid-template-columns: 1fr; } }

.slip {
  position: relative;
  background: var(--sheet);
  border: 1px solid var(--night);
  color: var(--night);
}
.slip-head {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  border-bottom: 1px solid var(--night);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.slip-head > * { padding: 11px 12px; border-right: 1px solid var(--line); }
.slip-head > :last-child { border-right: 0; }
.slip-head span { color: var(--mute); }
.slip-head b { font-weight: 500; }

.slip h3 {
  padding: 24px 22px 0;
  font-family: var(--display);
  font-stretch: 70%;
  font-weight: 800;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  line-height: 0.92;
  text-transform: uppercase;
  text-wrap: balance;
}
.slip-body { padding: 14px 22px 0; font-size: 15px; line-height: 1.6; color: var(--fg-2); }

.slip-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 26px;
  padding: 12px 22px;
  border-top: 1px solid var(--night);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.slip-foot span { color: var(--mute); }
.slip-foot b { font-weight: 500; }
.slip-foot .sev { color: var(--signal); }

/* A held hypothesis is printed as what it is: hatched out. */
.slip-held {
  background:
    repeating-linear-gradient(-45deg, transparent 0 8px, rgba(15, 15, 13, 0.07) 8px 9px),
    var(--sheet);
  color: var(--mute);
  border-color: rgba(15, 15, 13, 0.45);
}
.slip-held .slip-head, .slip-held .slip-foot { border-color: rgba(15, 15, 13, 0.3); }
.slip-held .slip-body { color: var(--mute); }
.slip-verdict {
  display: flex;
  gap: 8px;
  padding: 11px 22px;
  border-top: 1px solid rgba(15, 15, 13, 0.3);
  background: var(--paper-2);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--night);
}

.slip-conf h3 { padding-right: clamp(22px, 13vw, 190px); }
.evidence { margin-top: 22px; }
.evidence li {
  display: grid;
  grid-template-columns: 28px auto minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 10px 22px;
  border-top: 1px solid var(--line);
  font: 400 12.5px/1.4 var(--mono);
}
.evidence li > span:last-child { justify-self: end; text-align: right; color: var(--mute); }
.ev-n { color: var(--mute); }
.ev-hit { background: rgba(255, 74, 28, 0.1); }
.ev-hit > span:last-child { color: var(--night) !important; }
.ev-hit .ev-n { color: var(--signal); }
@media (max-width: 520px) {
  .evidence li { grid-template-columns: 24px 1fr; }
  .evidence li > span:last-child { grid-column: 2; justify-self: start; text-align: left; }
}

/* The rubber stamp. Multiply and a noise mask make it read as ink pressed
   into the sheet rather than a badge laid on top. */
.stamp {
  position: absolute;
  top: 54px;
  right: clamp(12px, 2vw, 26px);
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 10px 14px 8px;
  border: 3px solid var(--signal);
  outline: 1.5px solid var(--signal);
  outline-offset: 3px;
  color: var(--signal);
  transform: rotate(-8deg);
  mix-blend-mode: multiply;
  pointer-events: none;
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feComponentTransfer><feFuncA type='discrete' tableValues='0 1 1 1 1 1 1'/></feComponentTransfer></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feComponentTransfer><feFuncA type='discrete' tableValues='0 1 1 1 1 1 1'/></feComponentTransfer></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
}
.stamp span {
  font: 900 clamp(22px, 2.4vw, 32px)/0.9 var(--display);
  font-stretch: 62%;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.stamp small {
  font: 500 9px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
@media (max-width: 520px) { .stamp { top: 50px; transform: rotate(-8deg) scale(0.82); transform-origin: right top; } }

.proof-note {
  margin-top: 28px;
  max-width: 60ch;
  font: 400 12.5px/1.6 var(--mono);
  color: var(--mute);
}

/* ---------------------------------------------------------- capabilities -- */

.caps { padding: clamp(64px, 9vw, 120px) 0 clamp(80px, 10vw, 140px); }
.caps .h2 { margin-top: clamp(28px, 4vw, 52px); }

.caps-list { margin-top: clamp(36px, 5vw, 64px); border-top: 1px solid var(--line); }
.caps-list li {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 12px;
  align-items: baseline;
  padding: clamp(20px, 2.6vw, 30px) 0;
  border-bottom: 1px solid var(--line);
}
.c-n { grid-column: 1; grid-row: 1; font: 500 12px/1 var(--mono); color: var(--signal); }
.c-tag {
  grid-column: 1;
  grid-row: 2;
  font: 500 10.5px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}
.c-tag em {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 5px;
  border: 1px solid var(--signal);
  font-style: normal;
  color: var(--signal);
}
.caps-list h3 {
  grid-column: 2 / span 7;
  grid-row: 1 / span 2;
  font-family: var(--display);
  font-stretch: 66%;
  font-weight: 800;
  font-size: clamp(1.8rem, 3.6vw, 3.5rem);
  line-height: 1.04;
  text-transform: uppercase;
  text-wrap: balance;
}
.caps-list p:not(.c-tag) {
  grid-column: 9 / span 4;
  grid-row: 1 / span 2;
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg-2);
}
/* Each capability is underlined in signal. The line is a background on the
   inline span, so it follows the text across line breaks, and landing.js can
   draw it by growing background-size. */
.mark {
  background: linear-gradient(var(--signal), var(--signal)) no-repeat 0 100% / 100% 0.08em;
  padding-bottom: 0.04em;
}
@media (max-width: 860px) {
  .c-n, .c-tag { grid-row: auto; }
  .c-n { grid-column: 1 / span 2; }
  .c-tag { grid-column: 3 / -1; grid-row: 1; }
  .caps-list h3, .caps-list p:not(.c-tag) { grid-column: 1 / -1; grid-row: auto; }
}

/* ------------------------------------------------------------------- end -- */

.end { padding: clamp(64px, 9vw, 120px) 0 clamp(80px, 10vw, 140px); }
.end-title {
  margin-top: clamp(28px, 4vw, 52px);
  font-family: var(--display);
  font-stretch: 62%;
  font-weight: 800;
  font-size: clamp(3.4rem, 11vw, 11.5rem);
  line-height: 0.84;
  text-transform: uppercase;
  max-width: 12ch;
}
.end-access {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(28px, 4vw, 48px);
  border-top: 1px solid var(--line);
}
.end-access > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--line);
}
.end-access > div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.end-access dt {
  font: 500 10.5px/1.3 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}
.end-access dd { font: 800 clamp(1.3rem, 2.4vw, 2rem)/1 var(--display); font-stretch: 66%; text-transform: uppercase; }
.end-access dd.is-free { color: var(--signal); }
.end-access p { max-width: 34ch; font-size: 14px; line-height: 1.5; color: var(--fg-2); }
@media (max-width: 640px) {
  .end-access { grid-template-columns: 1fr; }
  .end-access > div + div { padding-left: 0; border-left: 0; }
}
.end-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 40px;
  align-items: start;
  margin-top: clamp(32px, 4vw, 56px);
  padding-top: 20px;
  border-top: 1px solid var(--fg);
}
.end-copy {
  grid-column: 1 / span 5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}
.end-steps { width: 100%; border-top: 1px solid var(--line); }
.end-steps li {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--fg-2);
}
.end-steps span { font: 500 12px/1.6 var(--mono); color: var(--signal); }

/* --- request card ------------------------------------------------------ */
/* A paper slip like the Proof ones: a form you fill in rather than a page
   of inputs. Labels in mono, fields as ruled lines, square everything. */

.req {
  grid-column: 7 / span 6;
  position: relative;
  background: var(--sheet);
  border: 1px solid var(--night);
  color: var(--night);
}
.req-head {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  border-bottom: 1px solid var(--night);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.req-head > * { padding: 11px 12px; border-right: 1px solid var(--line); }
.req-head > :last-child { border-right: 0; min-width: 9ch; }
.req-head span { color: var(--mute); }
.req-head b { font-weight: 500; }
.req.is-sent .req-head > :last-child { background: var(--signal); }

.req-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 22px;
  padding: 10px 22px 4px;
}
.req-wide { grid-column: 1 / -1; }
.req-f {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 14px 0 0;
  border: 0;
  min-width: 0;
}
.req-f > span, .req-f legend {
  padding: 0;
  font: 500 10.5px/1.3 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}
.req-f input, .req-f textarea {
  width: 100%;
  padding: 7px 0 8px;
  border: 0;
  border-bottom: 1px solid var(--night);
  border-radius: 0;
  background: transparent;
  color: var(--night);
  font: 400 16px/1.4 var(--sans);
  outline: 0;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.req-f input::placeholder, .req-f textarea::placeholder { color: rgba(15, 15, 13, 0.3); }
.req-f input:focus, .req-f textarea:focus { border-color: var(--signal); box-shadow: 0 1px 0 var(--signal); }
.req-f.is-bad > span, .req-f.is-bad legend { color: var(--signal); }
.req-f.is-bad input, .req-f.is-bad textarea { border-color: var(--signal); box-shadow: 0 1px 0 var(--signal); }

.req-chips { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.req-chips legend { width: 100%; margin-bottom: 8px; float: left; }
.req-chips label { position: relative; cursor: pointer; }
.req-chips input { position: absolute; opacity: 0; pointer-events: none; }
.req-chips label span {
  display: inline-block;
  padding: 7px 10px;
  border: 1px solid var(--line);
  font: 500 11.5px/1 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-2);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.req-chips label:hover span { border-color: var(--night); }
.req-chips input:checked + span { background: var(--night); border-color: var(--night); color: var(--paper); }
.req-chips input:focus-visible + span { outline: 2px solid var(--signal); outline-offset: 2px; }

.req-own {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--fg-2);
  cursor: pointer;
}
.req-own input {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--signal);
}
.req-own.is-bad { color: var(--signal); }

.req-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
  padding: 14px 22px;
  border-top: 1px solid var(--night);
}
.req-foot .btn { flex: none; }
.req-foot .btn:disabled { opacity: 0.55; cursor: progress; }
.req-msg { font: 400 11.5px/1.45 var(--mono); color: var(--mute); }
.req-msg.is-bad { color: var(--signal); }

.req-done { position: relative; padding: 28px 22px 8px; min-height: 260px; }
.req-ref { font: 500 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); }
.req-ref b { font-weight: 500; color: var(--night); }
.req-done h3 {
  margin-top: 18px;
  font: 800 clamp(2rem, 4vw, 3.4rem)/0.9 var(--display);
  font-stretch: 62%;
  text-transform: uppercase;
}
.req-done > p:not(.req-ref) { margin-top: 14px; max-width: 34ch; color: var(--fg-2); }
.req-stamp { top: auto; bottom: 18px; }

@media (max-width: 960px) {
  .end-copy, .req { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .req-fields { grid-template-columns: 1fr; padding-inline: 16px; }
  .req-head { grid-template-columns: auto 1fr; }
  .req-head > :nth-child(2) { border-right: 0; }
  .req-head > :nth-child(n + 3) { border-top: 1px solid var(--line); }
  .req-foot { flex-direction: column-reverse; align-items: stretch; padding-inline: 16px; }
  .req-foot .btn { justify-content: center; }
  .req-done { padding-inline: 16px; }
}

/* ---------------------------------------------------------------- footer -- */

.foot { padding-top: clamp(48px, 6vw, 80px); overflow: hidden; }
.foot-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 32px;
  padding-top: 14px;
  border-top: 1px solid var(--fg);
}
.foot-grid > div { grid-column: span 2; display: grid; align-content: start; gap: 8px; }
.foot-grid > .foot-note { grid-column: 9 / span 4; }
.foot-grid a { font-size: 15px; justify-self: start; }
.foot-grid a:hover { color: var(--signal); }
.foot-label {
  margin-bottom: 6px;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}
.foot-note p:not(.foot-label) { font: 400 12.5px/1.6 var(--mono); color: var(--fg-2); max-width: 44ch; }
@media (max-width: 900px) {
  .foot-grid > div { grid-column: span 4; }
  .foot-grid > .foot-note { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .foot-grid > div { grid-column: span 6; }
}

/* The wordmark runs the full width of the shell; landing.js sizes it to fit
   exactly, this is the close-enough size it starts from. */
.wordmark {
  margin: clamp(48px, 7vw, 96px) 0 0;
  font-family: var(--display);
  font-stretch: 62%;
  font-weight: 900;
  font-size: 31vw;
  line-height: 0.74;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: -0.01em;
  margin-bottom: -0.05em;
}
.wordmark span { display: block; width: max-content; }

/* ------------------------------------------------- animation from-states -- */
/* Only the plain reveals are hidden up front, and only while html.js is set.
   Everything else (bars, underlines, the stamp) is drawn by default and given a
   from-state by GSAP at runtime, so no fallback path can leave it missing. */

html.js [data-rise] { opacity: 0; }
html.js [data-split] { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  html.js [data-rise] { opacity: 1 !important; transform: none !important; }
  html.js [data-split] { visibility: visible !important; }
  .btn::before, .arr, .link-under, .nav-links a { transition: none; }
}
