:root {
  --ink: #0c0c0b;
  --ink-2: #161614;
  --paper: #f3efe4;
  --paper-2: #e6e0d2;
  --text: #f2efe8;
  --muted: #a39e94;
  --dim: #6f6b63;
  --line: rgba(242, 239, 232, 0.12);
  --line-strong: rgba(242, 239, 232, 0.22);
  --red: #e24a2a;
  --red-ink: #c5361c;
  --serif: "Instrument Serif", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Instrument Sans", "Avenir Next", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --max: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--sans);
  background: var(--ink);
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--red);
  z-index: 80;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 1px solid var(--red); outline-offset: 3px; }

.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.055;
  z-index: 70;
  mix-blend-mode: overlay;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; line-height: 0.96; }
h1 em, h2 em { font-style: italic; }

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker--ink { color: var(--red-ink); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 2px;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: #fff; }
.btn--line {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.btn--line:hover { background: rgba(242, 239, 232, 0.06); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: #000; }
.btn--inkline {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(12, 12, 11, 0.28);
}
.btn--inkline:hover { background: rgba(12, 12, 11, 0.05); }

/* nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(12, 12, 11, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: 15px;
}
.brand__sq {
  width: 9px;
  height: 9px;
  background: var(--red);
  display: inline-block;
  flex: none;
}
.nav__panel { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav__links { display: flex; gap: 22px; }
.nav__links a {
  color: var(--muted);
  font-size: 14px;
}
.nav__links a:hover { color: var(--text); }
.nav__mail {
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--text);
  padding-bottom: 1px;
}
.nav__mail:hover { color: var(--paper); border-color: var(--red); }
.nav__burger { display: none; margin-left: auto; width: 36px; height: 36px; flex-direction: column; justify-content: center; gap: 6px; }
.nav__burger span { display: block; height: 1px; background: var(--text); width: 18px; }

/* hero */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 88px 28px 72px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(3.1rem, 6.4vw, 5.4rem);
  margin: 18px 0 22px;
  max-width: 11ch;
}
.lede { color: var(--muted); font-size: 1.05rem; max-width: 42ch; }
.hero__actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

/* report sheet */
.sheet { position: relative; }
.sheet::before {
  content: "";
  position: absolute;
  inset: 18px -10px -14px 18px;
  background: #cfc8b6;
  transform: rotate(-1.6deg);
  z-index: 0;
}
.report {
  position: relative;
  z-index: 1;
  background: var(--paper);
  color: #1c1b17;
  padding: 26px 26px 18px;
  transform: rotate(1.1deg);
  box-shadow: 0 28px 50px -28px rgba(0, 0, 0, 0.8);
}
.report__head {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a7468;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(28, 27, 23, 0.14);
}
.report h2 { font-size: 2.4rem; margin-top: 16px; }
.report__who { font-size: 13px; color: #6f6a60; margin-top: 4px; }
.report__code {
  display: grid;
  grid-template-columns: 1fr 118px;
  gap: 10px;
  margin: 18px 0 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(28, 27, 23, 0.1);
  align-items: end;
}
.report ol {
  list-style: none;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.7;
  counter-reset: ln 41;
}
.report li {
  counter-increment: ln;
  display: flex;
  gap: 12px;
  padding: 0 6px;
}
.report li::before {
  content: counter(ln);
  color: #9a9488;
  min-width: 16px;
  text-align: right;
}
.report code { font-family: inherit; white-space: pre; }
.report li.hit {
  background: rgba(226, 74, 42, 0.1);
  box-shadow: inset 2px 0 0 var(--red);
}
.report__margin {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.25;
  color: var(--red-ink);
  padding-bottom: 8px;
}
.report__find { display: flex; gap: 14px; align-items: flex-start; }
.report__find p { font-size: 13.5px; line-height: 1.45; color: #3a3832; }
.report__find code {
  font-family: var(--mono);
  font-size: 12px;
  background: rgba(28, 27, 23, 0.06);
  padding: 0 4px;
}
.stamp {
  flex: none;
  margin-top: 2px;
  border: 1.5px solid var(--red);
  color: var(--red);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 5px 7px;
  transform: rotate(-8deg);
}
.report__foot {
  display: flex;
  gap: 16px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(28, 27, 23, 0.12);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7a7468;
}

/* facts */
.facts {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.facts div {
  padding: 22px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.facts div + div { border-left: 1px solid var(--line); padding-left: 28px; }
.facts b {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 12px;
  color: var(--red);
  letter-spacing: 0.08em;
}
.facts span { color: var(--text); font-size: 15px; }

/* pull */
.pull {
  max-width: var(--max);
  margin: 0 auto;
  padding: 96px 28px 40px;
}
.pull p {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 16ch;
  border-left: 2px solid var(--red);
  padding-left: 22px;
}

/* sections */
.section { max-width: var(--max); margin: 0 auto; padding: 72px 28px; }
.section__head { margin-bottom: 36px; max-width: 16ch; }
.section__head h2 { font-size: clamp(2.2rem, 4vw, 3.3rem); margin-top: 12px; }
.section__head.reveal, .method__copy { max-width: none; }
.section__head h2 { max-width: 16ch; }

.work { list-style: none; }
.work li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.work li:last-child { border-bottom: 1px solid var(--line); }
.work__n {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--dim);
  padding-top: 8px;
  transition: color 0.2s ease;
}
.work li:hover .work__n { color: var(--red); }
.work h3 { font-size: 2rem; margin-bottom: 8px; }
.work p { color: var(--muted); max-width: 62ch; font-size: 1.02rem; }

/* method */
.method {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: start;
}
.method h2 { font-size: clamp(2.2rem, 4vw, 3.3rem); margin: 12px 0 16px; max-width: 12ch; }
.passes { margin-top: 28px; display: flex; flex-direction: column; }
.passes div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.passes dt { font-family: var(--mono); font-size: 13px; color: var(--text); }
.passes dd { color: var(--muted); font-size: 0.95rem; }

.term {
  background: var(--ink-2);
  border: 1px solid var(--line);
  margin-top: 8px;
}
.term__bar {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
}
.log { padding: 16px 14px 18px; font-family: var(--mono); font-size: 12.5px; }
.log__cmd { color: #d9d4c8; margin-bottom: 12px; }
.log__row {
  display: grid;
  grid-template-columns: 26px 1.15fr 1.25fr 0.9fr;
  gap: 8px;
  padding: 3px 6px;
  color: #d9d4c8;
}
.log__row--bad { background: rgba(226, 74, 42, 0.12); }
.log__sum {
  display: flex;
  gap: 16px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.log__cov { color: var(--dim); margin-top: 6px; font-size: 12px; }
.dim { color: var(--dim); }
.ok { color: #c4bba8; }
.bad { color: var(--red); }

/* steps */
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--red);
  margin-bottom: 12px;
}
.steps span {
  display: block;
  font-family: var(--serif);
  font-size: 1.7rem;
  margin-bottom: 10px;
}
.steps p { color: var(--muted); font-size: 0.95rem; }

/* band */
.band {
  background: var(--paper);
  color: var(--ink);
  margin-top: 24px;
}
.band__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 88px 28px;
}
.band h2 { font-size: clamp(3.2rem, 7vw, 5.6rem); margin: 12px 0 16px; }
.band p { max-width: 36ch; font-size: 1.05rem; color: #3f3c36; }
.band__actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* faq */
.faq { border-top: 1px solid var(--line); max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 0;
  font-size: 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 18px;
  color: var(--muted);
  font-weight: 400;
}
.faq details[open] summary::after { content: "–"; color: var(--red); }
.faq p { color: var(--muted); padding: 0 0 20px; max-width: 62ch; }

/* footer */
.footer { border-top: 1px solid var(--line); }
.footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
}
.footer__inner span:last-child { margin-left: auto; }

/* reveal */
.js .reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.in { opacity: 1; transform: none; }
.js .sheet.reveal { transform: none; }
.js .sheet.reveal.in .report { animation: settle 0.8s ease both; }
@keyframes settle {
  from { transform: rotate(1.1deg) translateY(8px); }
  to { transform: rotate(1.1deg); }
}

@media (max-width: 900px) {
  .nav__burger { display: flex; }
  .nav__panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 8px 28px 22px;
    background: rgba(12, 12, 11, 0.97);
    border-bottom: 1px solid var(--line);
  }
  .nav.open .nav__panel { display: flex; }
  .nav__links { flex-direction: column; gap: 14px; }
  .hero, .method { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding-top: 48px; }
  .hero h1 { max-width: none; }
  .facts { grid-template-columns: 1fr; }
  .facts div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr 1fr; }
  .report { transform: none; }
  .sheet::before { display: none; }
  .report__code { grid-template-columns: 1fr; }
  .js .sheet.reveal.in .report { animation: none; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .work li { grid-template-columns: 40px 1fr; }
  .footer__inner { flex-wrap: wrap; }
  .footer__inner span:last-child { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
