@font-face {
  font-family: "Big Shoulders Stencil";
  src: url("/assets/fonts/big-shoulders-stencil-300-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #f5f4f1;
  --ink: #171718;
  --muted-paper: #acaeaf;
  --hairline: #bfc1c2;
  --cyan: #009fe3;
  --cyan-dark: #006f9f;
  --magenta: #b10e53;
  --amber: #ffbd21;
  --focus: #fff068;
  font-family: "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  background: var(--ink);
  accent-color: var(--cyan);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
}

button,
input,
select { font: inherit; }

button,
a,
select,
label { -webkit-tap-highlight-color: transparent; }

a { color: inherit; text-underline-offset: 0.18em; }

::selection { color: var(--ink); background: var(--amber); }

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

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  color: var(--ink);
  background: var(--focus);
  transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

.preflight-stage {
  position: relative;
  height: min(100svh, 62.55vw);
  min-height: 720px;
  overflow: hidden;
  isolation: isolate;
  background: var(--paper);
}

.proof-field,
.diagnostic-field {
  position: absolute;
  inset-block: 0;
}

.proof-field {
  left: 0;
  width: 53.5%;
  color: var(--ink);
  background: var(--paper);
  border-right: 1px solid #09090a;
}

.diagnostic-field {
  right: 0;
  width: 46.5%;
  color: var(--paper);
  background: var(--ink);
}

.diagnostic-field::after {
  content: "";
  position: absolute;
  z-index: -1;
  bottom: -1px;
  left: 42%;
  width: 3rem;
  height: 1.4rem;
  background: var(--paper);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.brand {
  position: absolute;
  z-index: 4;
  top: 3.4%;
  left: 5%;
  margin: 0;
  font-size: clamp(2rem, 3.7vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

h1 {
  position: absolute;
  z-index: 8;
  top: 11%;
  left: 40%;
  width: 58%;
  margin: 0;
  color: #e8e8e7;
  font-family: "Big Shoulders Stencil", "Arial Narrow", sans-serif;
  font-size: clamp(3.8rem, 4.7vw, 5rem);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.025em;
  mix-blend-mode: difference;
  pointer-events: none;
  text-wrap: balance;
}

h1 span { display: block; }
h1 span:last-child { margin-left: 18%; }

.sample-label {
  position: absolute;
  top: 8%;
  left: 12.8%;
  color: #555658;
  font-size: 1rem;
}

.source-window {
  position: absolute;
  top: 22%;
  left: 12.8%;
  width: 69%;
  max-height: 56%;
  overflow: hidden;
  border: 1px solid var(--hairline);
  background: #fafaf8;
}

.source-window::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0 0 auto;
  height: 2px;
  opacity: 0;
  background: var(--cyan);
  pointer-events: none;
}

.source-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-family: Consolas, "Courier New", monospace;
  font-size: clamp(0.75rem, 1.3vw, 1.3rem);
  font-variant-numeric: tabular-nums;
}

.source-table th,
.source-table td {
  height: 2.65rem;
  padding: 0.5rem 0.75rem;
  overflow: hidden;
  border-right: 1px solid #d3d4d4;
  border-bottom: 1px solid #d3d4d4;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-table thead th { background: #dceefa; font-size: 1rem; }
.source-table thead th:last-child { box-shadow: inset 0 0 0 2px var(--magenta); }
.source-table td { letter-spacing: -1px; }
.source-table .row-number { width: 3rem; color: #5d5e60; text-align: right; }
.source-table th:nth-child(2) { width: 34%; }
.source-table th:nth-child(3) { width: 34%; }
.source-table .scan-row { box-shadow: inset 0 0 0 2px var(--cyan); }
.source-table .scan-row .row-number { color: white; background: var(--cyan); }
.source-table tr[data-flagged="true"] td:last-child { box-shadow: inset 0 0 0 2px var(--amber); }

.scan-controls {
  position: absolute;
  top: 33.6%;
  right: auto;
  left: 2%;
  width: 82.5%;
  display: grid;
  grid-template-columns: minmax(0, 55%) minmax(0, 42%);
  gap: 3%;
}

.file-control,
.sample-control,
.purchase-control {
  position: relative;
  min-height: 4.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.1rem;
  border: 1px solid #8c9092;
  border-radius: 5px;
  font-size: clamp(0.95rem, 1.45vw, 1.25rem);
  font-weight: 700;
  cursor: pointer;
}

.file-control input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-control:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }

.control-icon,
.control-chevron,
.download-icon { flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: square; stroke-linejoin: miter; }
.control-icon { width: 1.7rem; height: 2rem; margin-right: 0.8rem; }
.control-chevron { width: 1rem; height: 0.65rem; margin-left: auto; }

.sample-control {
  color: #fff;
  border-color: var(--cyan);
  background: var(--cyan);
}

.search-icon { width: 1.9rem; height: 1.9rem; }

.sample-control:hover { background: #005f88; }
.file-control:hover,
.purchase-control:hover { border-color: var(--paper); background: #272829; }

.delimiter-control {
  position: absolute;
  top: calc(100% + 0.65rem);
  right: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted-paper);
  font-size: 0.78rem;
}

.delimiter-control select {
  min-height: 2.25rem;
  color: var(--paper);
  border: 1px solid #6b6d6e;
  border-radius: 3px;
  background: var(--ink);
}

.privacy-note,
.result-meta {
  position: absolute;
  left: 5%;
  margin: 0;
  color: var(--muted-paper);
}

.privacy-note { top: 41.5%; font-size: 1.3rem; }
.result-meta { top: 47%; font-family: Consolas, monospace; font-size: 0.76rem; }

.findings-panel {
  position: absolute;
  top: 49.5%;
  right: 8%;
  left: 2%;
}

.findings-panel h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.45rem, 2.1vw, 2rem);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1;
}

.findings-list { display: grid; gap: 0.75rem; }

.finding-row {
  display: grid;
  grid-template-columns: 4.6rem 1fr;
  min-height: 3.95rem;
  align-items: stretch;
  color: var(--paper);
  border: 1px solid #545657;
  border-radius: 3px;
}

.finding-coordinate {
  display: grid;
  place-items: center;
  min-width: 4.6rem;
  color: #fff;
  background: var(--magenta);
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.finding-row[data-severity="review"] .finding-coordinate { color: var(--ink); background: var(--amber); }
.finding-row[data-severity="note"] .finding-coordinate { color: var(--ink); background: var(--cyan); }

.finding-copy {
  display: grid;
  align-content: center;
  gap: 0.2rem;
  padding: 0.6rem 1rem;
}

.finding-copy strong { font-size: clamp(0.95rem, 1.35vw, 1.15rem); }
.finding-copy small { color: var(--muted-paper); font-family: Consolas, monospace; }

.purchase-control {
  position: absolute;
  top: 80%;
  right: 5%;
  bottom: auto;
  width: 76.5%;
  color: var(--paper);
  text-decoration: none;
  background: transparent;
}

.download-icon { width: 2.8rem; height: 2.5rem; margin-right: 1rem; stroke-width: 3; }
.purchase-control { min-height: 4.2rem; font-size: clamp(1.05rem, 1.5vw, 1.35rem); }

.checkout-status {
  position: absolute;
  right: 5%;
  bottom: 4.5%;
  width: 68%;
  margin: 0;
  color: var(--amber);
  font-size: 0.85rem;
  text-align: center;
}

.connector-lines {
  position: absolute;
  z-index: 7;
  top: 22%;
  left: 43%;
  width: 13%;
  height: 55%;
  overflow: visible;
  pointer-events: none;
}

.connector-lines path {
  fill: none;
  stroke: var(--magenta);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.connector-lines .connector-warning { stroke: var(--amber); }

.calibration { position: absolute; display: flex; border: 1px solid #222; }
.calibration span:nth-child(1) { background: var(--cyan); }
.calibration span:nth-child(2) { background: var(--magenta); }
.calibration span:nth-child(3) { background: #ffe000; }
.calibration span:nth-child(4) { background: #111; }
.calibration span:nth-child(5) { background: #777; }
.calibration span:nth-child(6) { background: #c7c7c7; }
.calibration span:nth-child(7) { background: #e6e6e6; }
.calibration span:nth-child(8) { background: #fafafa; }
.calibration-vertical { top: 9%; left: 2.4%; width: 1.7rem; height: 27%; flex-direction: column; }
.calibration-horizontal { bottom: 4%; left: 12.8%; width: 33%; height: 1.1rem; }
.calibration span { flex: 1; }

.registration {
  position: absolute;
  width: 1.7rem;
  height: 1.7rem;
  border: 1px solid #222;
  border-radius: 50%;
}

.registration::before,
.registration::after { content: ""; position: absolute; background: #222; }
.registration::before { top: 50%; left: -0.55rem; width: 2.7rem; height: 1px; }
.registration::after { top: -0.55rem; left: 50%; width: 1px; height: 2.7rem; }
.registration-top { top: 2.8%; left: 50%; }
.registration-mid { top: 48%; left: 2.8%; }

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

[hidden] { display: none !important; }

.argument-section,
.scope-section,
.method-strip,
.offer-section,
.questions-section,
footer {
  padding: clamp(4.5rem, 9vw, 9rem) max(1.25rem, calc((100vw - 1240px) / 2));
}

.argument-section {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(20rem, 0.8fr);
  gap: clamp(3rem, 8vw, 8rem);
  color: var(--ink);
  background: var(--paper);
}

.argument-intro h2,
.scope-copy h2,
.method-strip h2,
.offer-section h2,
.questions-section h2 {
  max-width: 15ch;
  margin: 0 0 1.4rem;
  font-size: clamp(2.5rem, 5.4vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.argument-intro p,
.scope-copy p,
.method-strip p,
.questions-section p {
  max-width: 66ch;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.65;
}

.check-flow {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
  list-style: none;
  counter-reset: checks;
}

.check-flow li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.35rem 1rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--ink);
  counter-increment: checks;
}

.check-flow li::before {
  content: counter(checks, decimal-leading-zero);
  grid-row: span 2;
  color: var(--cyan-dark);
  font-family: Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.check-flow strong { font-size: 1.25rem; }
.check-flow span { color: #555658; line-height: 1.5; }

.scope-section {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(3rem, 8vw, 8rem);
  color: var(--paper);
  background: #242527;
}

.scope-ledger { border-top: 1px solid #707275; }
.scope-ledger > div { display: grid; grid-template-columns: 10rem 1fr; gap: 1.5rem; padding: 1.5rem 0; border-bottom: 1px solid #707275; }
.scope-ledger h3,
.scope-ledger p { margin: 0; }
.scope-ledger h3 { color: var(--cyan); font-size: 1rem; text-transform: uppercase; }
.scope-ledger p { max-width: 64ch; color: #dededb; line-height: 1.65; }

.method-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);
  color: var(--ink);
  background: #dceefa;
}

.method-strip img { width: 100%; height: auto; border: 1px solid #9ca5aa; }
.method-strip h2 { font-size: clamp(2.5rem, 4.4vw, 4.6rem); }
.method-strip a { display: inline-block; margin-top: 1rem; font-weight: 800; }

.offer-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(23rem, 0.78fr);
  gap: clamp(3rem, 8vw, 8rem);
  color: var(--paper);
  background: var(--ink);
}

.offer-section h2 { max-width: 12ch; }
.price { display: flex; align-items: baseline; gap: 0.7rem; margin: 2.5rem 0 0; color: var(--cyan); font-size: 1.35rem; }
.price span { font-size: clamp(4.5rem, 9vw, 8rem); font-weight: 900; letter-spacing: -0.04em; }
.offer-details { align-self: end; }
.offer-details ul { margin: 0 0 2rem; padding: 0; border-top: 1px solid #656769; list-style: none; }
.offer-details li { padding: 1rem 0; border-bottom: 1px solid #656769; line-height: 1.45; }
.offer-assurance { margin: 0 0 1.25rem; color: #d2d3d4; font-size: 0.95rem; line-height: 1.55; }
.buy-control {
  display: flex;
  min-height: 4rem;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.2rem;
  color: #fff;
  background: var(--cyan-dark);
  border: 1px solid var(--cyan);
  border-radius: 4px;
  font-size: 1.2rem;
  font-weight: 800;
  text-decoration: none;
}
.buy-control:hover { background: #005f88; }
.offer-details [role="status"] { min-height: 1.5rem; color: var(--amber); font-size: 0.9rem; }

.questions-section { color: var(--ink); background: var(--paper); }
.questions-section h2 { max-width: none; }
.question-list { max-width: 920px; margin-left: auto; border-top: 1px solid var(--ink); }
.question-list details { border-bottom: 1px solid var(--ink); }
.question-list summary { padding: 1.4rem 2.5rem 1.4rem 0; font-size: 1.2rem; font-weight: 800; cursor: pointer; }
.question-list p { margin: 0 0 1.5rem; }

footer {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem 4rem;
  align-items: start;
  padding-block: 3rem;
  color: var(--paper);
  background: #0d0d0e;
}

.footer-brand { display: flex; align-items: center; gap: 0.7rem; font-size: 1.2rem; font-weight: 800; text-decoration: none; }
.footer-brand img { color: var(--cyan); }
footer nav { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; justify-content: flex-end; }
footer p { grid-column: 1 / -1; margin: 0; color: #aeb0b1; }

@media (max-width: 760px) {
  .preflight-stage { height: auto; min-height: auto; overflow: visible; background: var(--ink); }
  .proof-field,
  .diagnostic-field { position: relative; width: 100%; }
  .proof-field { min-height: 30rem; border-right: 0; }
  .diagnostic-field { min-height: 62rem; padding-top: 1px; }
  .brand { top: 2rem; left: 1.25rem; }
  h1 { top: 36rem; left: 1.25rem; width: calc(100% - 2.5rem); color: var(--paper); font-size: clamp(3rem, 13vw, 4rem); mix-blend-mode: normal; }
  h1 span:last-child { margin-left: 0; }
  .source-window { top: 8rem; left: 1.25rem; width: calc(100% - 2.5rem); max-height: 20rem; overflow: auto; }
  .source-table { min-width: 37rem; }
  .sample-label { top: 2rem; left: 1.25rem; }
  .calibration,
  .registration,
  .connector-lines { display: none; }
  .scan-controls { top: 20rem; left: 1.25rem; right: 1.25rem; width: auto; grid-template-columns: 1fr; }
  .file-control,
  .sample-control { min-height: 3.3rem; }
  .delimiter-control { position: static; justify-content: flex-start; }
  .privacy-note { top: 30rem; left: 1.25rem; }
  .result-meta { top: 32rem; left: 1.25rem; }
  .findings-panel { top: 34rem; left: 1.25rem; right: 1.25rem; }
  .finding-row { grid-template-columns: 3.5rem 1fr; }
  .finding-coordinate { min-width: 3.5rem; }
  .purchase-control { position: absolute; top: 52.5rem; right: auto; bottom: auto; left: 1.25rem; width: calc(100% - 2.5rem); margin: 0; }
  .checkout-status { position: absolute; top: 58rem; right: auto; bottom: auto; left: 1.25rem; width: calc(100% - 2.5rem); margin: 0; }
  .argument-section,
  .scope-section,
  .method-strip,
  .offer-section { grid-template-columns: 1fr; }
  .argument-section,
  .scope-section,
  .method-strip,
  .offer-section,
  .questions-section,
  footer { padding-inline: 1.25rem; }
  .scope-ledger > div { grid-template-columns: 1fr; gap: 0.5rem; }
  .offer-section { grid-template-columns: minmax(0, 1fr); }
  .offer-details { min-width: 0; }
  footer { grid-template-columns: 1fr; }
  footer nav { justify-content: flex-start; }
  footer p { grid-column: auto; }
}

@media (prefers-reduced-motion: no-preference) {
  .scan-row { animation: scan-aperture 2.8s cubic-bezier(.16, 1, .3, 1) 1 both; }
  [data-scan-active="true"] .source-window::after { animation: scan-pass .8s cubic-bezier(.16, 1, .3, 1) both; }
  [data-scan-active="true"] .connector-lines path { stroke-dasharray: 700; animation: trace-findings .75s cubic-bezier(.16, 1, .3, 1) both; }
  @keyframes scan-aperture {
    0% { box-shadow: inset 0 0 0 0 transparent; }
    35%, 100% { box-shadow: inset 0 0 0 2px var(--cyan); }
  }
  @keyframes scan-pass {
    0% { opacity: 0; transform: translateY(0); }
    12% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; transform: translateY(28rem); }
  }
  @keyframes trace-findings { from { stroke-dashoffset: 700; } to { stroke-dashoffset: 0; } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .source-window::after { display: none; }
}
