/* ═══════════════════════════════════════════════════════════════════════
   GET AUDITED — generator styles
   ───────────────────────────────────────────────────────────────────────
   Loaded only on /audit. Uses the tokens and components already defined in
   styles.css; adds nothing to the homepage payload.

   01  Page header
   02  Form fields
   03  Schedule of reasons
   04  Processing
   05  Result
   06  Lightbox
   07  Legal
   08  Reduced motion
   ═══════════════════════════════════════════════════════════════════════ */


/* ── 01 · PAGE HEADER ────────────────────────────────────────────────── */
.exam-head {
  position: relative;
  background: var(--navy);
  color: var(--on-navy);
  padding: clamp(44px, 6vw, 78px) 0 0;
  overflow: hidden;
  isolation: isolate;
}
.exam-head::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: repeating-linear-gradient(90deg, rgba(240,238,231,0.042) 0 1px, transparent 1px 108px);
  -webkit-mask-image: radial-gradient(110% 90% at 78% 0%, #000 0%, transparent 70%);
  mask-image: radial-gradient(110% 90% at 78% 0%, #000 0%, transparent 70%);
}

.exam-head__title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 1.2rem + 6vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: -0.02em;
  margin-top: clamp(20px, 2.6vw, 32px);
}
.exam-head__copy {
  margin-top: clamp(18px, 2.2vw, 26px);
  max-width: 48ch;
  color: var(--on-navy-soft);
  line-height: 1.68;
}
.exam-head .stripfields {
  width: 100%;
  margin-top: clamp(34px, 4.5vw, 58px);
}


/* ── 02 · FORM FIELDS ────────────────────────────────────────────────── */
.exam {
  position: relative;
  background: var(--paper);
  padding: clamp(52px, 7vw, 96px) 0 clamp(64px, 8vw, 110px);
  isolation: isolate;
}
.exam::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--grain);
  opacity: 0.045;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.field {
  border: 0;
  padding: 0;
  margin: 0 0 clamp(34px, 4.5vw, 54px);
  max-width: 46rem;
}
.field--schedule { max-width: none; }

.field__head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 10px;
}
.field__num {
  font-family: var(--f-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--red);
  flex: none;
  width: 22px;
}
.field__label {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--ink);
  padding: 0;
}
.field__optional {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-paper-dim);
}

/* Inputs are ruled lines on paper, never boxes. */
.field__input {
  display: block;
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding: 6px 0 12px;
  color: var(--ink);
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.35rem);
  line-height: 1.2;
  transition: border-color 0.3s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.field__input--sm { font-size: clamp(1.15rem, 1rem + 0.8vw, 1.6rem); }
.field__input::placeholder { color: rgba(23, 26, 32, 0.26); }
.field__input:hover { border-bottom-color: var(--navy); }
.field__input:focus { outline: none; border-bottom-color: var(--red); }
.field__input:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 6px; }

.field__hint {
  margin-top: 10px;
  font-family: var(--f-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-paper-dim);
}


/* ── 03 · SCHEDULE OF REASONS ────────────────────────────────────────── */
.schedule {
  border-top: 1px solid var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 620px) {
  .schedule { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 56px); }
}

.schedule__row {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 13px 0 13px 16px;
  border-bottom: 1px solid var(--rule-dark-2);
  cursor: pointer;
  transition: color 0.25s var(--ease);
}
/* The selection marker: a small filled square in the margin. */
.schedule__row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.35em;
  width: 6px; height: 6px;
  background: var(--red);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.schedule__input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  margin: 0;
  pointer-events: none;
}

.schedule__num {
  font-family: var(--f-mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  color: var(--on-paper-dim);
  flex: none;
  width: 20px;
  transition: color 0.25s var(--ease);
}
.schedule__label {
  font-family: var(--f-display);
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.3rem);
  line-height: 1.22;
  color: var(--on-paper-soft);
  transition: color 0.25s var(--ease);
}

.schedule__row:hover .schedule__label { color: var(--ink); }

.schedule__input:checked ~ .schedule__num   { color: var(--red); }
.schedule__input:checked ~ .schedule__label { color: var(--ink); }
.schedule__row:has(.schedule__input:checked)::before { opacity: 1; }

.schedule__input:focus-visible ~ .schedule__label {
  outline: 2px solid var(--red-bright);
  outline-offset: 4px;
}

.exam__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 26px;
  margin-top: clamp(12px, 2vw, 20px);
}


/* ── 04 · PROCESSING ─────────────────────────────────────────────────── */
.busy {
  padding: clamp(64px, 12vw, 140px) 0;
  max-width: 34rem;
}
.busy__label {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--ink);
}
.busy__scan {
  position: relative;
  height: 1px;
  margin: 20px 0 16px;
  background: var(--rule-dark);
  overflow: hidden;
}
.busy__scan i {
  position: absolute;
  top: 0; left: 0;
  width: 34%; height: 100%;
  background: var(--red);
  animation: scan 1.05s var(--ease) infinite;
}
@keyframes scan {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(400%); }
}
.busy__note {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-paper-dim);
}


/* ── 05 · RESULT ─────────────────────────────────────────────────────── */
[data-stage="result"] { outline: none; }

.result {
  display: grid;
  gap: clamp(34px, 5vw, 68px);
  align-items: start;
}
@media (min-width: 900px) {
  .result { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
}

.result__doc { margin: 0; }
#noticeCanvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  cursor: zoom-in;
  background: var(--paper-2);
}
.result__doc figcaption {
  margin-top: 12px;
  font-family: var(--f-mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-paper-dim);
}

.result__title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin-top: 0.5em;
}
.result__lede {
  margin-top: 0.7em;
  color: var(--on-paper-soft);
  font-size: 1.05rem;
}

.result__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 26px;
  margin-top: clamp(24px, 3vw, 32px);
}

.caption {
  margin-top: clamp(28px, 3.5vw, 40px);
  padding-top: 14px;
  border-top: 1px solid var(--ink);
}
.caption__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.caption__text {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 0 0 14px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-dark);
  border-radius: 0;
  resize: none;
  overflow: hidden;
  font-family: var(--f-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--on-paper-soft);
  -webkit-appearance: none;
  appearance: none;
}
.caption__text:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 4px; }

.result__note {
  margin-top: 16px;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--on-paper-dim);
  max-width: 42ch;
}

.result__links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  margin-top: clamp(20px, 2.6vw, 26px);
}


/* ── 06 · LIGHTBOX ───────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(56px, 9vw, 88px) var(--gutter) var(--gutter);
  background: rgba(4, 18, 44, 0.94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }

.lightbox__img {
  max-width: min(100%, 780px);
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.lightbox__close {
  position: absolute;
  top: clamp(18px, 3vw, 30px);
  right: var(--gutter);
  font-family: var(--f-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-navy);
  padding: 10px 2px;
}
.lightbox__close::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 4px;
  background: currentColor;
  opacity: 0.5;
}
.lightbox__close:hover::after { opacity: 1; }


/* ── 07 · LEGAL ──────────────────────────────────────────────────────── */
.exam-legal {
  background: var(--paper-2);
  padding: clamp(38px, 5vw, 62px) 0;
}
.exam-legal .shell {
  display: grid;
  gap: 10px clamp(24px, 4vw, 48px);
  max-width: 74ch;
}
@media (min-width: 760px) {
  .exam-legal .shell { grid-template-columns: 10rem minmax(0, 1fr); }
}
.exam-legal p:last-child {
  font-size: 0.9375rem;
  line-height: 1.72;
  color: var(--on-paper-soft);
}


/* ── 08 · REDUCED MOTION ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .busy__scan i { animation: none; width: 100%; opacity: 0.5; }
}
