/* analyze.css — FirstFold Website Analysis. Extends styles.css tokens.
   Breakpoints per contract §12: ≤640 · 641–1079 · ≥1080.
   Motion: entrances ≤16px, 200–400ms, var(--ease-paper); loops limited to
   the wire dot and the plate-develop sheen; all governed by
   prefers-reduced-motion at the bottom of this file. */

/* ============================================================
   STATE A · ARRIVAL
   ============================================================ */

.ax-hero { padding-bottom: clamp(56px, 7vw, 96px); }
.ax-hero[hidden] { display: none !important; }
.ax-hero .ax-title { max-width: 14ch; font-size: clamp(2.5rem, 6.2vw, 5.4rem); }
.ax-title em { font-style: italic; font-weight: 500; color: var(--red); }

.ax-form { width: 100%; max-width: 640px; margin-top: clamp(24px, 3.5vw, 44px); }

.ax-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.ax-inputrow { display: flex; gap: 10px; flex-wrap: wrap; }

.ax-url {
  flex: 1 1 280px;
  min-width: 0;
  font-family: var(--font-sans);
  font-size: 16.5px;
  color: var(--ink);
  background: var(--paper-raise);
  /* Control boundary is a deliberate drawn rule, not the decorative
     hairline token: #7A7263 holds ≥4.3:1 against both paper surfaces
     (WCAG 1.4.11 needs 3:1). Scoped to analyzer inputs only. */
  border: 1px solid #7A7263;
  padding: 15px 16px;
  transition: border-color 0.2s var(--ease-paper), box-shadow 0.2s var(--ease-paper);
}
/* Placeholder is real instructional text: solid ink-muted ≈7:1 on
   paper-raise (WCAG 1.4.3 needs 4.5:1), still lighter than typed ink. */
.ax-url::placeholder { color: var(--ink-muted); opacity: 1; }
.ax-url:focus-visible {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(194, 57, 29, 0.16);
}
.ax-url[aria-invalid="true"] { border-color: var(--red-deep); }

.ax-form-error {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--red-deep);
  margin-top: 12px;
}

/* — the promise, three columns — */
.ax-promise {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3.5vw, 44px);
  max-width: 980px;
  margin-top: clamp(64px, 9vw, 112px);
}
.ax-promise-col { border-top: 2px solid var(--ink); padding-top: 16px; }
.ax-promise-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.ax-promise-text {
  margin-top: 10px;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 34ch;
}

/* — Signal Lens: a bespoke physical metaphor for machine visibility — */
.ax-specimen { margin-top: clamp(56px, 8vw, 96px); max-width: 520px; }
.ax-lens-preview { margin-bottom: 0; }
.ax-lens-preview-art {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--ink-hairline);
  background: var(--paper-deep);
  box-shadow: 9px 12px 0 rgba(26, 23, 18, 0.06);
}
.ax-lens-preview-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ax-lens-preview-copy {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(14px, 2vw, 24px);
  border-top: 2px solid var(--ink);
  margin-top: 14px;
  padding-top: 14px;
}
.ax-lens-preview-copy strong {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.15;
}
.ax-lens-preview-copy span { color: var(--ink-muted); font-size: 0.94rem; line-height: 1.55; }

/* ============================================================
   STATES B–D · THE REVIEW, LIVE
   ============================================================ */

.ax-progress { padding: clamp(40px, 6vw, 72px) var(--pad-x) clamp(72px, 8vw, 112px); }

.ax-console-head { max-width: 1160px; margin: 0 auto clamp(28px, 4vw, 44px); }
.ax-console-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  letter-spacing: -0.02em;
  max-width: none;
}
.ax-console-title span { font-style: italic; color: var(--red); }
.ax-console-title:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.ax-console-sub {
  margin-top: 10px;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 62ch;
}

/* — mobile live instrument: the strip's truth, always in view (≤640) — */
.ax-pulse { display: none; }
@media (max-width: 640px) {
  .ax-pulse {
    position: sticky;
    top: var(--topbar-h); /* the topbar is sticky above; the instrument docks beneath it */
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--ink);
    color: var(--paper-on-ink);
    border-top: 2px solid var(--red);
    padding: 10px 14px;
    margin: 0 calc(-1 * var(--pad-x)) 16px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .ax-pulse-dot {
    flex: none;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--red);
    animation: axWirePulse 1.4s var(--ease-paper) infinite;
  }
  .ax-pulse-stage { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ax-pulse-meta { margin-left: auto; color: var(--muted-on-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
}

.ax-stagewrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: clamp(24px, 3vw, 40px);
  max-width: 1160px;
  margin: 0 auto;
  align-items: start;
}

/* — the proof sheet — */
.ax-proofsheet {
  background: var(--paper-raise);
  border: 1px solid var(--ink-hairline);
  border-top: 4px double var(--ink);
  box-shadow: 0 1px 0 rgba(26, 23, 18, 0.08), 10px 14px 0 rgba(26, 23, 18, 0.05);
  padding: clamp(18px, 2.6vw, 30px);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s var(--ease-paper), transform 0.4s var(--ease-paper);
}
.ax-proofsheet.in { opacity: 1; transform: none; }
html:not(.js) .ax-proofsheet { opacity: 1; transform: none; }

.ax-ps-slug {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 10px;
}
.ax-ps-brand { color: var(--ink); }
.ax-ps-host { color: var(--ink-muted); overflow-wrap: anywhere; }
.ax-ps-live { margin-left: auto; color: var(--red-deep); display: inline-flex; align-items: center; gap: 6px; }
.ax-ps-livedot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red);
  animation: axWirePulse 1.4s var(--ease-paper) infinite;
}

/* — recognition — */
.ax-recognition { padding: clamp(14px, 2vw, 20px) 0; min-height: 74px; }
.ax-rec-waiting {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.ax-rec-waiting::after {
  content: "▌";
  color: var(--red);
  margin-left: 6px;
  animation: caretBlink 1.1s steps(1, end) infinite;
}
.ax-rec-row { margin-top: 10px; opacity: 0; transform: translateY(8px); transition: opacity 0.3s var(--ease-paper), transform 0.3s var(--ease-paper); }
.ax-rec-row.in, .ax-rec-note.in { opacity: 1; transform: none; }
.ax-rec-row:first-child { margin-top: 0; }
.ax-rec-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.ax-rec-line { font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.45; }
.ax-rec-src {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-top: 3px;
}
.ax-rec-note {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-top: 14px;
  opacity: 0;
  transition: opacity 0.3s var(--ease-paper);
}

/* — the Signal Lens, fed only by validated stream events — */
.ax-lens-stage {
  position: relative;
  isolation: isolate;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--ink-hairline);
  background: var(--paper-deep);
  margin-top: 2px;
}
.ax-lens-stage-art {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.72;
  filter: saturate(0.82) contrast(1.04);
  transition: opacity 0.32s var(--ease-paper), filter 0.32s var(--ease-paper);
}
.ax-lens-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(248, 245, 238, 0.96) 0 48%, rgba(248, 245, 238, 0.18) 78%);
  pointer-events: none;
  transition: opacity 0.28s var(--ease-paper);
}
.ax-lens-viewport {
  position: absolute;
  z-index: 2;
  left: 5%;
  top: 10%;
  bottom: 16%;
  width: 52%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(26, 23, 18, 0.58);
  background: rgba(253, 251, 246, 0.88);
  box-shadow: 8px 10px 0 rgba(26, 23, 18, 0.08);
}
.ax-lens-live-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
  opacity: 0;
  transform: translateY(8px);
  clip-path: inset(0 0 100% 0);
  transition: opacity 0.34s var(--ease-paper), transform 0.34s var(--ease-paper), clip-path 0.48s var(--ease-paper);
}
.ax-lens-has-image .ax-lens-live-img { opacity: 1; transform: none; clip-path: inset(0); }
.ax-lens-has-image .ax-lens-stage-art,
.ax-lens-has-image::after { opacity: 0; }
.ax-lens-has-image .ax-lens-viewport {
  left: 4%;
  right: 4%;
  top: 14%;
  bottom: 12%;
  width: auto;
  transform: none;
  background: var(--ink);
  box-shadow: 5px 7px 0 rgba(26, 23, 18, 0.08);
}
.ax-lens-has-image[data-preview="mobile"] .ax-lens-viewport {
  left: 50%;
  right: auto;
  top: 14%;
  bottom: auto;
  width: auto;
  height: 74%;
  aspect-ratio: 390 / 844;
  transform: translateX(-50%);
}
.ax-lens-live-img[data-strategy="mobile"] { width: 100%; height: 100%; max-width: 100%; background: var(--ink); }
.ax-lens-empty {
  display: grid;
  justify-items: center;
  gap: 9px;
  max-width: 24ch;
  padding: 18px;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.55;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}
.ax-lens-empty[hidden] { display: none; }
.ax-lens-empty-mark { width: 34px; height: 34px; border: 1px solid var(--ink-hairline); transform: rotate(45deg); }
.ax-lens-readout {
  position: absolute;
  z-index: 5;
  left: 5%; right: 4%; bottom: 4%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.ax-lens-capture-state {
  position: absolute;
  z-index: 5;
  right: 4%; top: 6%;
  display: flex;
  gap: 6px;
}
.ax-lens-capture-state span {
  border: 1px solid var(--ink-hairline);
  background: rgba(248, 245, 238, 0.88);
  padding: 5px 7px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.ax-lens-capture-state span[data-state="received"] { color: var(--ok); border-color: var(--ok); }
.ax-lens-capture-state span[data-state="unavailable"] { color: var(--red-deep); border-color: var(--red-deep); }
.ax-lens-capture-state span[data-active="true"] { color: var(--paper-on-ink); background: var(--ink); border-color: var(--ink); }
.ax-lens-stage[data-phase="resolved"] .ax-lens-stage-art { opacity: 0.48; filter: saturate(0.45) contrast(1.08); }

/* — photo plates — */
.ax-ps-plates {
  display: none;
  grid-template-columns: minmax(0, 0.58fr) minmax(0, 1.42fr);
  gap: clamp(14px, 2vw, 22px);
  border-top: 1px solid var(--ink-faint);
  padding-top: clamp(14px, 2vw, 20px);
  align-items: start;
}
.ax-plate { margin: 0; }
.ax-plate-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ink-hairline);
  background:
    radial-gradient(rgba(26, 23, 18, 0.12) 1px, transparent 1.2px) 0 0 / 7px 7px,
    var(--paper-deep);
}
.ax-plate-m .ax-plate-frame { aspect-ratio: 390 / 844; }
.ax-plate-d .ax-plate-frame { aspect-ratio: 1440 / 900; }
.ax-plate-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  clip-path: inset(0 0 100% 0);
}
.ax-plate[data-state="photo"] .ax-plate-img {
  clip-path: inset(0);
  transition: clip-path 0.65s var(--ease-paper);
}
.ax-plate-dev {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(253, 251, 246, 0.55) 48%, transparent 62%);
  background-size: 220% 100%;
  animation: axDevelop 1.6s linear infinite;
}
.ax-plate[data-state="photo"] .ax-plate-dev { opacity: 0; transition: opacity 0.7s var(--ease-paper); animation: none; }
/* one-shot capture flash the instant a real photograph lands (event-bound) */
.ax-plate[data-state="photo"] .ax-plate-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(253, 251, 246, 0.9);
  opacity: 0;
  animation: axCaptureFlash 0.45s var(--ease-paper) 1;
}
.ax-plate[data-state="failed"] .ax-plate-dev { display: none; }
.ax-plate[data-state="failed"] .ax-plate-img { display: none; }
.ax-plate-failnote {
  display: none;
  position: absolute;
  inset: 0;
  padding: clamp(12px, 2vw, 22px);
  align-content: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.92rem, 1.4vw, 1.05rem);
  line-height: 1.5;
  color: var(--ink-muted);
  text-align: center;
}
.ax-plate[data-state="failed"] .ax-plate-failnote { display: grid; }
.ax-plate-cap {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 8px;
}
.ax-plate[data-state="photo"] .ax-plate-status { color: var(--ok); }

/* — the six composition columns — */
.ax-ps-cols {
  display: none;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(10px, 1.6vw, 18px);
  border-top: 1px solid var(--ink-faint);
  margin-top: clamp(14px, 2vw, 20px);
  padding-top: clamp(12px, 1.8vw, 18px);
}
.ax-col-name {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--ink-faint);
  padding-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ax-col-lines { display: flex; flex-direction: column; gap: 4px; padding-top: 7px; min-height: 46px; }
.ax-col-line {
  height: 3px;
  width: 100%;
  background: rgba(26, 23, 18, 0.16);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s var(--ease-paper);
}
.ax-col-line.in { transform: scaleX(1); }
.ax-col-line[data-status="pass"] { background: rgba(26, 23, 18, 0.2); }
.ax-col-line[data-status="warn"] { background: rgba(194, 57, 29, 0.5); }
.ax-col-line[data-status="fail"] { background: var(--red); }
.ax-col-line[data-status="info"],
.ax-col-line[data-status="inconclusive"] {
  background: repeating-linear-gradient(90deg, rgba(26, 23, 18, 0.22) 0 4px, transparent 4px 8px);
}

/* — parallel status matrix, evidence details, and cancel — */
.ax-strip {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
}
.ax-strip li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-content: start;
  align-items: center;
  gap: 7px;
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--ink-faint);
  background: rgba(253, 251, 246, 0.42);
}
.ax-strip-mark {
  position: relative;
  width: 12px;
  height: 12px;
  border: 1px solid var(--ink-hairline);
  background: transparent;
  align-self: center;
}
.ax-strip li[data-state="active"] .ax-strip-mark { background: var(--red); border-color: var(--red); }
.ax-strip li[data-state="active"] .ax-strip-mark::before {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid var(--red);
  animation: axPulse 1.6s var(--ease-paper) infinite;
}
.ax-strip li[data-state="done"] .ax-strip-mark { background: var(--ink); border-color: var(--ink); }
.ax-strip li[data-state="done"] .ax-strip-mark::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 9px;
  line-height: 1;
  color: var(--paper-on-ink);
}
.ax-strip li[data-state="partial"] .ax-strip-mark {
  background: linear-gradient(135deg, var(--ink) 0 50%, transparent 50%);
  border-color: var(--ink);
}
.ax-strip li[data-state="failed"] .ax-strip-mark { background: var(--red-deep); border-color: var(--red-deep); }
.ax-strip li[data-state="failed"] .ax-strip-mark::after {
  content: "✕";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 8px;
  line-height: 1;
  color: var(--paper-on-ink);
}
.ax-strip-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.ax-strip li[data-state="active"] .ax-strip-label { color: var(--ink); font-weight: 500; }
.ax-strip li[data-state="done"] .ax-strip-label,
.ax-strip li[data-state="partial"] .ax-strip-label,
.ax-strip li[data-state="failed"] .ax-strip-label { color: var(--ink); }
.ax-strip-note {
  grid-column: 2;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  text-align: right;
}
.ax-stamped { animation: axStamp 0.28s var(--ease-paper); }

.ax-live-details { margin-top: 14px; }
.ax-live-details:not([open]) > .ax-wire { display: none; }
.ax-live-details > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  border: 1px solid var(--ink-hairline);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  list-style: none;
}
.ax-live-details > summary::-webkit-details-marker { display: none; }
.ax-live-details[open] > summary span { transform: rotate(45deg); }
.ax-live-details > summary:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.ax-wire {
  margin-top: 8px;
  background: var(--ink);
  border-top: 2px solid var(--red);
  padding: 12px 14px;
}
.ax-wire-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-on-ink);
}
.ax-wire-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red);
  animation: axWirePulse 1.4s var(--ease-paper) infinite;
}
.ax-wire-title { color: var(--paper-on-ink); }
.ax-wire-meters { margin-left: auto; font-variant-numeric: tabular-nums; }
.ax-wire-lines {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  max-height: 190px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.ax-wire-line {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.22s var(--ease-paper), transform 0.22s var(--ease-paper);
}
.ax-wire-line.in { opacity: 1; transform: none; }
.ax-wire-stamp { color: var(--red-on-ink); font-variant-numeric: tabular-nums; flex: none; }
.ax-wire-text { color: var(--paper-on-ink); overflow-wrap: anywhere; }

.ax-expect {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.6;
  color: var(--ink-muted);
}
.ax-cancel { margin-top: 16px; width: 100%; }

/* — terminal scan error — */
.ax-scan-error {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  max-width: 560px;
  margin: clamp(28px, 4vw, 44px) auto 0;
  background: var(--paper-raise);
  border: 1px solid var(--ink-hairline);
  border-left: 3px solid var(--red-deep);
  padding: clamp(20px, 3vw, 32px);
}
.ax-scan-error > *:not(.ax-error-lens) { position: relative; z-index: 2; }
.ax-error-lens {
  position: absolute;
  z-index: -1;
  right: -22%;
  top: -42%;
  width: 78%;
  height: auto;
  opacity: 0.18;
  filter: grayscale(0.25) contrast(1.05);
}
.ax-error-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red-deep);
}
.ax-error-msg {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  line-height: 1.45;
  margin-top: 10px;
}
.ax-error-note {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  margin: 10px 0 18px;
}
.ax-proofsheet[data-state="stopped"] { opacity: 0.35; }
/* A stopped review collapses to the honest error card — no dead board. */
.ax-progress[data-error="true"] .ax-stagewrap { display: none; }
.ax-progress[data-error="true"] .ax-scan-error { margin-top: clamp(16px, 3vw, 28px); }

/* honeypot — visually removed, never display:none (bots check) */
.ax-hp {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ============================================================
   STATE E · THE EDITION
   ============================================================ */

.ed { padding: clamp(40px, 6vw, 72px) var(--pad-x) clamp(72px, 9vw, 120px); }
.ed > * { max-width: 1080px; margin-left: auto; margin-right: auto; }
/* The shared site stylesheet gives every section full-page spacing. Report
   sections are nested content, so they must not inherit another page shell. */
.ed > section { padding: 0; }

.ed-enter { opacity: 1; }
html.js .ed-enter { opacity: 0; transform: translateY(12px); transition: opacity 0.32s var(--ease-paper), transform 0.32s var(--ease-paper); }
html.js .ed-enter.in { opacity: 1; transform: none; }

/* — masthead — */
.ed-mast { border-top: 4px double var(--ink); padding-top: 16px; }
.ed-mast-brand {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.ed-title {
  font-family: var(--font-serif);
  font-weight: 620;
  font-size: clamp(2.1rem, 5.2vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.028em;
  margin-top: 10px;
  max-width: 22ch;
  overflow-wrap: anywhere;
}
.ed-mast-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--ink);
  margin-top: 14px;
  padding-bottom: 12px;
}
#ed-evidence[data-confidence="complete"] { color: var(--ok); }
#ed-evidence[data-confidence="strong"] { color: var(--ink); }
#ed-evidence[data-confidence="preliminary"] { color: var(--red-deep); }

/* — verified target: one-line confirmation, provenance on disclosure — */
.ed-target { margin-top: clamp(14px, 2vw, 22px); }
.ed-target-details {
  background: var(--paper-raise);
  border: 1px solid var(--ink-hairline);
  border-left: 3px solid var(--ok);
}
.ed-target-summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 44px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
}
.ed-target-summary::-webkit-details-marker { display: none; }
.ed-target-summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ed-target-summary:hover .ed-target-more { color: var(--red); }
.ed-target-check { font-family: var(--font-mono); font-size: 13px; color: var(--ok); }
.ed-target-line { font-size: 0.95rem; line-height: 1.4; color: var(--ink); min-width: 0; }
.ed-target-line strong { font-family: var(--font-serif); font-weight: 600; font-size: 1.05rem; }
.ed-target-host { font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); overflow-wrap: anywhere; }
.ed-target-more {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red-deep);
}
.ed-target-more::after { content: " ▾"; }
.ed-target-details[open] .ed-target-more::after { content: " ▴"; }
.ed-target-body { padding: 2px 16px 16px; border-top: 1px solid var(--ink-faint); }
.ed-target-body .ed-target-flag { margin-top: 12px; }
.ed-target-flag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red-deep);
}
.ed-target-rows { margin: 8px 0 0; }
.ed-target-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 4px 18px;
  padding: 9px 0;
  border-bottom: 1px solid var(--ink-faint);
}
.ed-target-row:last-child { border-bottom: 0; }
.ed-target-row dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-top: 4px;
}
.ed-target-row dd {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.02rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.ed-target-note {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-top: 12px;
}
.ed-linkbtn {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-deep);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.ed-linkbtn:hover { color: var(--red); }
.ed-linkbtn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* — score row — */
.ed-scorerow {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  margin-top: clamp(18px, 3vw, 40px);
}
.ed-score-num {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(4.4rem, 11vw, 7.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.ed-score-max { font-size: 0.32em; color: var(--ink-muted); letter-spacing: 0; }
.ed-scorerow[data-confidence="preliminary"] .ed-score-num {
  font-size: clamp(3rem, 7vw, 4.6rem);
  color: var(--ink-muted);
}
.ed-scorerow[data-confidence="preliminary"] .ed-score::after {
  content: "Provisional";
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-deep);
  border: 1px solid var(--red-deep);
  padding: 3px 8px;
  transform: rotate(-2deg);
  margin-top: 6px;
}
.ed-confidence {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  line-height: 1.6;
  color: var(--ink-muted);
}
.ed-conf-label { font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink); }
.ed-confidence[data-confidence="complete"] .ed-conf-label { color: var(--ok); }
.ed-confidence[data-confidence="preliminary"] .ed-conf-label { color: var(--red-deep); }
.ed-verdict {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--red);
  max-width: 24ch;
  margin-top: 10px;
}
.ed-verdict:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.ed-counts {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin-top: 14px;
}

/* — photographs — */
.ed-photos-wrap { margin-top: clamp(24px, 3vw, 40px); }
.ed-photos-lede {
  font-size: 0.98rem;
  color: var(--ink-muted);
  max-width: 58ch;
  margin-top: 10px;
}
.ed-photos {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 1.45fr);
  gap: clamp(16px, 2.6vw, 28px);
  align-items: start;
  margin-top: clamp(16px, 2.4vw, 24px);
}
.ed-photo-tabs { display: none; }
.ed-photo { margin: 0; }
.ed-photo-frame {
  border: 1px solid var(--ink-hairline);
  background: var(--paper-deep);
  box-shadow: 0 1px 0 rgba(26, 23, 18, 0.08), 8px 10px 0 rgba(26, 23, 18, 0.05);
  overflow: hidden;
}
.ed-photo-trigger {
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}
.ed-photo-trigger:focus-visible { outline: 3px solid var(--red); outline-offset: -3px; }
.ed-photo-img { display: block; width: 100%; height: auto; }
.ed-photo-missing {
  display: grid;
  align-content: center;
  min-height: 240px;
  padding: clamp(16px, 2.6vw, 28px);
}
.ed-photo-missing-note {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-muted);
  text-align: center;
  max-width: 34ch;
  margin: 0 auto;
}
.ed-photo-cap {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 8px;
}
.ed-photo-cap-action { color: var(--red-deep); }
.ed-photos-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin-top: 14px;
}

/* — inspectable live captures — */
body.ax-viewer-open { overflow: hidden; }
.ax-viewer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: hidden;
}
.ax-viewer[open] { display: grid; place-items: center; }
.ax-viewer::backdrop { background: rgba(26, 23, 18, 0.82); backdrop-filter: blur(5px); }
.ax-viewer-shell {
  width: min(1180px, calc(100vw - 40px));
  height: min(900px, calc(100dvh - 40px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--paper-raise);
  border: 1px solid rgba(248, 245, 238, 0.45);
  border-top: 4px solid var(--red);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}
.ax-viewer[data-strategy="mobile"] .ax-viewer-shell { width: min(680px, calc(100vw - 40px)); }
.ax-viewer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(16px, 2.4vw, 28px);
  border-bottom: 1px solid var(--ink-faint);
}
.ax-viewer-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-deep);
}
.ax-viewer-title { font-family: var(--font-serif); font-size: clamp(1.45rem, 3vw, 2.3rem); line-height: 1.1; margin-top: 4px; }
.ax-viewer-title:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
.ax-viewer-close {
  min-width: 56px;
  min-height: 44px;
  border: 1px solid var(--ink);
  background: transparent;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.ax-viewer-close:focus-visible,
.ax-viewer-nav .btn:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.ax-viewer-figure { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; margin: 0; padding: 0 clamp(14px, 2vw, 24px); }
.ax-viewer-imagewrap {
  --ax-viewer-pad: clamp(12px, 2vw, 20px);
  position: relative;
  isolation: isolate;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  background: #0f0d0b;
  touch-action: pan-y pinch-zoom;
  overscroll-behavior: contain;
}
.ax-viewer-imagewrap::before { display: none; }
.ax-viewer-image { position: absolute; z-index: 1; inset: var(--ax-viewer-pad); display: block; width: calc(100% - (2 * var(--ax-viewer-pad))); height: calc(100% - (2 * var(--ax-viewer-pad))); max-width: none; max-height: none; object-fit: contain; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.32)); }
.ax-viewer-caption { padding: 10px 0 4px; color: var(--ink-muted); font-size: 0.9rem; line-height: 1.45; }
.ax-viewer-nav {
  display: grid;
  grid-template-columns: minmax(100px, auto) 1fr minmax(100px, auto);
  align-items: center;
  gap: 12px;
  padding: 12px clamp(14px, 2vw, 24px) clamp(14px, 2vw, 22px);
}
.ax-viewer-position { text-align: center; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.ax-viewer-nav .btn { min-height: 44px; }
.ax-viewer[data-single="true"] .ax-viewer-prev,
.ax-viewer[data-single="true"] .ax-viewer-next { visibility: hidden; }

/* — severity stamps — */
.ed-stamp {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 9px;
  transform: rotate(-0.8deg);
}
.ed-stamp-critical { background: var(--red); color: var(--paper-on-ink); }
.ed-stamp-high { color: var(--red-deep); border: 1px solid var(--red-deep); background: rgba(194, 57, 29, 0.06); }
.ed-stamp-medium { color: var(--ink); border: 1px solid var(--ink-hairline); }
.ed-stamp-noted { color: var(--ink-muted); border: 1px solid var(--ink-faint); }

/* — lead story — */
.ed-lead {
  max-width: 760px;
  margin-top: clamp(48px, 7vw, 88px);
  border-top: 2px solid var(--ink);
  padding-top: clamp(16px, 2.4vw, 24px);
}
.ed-lead-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.ed-row-provenance {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.ed-lead-headline {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.8vw, 2.7rem);
  line-height: 1.08;
  letter-spacing: -0.022em;
  max-width: 24ch;
  margin-top: 14px;
}
.ed-lead-detail {
  font-family: var(--font-serif);
  font-size: clamp(1.08rem, 1.6vw, 1.22rem);
  line-height: 1.68;
  margin-top: 16px;
  max-width: 60ch;
}
.ed-dropcap::first-letter {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 3.1em;
  line-height: 0.82;
  float: left;
  padding: 4px 10px 0 0;
  color: var(--ink);
}
.ed-lead-consequence {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--red-deep);
  border-left: 2px solid var(--red);
  padding-left: 16px;
  margin-top: 16px;
  max-width: 52ch;
}

/* — the docket — */
.ed-docket { margin-top: clamp(48px, 7vw, 88px); }
.ed-tier { border-top: 1px solid var(--ink); padding: clamp(14px, 2vw, 20px) 0 clamp(8px, 1.4vw, 14px); }
.ed-tier-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.ed-tier-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  letter-spacing: -0.015em;
}
.ed-tier-critical .ed-tier-title { color: var(--red); }
.ed-tier-hint {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.ed-tier-leadref {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.98rem;
  color: var(--ink-muted);
  margin-top: 10px;
}
.ed-row { border-top: 1px solid var(--ink-faint); padding: clamp(14px, 2vw, 20px) 0; }
.ed-row-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ed-row-headline {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.2;
  letter-spacing: -0.012em;
  margin-top: 10px;
  max-width: 34ch;
}
.ed-row-detail { margin-top: 10px; }
.ed-row-text {
  font-size: 1.02rem;
  line-height: 1.6;
  max-width: 62ch;
}
.ed-row-consequence {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.98rem;
  color: var(--red-deep);
  margin-top: 8px;
  max-width: 54ch;
}
.ed-row-lock {
  display: flex;
  align-items: center;
  min-height: 44px; /* touch target through the whole docket */
  width: 100%;
  max-width: 62ch;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-deep);
  background: rgba(194, 57, 29, 0.05);
  border: 0;
  border-left: 2px solid var(--red);
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.2s var(--ease-paper);
}
.ed-row-lock:hover { background: rgba(194, 57, 29, 0.1); }
.ed-row-lock:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.ed-row-lock-note::after { content: " →"; }

/* — fine-print sections: one cohesive block after the docket — */
.ed-fine { max-width: 860px; margin-top: 20px; }
.ed-fine-first { margin-top: clamp(40px, 6vw, 64px); }
.ed-fine:empty { display: none; margin: 0; }
.ed-fine-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  border-top: 1px solid var(--ink-hairline);
  padding-top: 12px;
}
.ed-pass-title { color: var(--ok); }
.ed-fine-note { font-size: 0.92rem; color: var(--ink-muted); margin-top: 8px; max-width: 60ch; }
.ed-fine-list { list-style: none; margin: 12px 0 0; padding: 0; }
.ed-fine-item { font-size: 0.95rem; line-height: 1.55; color: var(--ink); padding: 5px 0; }
.ed-fine-label { font-weight: 600; }
.ed-fine-detail { color: var(--ink-muted); }
.ed-pass-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  columns: 2;
  column-gap: clamp(24px, 4vw, 48px);
}
.ed-pass-item {
  font-size: 0.95rem;
  color: var(--ink);
  padding: 4px 0 4px 22px;
  position: relative;
  break-inside: avoid;
}
.ed-pass-item::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--ok);
  font-family: var(--font-mono);
  font-size: 12px;
}
.ed-context-details summary { cursor: pointer; list-style-position: outside; padding: 10px 0; }
.ed-context-details summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.ed-context-row { font-size: 0.95rem; line-height: 1.55; color: var(--ink-muted); margin-top: 10px; max-width: 66ch; }
.ed-context-row strong { color: var(--ink); font-weight: 600; }

/* — delivery slip — */
.ed-slip { margin-top: clamp(48px, 7vw, 88px); }
.ed-slip-inner {
  border: 1px solid var(--ink);
  box-shadow: 6px 6px 0 rgba(26, 23, 18, 0.08);
  background: var(--paper-raise);
  padding: clamp(20px, 3.4vw, 40px);
  position: relative;
}
.ed-slip-inner::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--ink-faint);
  pointer-events: none;
}
.ed-slip-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red-deep);
}
.ed-slip-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: -0.018em;
  line-height: 1.1;
  margin-top: 8px;
  max-width: 24ch;
}
.ed-slip-text { font-size: 0.98rem; line-height: 1.6; color: var(--ink-muted); max-width: 58ch; margin-top: 12px; }
.ed-slip-form { margin-top: 18px; }
.ed-slip-row { display: flex; gap: 10px; flex-wrap: wrap; }
.ed-slip-input { flex: 1 1 260px; }
/* the locked-detail press answers with one ring on the delivery slip */
.ed-slip-ring .ed-slip-inner { animation: axSlipRing 0.8s var(--ease-paper) 1; }
.ed-slip-privacy {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  line-height: 1.7;
  color: var(--ink-muted);
  margin-top: 14px;
}
.ed-slip-privacy a { color: var(--ink-muted); }
.ed-slip-done {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--ok);
  margin-top: 12px;
}
.ed-delivery-status {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ok);
  margin-top: 14px;
}
.ed-delivery-status:empty { display: none; }

/* — booking — */
.ed-booking {
  background: var(--ink);
  color: var(--paper-on-ink);
  padding: clamp(28px, 4.5vw, 56px);
  margin-top: clamp(48px, 7vw, 88px);
}
.ed-booking-line {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 4vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.022em;
  max-width: 20ch;
}
.ed-booking-line em { font-style: italic; font-weight: 500; color: var(--red-on-ink); }
.ed-booking-body {
  color: var(--muted-on-ink);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 52ch;
  margin-top: 14px;
}
.ed-booking-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 24px; }
.ed-booking .text-link { color: var(--red-on-ink); }
.ed-booking .btn-primary:hover { background: var(--red); }

.ed-end { text-align: center; margin-top: clamp(36px, 5vw, 56px); }

/* — method — */
.ax-method { padding: clamp(64px, 9vw, 112px) var(--pad-x); border-top: 1px solid var(--ink-faint); }
.ax-method > * { max-width: 860px; margin-left: auto; margin-right: auto; }
.ax-method .section-head { margin-bottom: clamp(20px, 3vw, 32px); }
.ax-method-text {
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 70ch;
  margin-top: 14px;
}

/* ============================================================
   KEYFRAMES
   ============================================================ */

@keyframes axPulse {
  from { transform: scale(0.7); opacity: 1; }
  to { transform: scale(1.25); opacity: 0; }
}
@keyframes axWirePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}
@keyframes axDevelop {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}
@keyframes axStamp {
  0% { transform: scale(1.35); }
  100% { transform: scale(1); }
}
@keyframes axCaptureFlash {
  0% { opacity: 0.9; }
  100% { opacity: 0; }
}
@keyframes axSlipRing {
  0% { box-shadow: 0 0 0 0 rgba(194, 57, 29, 0.35), 6px 6px 0 rgba(26, 23, 18, 0.08); }
  100% { box-shadow: 0 0 0 16px rgba(194, 57, 29, 0), 6px 6px 0 rgba(26, 23, 18, 0.08); }
}

/* ============================================================
   RESPONSIVE — contract §12: ≤640 · 641–1079 · ≥1080
   ============================================================ */

@media (min-width: 1080px) {
  .ax-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 460px;
    column-gap: clamp(40px, 5vw, 88px);
    align-items: start;
  }
  .ax-hero > * { grid-column: 1; }
  .ax-hero .ax-specimen {
    grid-column: 2;
    grid-row: 2 / span 4;
    align-self: center;
    margin-top: 0;
  }
  .ax-hero .ax-promise { grid-column: 1 / -1; }
}

@media (max-width: 1079px) {
  .ax-stagewrap { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
  .ax-cancel { width: auto; }
}

@media (max-width: 640px) {
  body.ax-reviewing { overflow: hidden; }
  body.ax-reviewing .ax-progress:not([hidden]) {
    position: fixed;
    z-index: 60;
    inset: var(--topbar-h) 0 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 10px var(--pad-x) max(10px, env(safe-area-inset-bottom));
    overflow: hidden;
    background: var(--paper);
  }
  .ax-inputrow .btn { flex: 1 1 100%; }
  /* Arrival order on phones: the specimen (proof of the artifact) comes
     before the promise columns, right after the form. */
  .ax-hero { display: flex; flex-direction: column; }
  .ax-hero .ax-specimen { order: 5; margin-top: 44px; max-width: none; }
  .ax-hero .ax-promise { order: 6; margin-top: 48px; }
  .ax-promise { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .ax-lens-preview-copy { grid-template-columns: minmax(0, 1fr); }
  .ax-lens-preview-art { aspect-ratio: 5 / 4; }
  .ax-lens-preview-art img { object-position: 64% center; }

  .ax-console-head { margin: 0 0 6px; }
  .ax-console-title { font-size: clamp(1.25rem, 6vw, 1.55rem); line-height: 1.08; }
  .ax-console-sub { display: none; }
  .ax-pulse { position: static; flex: none; margin: 0 calc(-1 * var(--pad-x)) 8px; padding-block: 8px; }
  .ax-stagewrap {
    width: 100%;
    max-width: none;
    min-height: 0;
    flex: 1;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 8px;
    overflow: hidden;
    align-items: stretch;
  }
  .ax-proofsheet {
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 9px;
    box-shadow: 4px 5px 0 rgba(26, 23, 18, 0.05);
  }
  .ax-ps-slug { min-height: 22px; padding-bottom: 6px; font-size: 8px; gap: 8px; }
  .ax-ps-brand { display: none; }
  .ax-recognition { flex: none; min-height: 0; max-height: 50px; overflow: hidden; padding: 6px 0; }
  .ax-rec-row { margin-top: 0; }
  .ax-rec-row:not(:first-child), .ax-rec-note { display: none; }
  .ax-rec-name { font-size: 1.12rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ax-rec-src { display: none; }
  .ax-lens-stage { flex: 1; min-height: 148px; margin-top: 0; aspect-ratio: auto; }
  .ax-lens-stage-art { object-position: 62% center; }
  .ax-lens-stage::after { background: linear-gradient(90deg, rgba(248, 245, 238, 0.94) 0 56%, rgba(248, 245, 238, 0.16) 85%); }
  .ax-lens-viewport { left: 4%; top: 9%; bottom: 18%; width: 58%; }
  .ax-lens-capture-state { right: 3%; top: 5%; flex-direction: column; }
  .ax-lens-capture-state span { padding: 3px 5px; font-size: 7px; }
  .ax-lens-readout { left: 4%; right: 3%; font-size: 7px; }
  .ax-lens-readout span:last-child { display: none; }
  .ax-ps-cols, .ax-ps-plates { display: none; }
  .ax-side {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
    align-items: end;
  }
  .ax-strip { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .ax-strip li { min-height: 46px; grid-template-columns: 12px minmax(0, 1fr); gap: 5px; padding: 6px; }
  .ax-strip-mark { width: 9px; height: 9px; }
  .ax-strip-label { font-size: 8px; line-height: 1.35; letter-spacing: 0.05em; }
  .ax-strip-note { display: none; }
  .ax-live-details { grid-column: 1; margin: 0; }
  .ax-live-details > summary { min-height: 44px; padding: 8px 10px; font-size: 9px; }
  .ax-live-details[open] .ax-wire {
    position: fixed;
    z-index: 75;
    inset: calc(var(--topbar-h) + 54px) 14px 66px;
    display: flex;
    flex-direction: column;
    margin: 0;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
  }
  .ax-live-details[open] .ax-wire-lines { max-height: none; flex: 1; }
  .ax-wire-lines { max-height: 132px; }
  .ax-expect { display: none; }
  .ax-cancel { grid-column: 2; min-height: 44px; width: auto; margin: 0; padding-inline: 14px; font-size: 9px; }
  .ax-scan-error { margin: 8px auto 0; max-height: calc(100% - 86px); overflow: auto; padding: 18px; }
  .ax-error-lens { width: 95%; right: -34%; top: -25%; }

  .ed-scorerow { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .ed-photo-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin-top: 16px;
    padding: 4px;
    border: 1px solid var(--ink-hairline);
  }
  .ed-photo-tab {
    min-height: 44px;
    border: 0;
    background: transparent;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
  .ed-photo-tab[aria-pressed="true"] { background: var(--ink); color: var(--paper-on-ink); }
  .ed-photo-tab:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
  .ed-photos { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .ed-photos[data-active="mobile"] .ed-photo-desktop,
  .ed-photos[data-active="desktop"] .ed-photo-mobile { display: none; }
  .ed-photo-frame { max-height: 68svh; overflow: auto; }
  .ed-target-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .ed-target-row dt { padding-top: 0; }
  .ed-pass-list { columns: 1; }
  .ed-tier { padding: 12px 0 8px; }
  .ed-row { padding: 12px 0; }
  .ed-slip-row .btn { flex: 1 1 100%; }
  .ed-booking-actions { align-items: flex-start; flex-direction: column; }

  .ax-viewer-shell,
  .ax-viewer[data-strategy="mobile"] .ax-viewer-shell { width: 100vw; height: 100dvh; border-inline: 0; border-bottom: 0; }
  .ax-viewer-head { padding: max(12px, env(safe-area-inset-top)) 14px 12px; }
  .ax-viewer-title { font-size: 1.35rem; }
  .ax-viewer-figure { padding-inline: 10px; }
  .ax-viewer-imagewrap { --ax-viewer-pad: 8px; padding: 0; }
  .ax-viewer-image { max-height: calc(100dvh - 190px); }
  .ax-viewer-caption { font-size: 0.82rem; }
  .ax-viewer-nav { grid-template-columns: minmax(88px, auto) 1fr minmax(88px, auto); padding: 8px 10px max(10px, env(safe-area-inset-bottom)); }
  .ax-viewer-nav .btn { padding-inline: 9px; font-size: 9px; }
}

@media (max-width: 640px) and (max-height: 600px) {
  .ax-hero { padding: 22px var(--pad-x) 56px; }
  .ax-hero .eyebrow { margin-bottom: 12px; font-size: 9px; }
  .ax-hero .ax-title { font-size: clamp(2rem, 9vw, 2.25rem); line-height: 1; }
  .ax-hero .hero-sub { margin-top: 14px; font-size: 0.92rem; line-height: 1.38; }
  .ax-form { margin-top: 16px; }
  .ax-label { margin-bottom: 6px; }
  .ax-inputrow { gap: 6px; }
  .ax-url { padding: 12px 13px; }
  .ax-inputrow .btn { min-height: 44px; padding-block: 11px; }
  .ax-form .friction { margin-top: 8px; font-size: 10px; line-height: 1.35; }
}

@media (max-height: 500px) and (orientation: landscape) and (max-width: 900px) {
  body.ax-reviewing { overflow: hidden; }
  body.ax-reviewing .ax-progress:not([hidden]) {
    position: fixed;
    z-index: 60;
    inset: var(--topbar-h) 0 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 6px var(--pad-x) max(6px, env(safe-area-inset-bottom));
    overflow: hidden;
    background: var(--paper);
  }
  .ax-console-head { display: block; margin: 0 0 4px; }
  .ax-console-title {
    overflow: hidden;
    font-size: 1rem;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .ax-console-sub { display: none; }
  .ax-pulse {
    position: static;
    display: flex;
    flex: none;
    align-items: center;
    gap: 10px;
    margin: 0 0 6px;
    padding: 6px 10px;
    background: var(--ink);
    color: var(--paper-on-ink);
    border-top: 2px solid var(--red);
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .ax-pulse-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: axWirePulse 1.4s var(--ease-paper) infinite; }
  .ax-pulse-stage { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ax-pulse-meta { margin-left: auto; color: var(--muted-on-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .ax-stagewrap { width: 100%; max-width: none; min-height: 0; flex: 1; grid-template-columns: minmax(0, 1.3fr) minmax(270px, 0.7fr); gap: 8px; overflow: hidden; align-items: stretch; }
  .ax-proofsheet { min-height: 0; display: flex; flex-direction: column; padding: 7px; }
  .ax-ps-slug, .ax-recognition, .ax-ps-cols, .ax-ps-plates { display: none; }
  .ax-ps-slug { display: flex; min-height: 20px; padding: 0 0 5px; font-size: 7px; }
  .ax-lens-stage { flex: 1; min-height: 0; margin: 0; aspect-ratio: auto; }
  .ax-side { min-height: 0; display: flex; flex-direction: column; }
  .ax-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .ax-strip li { min-height: 43px; padding: 5px; }
  .ax-strip-label { font-size: 8px; }
  .ax-strip-note, .ax-live-details, .ax-expect { display: none; }
  .ax-cancel { min-height: 44px; width: auto; align-self: flex-start; margin-top: auto; padding-inline: 12px; }

  /* The evidence viewer becomes a two-column inspection desk in short
     landscape viewports. Keeping its controls beside the capture gives the
     real page the full screen height instead of reducing it to a thumbnail. */
  .ax-viewer-shell,
  .ax-viewer[data-strategy="mobile"] .ax-viewer-shell {
    width: 100vw;
    height: 100dvh;
    grid-template-columns: minmax(0, 1fr) 210px;
    grid-template-rows: auto minmax(0, 1fr);
    border: 0;
    border-top: 4px solid var(--red);
  }
  .ax-viewer-head {
    grid-column: 2;
    grid-row: 1;
    padding: 12px;
    gap: 10px;
  }
  .ax-viewer-title { font-size: 1.2rem; }
  .ax-viewer-figure {
    grid-column: 1;
    grid-row: 1 / -1;
    min-width: 0;
    padding: 0;
  }
  .ax-viewer-imagewrap { --ax-viewer-pad: 8px; padding: 0; }
  .ax-viewer-caption { padding: 7px 10px; font-size: 0.72rem; line-height: 1.25; }
  .ax-viewer-nav {
    grid-column: 2;
    grid-row: 2;
    grid-template-columns: minmax(0, 1fr);
    align-content: end;
    padding: 10px 12px 12px;
  }
  .ax-viewer-position { grid-row: 1; }
}

/* ============================================================
   PRINT — the report prints as a clean document
   ============================================================ */

@media print {
  .topbar, .masthead-nav, .m-menu, .footer, .ax-hero, .ax-progress, .ax-pulse, .ax-viewer,
  .ed-slip, .ed-booking, .ed-end, .ax-method, .skip-link { display: none !important; }
  .ed-target-more { display: none; }
  .ed { padding: 0; }
  .ed-photo-frame, .ed-slip-inner, .ed-target { box-shadow: none; }
  body { background: #fff; }
}

/* ============================================================
   REDUCED MOTION — every loop off, every reveal instant-ish
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .ax-ps-livedot, .ax-wire-dot, .ax-pulse-dot { animation: none; }
  .ax-strip li[data-state="active"] .ax-strip-mark::before { animation: none; opacity: 0; }
  .ax-plate-dev { animation: none; background: rgba(253, 251, 246, 0.25); }
  .ax-rec-waiting::after { animation: none; }
  .ax-stamped { animation: none; }
  .ax-proofsheet, .ax-rec-row, .ax-rec-note, .ax-wire-line, .ax-col-line {
    transition-duration: 0.16s;
    transition-property: opacity;
    transform: none;
  }
  .ax-plate[data-state="photo"] .ax-plate-img { transition: none; clip-path: inset(0); }
  .ax-plate[data-state="photo"] .ax-plate-dev { transition: none; }
  .ax-plate[data-state="photo"] .ax-plate-frame::after { animation: none; }
  .ax-lens-stage-art, .ax-lens-live-img { transition: none; }
  .ax-lens-live-img { clip-path: inset(0); }
  .ax-viewer::backdrop { backdrop-filter: none; }
  .ed-slip-ring .ed-slip-inner { animation: none; }
  html.js .ed-enter { transition-duration: 0.16s; transition-property: opacity; transform: none; }
  .ax-url, .ed-row-lock, .ed-linkbtn, .ax-specimen-card { transition: none; }
}
