/* audit.css — Redline AI free instant audit (form + gap report). Reuses tokens from style.css. */

/* --- form --- */
#audit-form { width: 100%; }
.af-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
}
.af-row input {
  flex: 1 1 280px;
  min-width: 0;
  padding: 16px 18px;
  font: 400 16px/1.2 var(--mono);
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}
.af-row input::placeholder { color: rgba(10, 10, 10, .4); }
.af-row input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red);
}
.af-row .pill { flex: 0 0 auto; }

/* honeypot — visually removed, still in DOM */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* status line under the form */
#audit-msg {
  margin-top: 14px;
  min-height: 1.4em;
  font: 400 13px/1.4 var(--mono);
  color: var(--red);
  letter-spacing: .02em;
}

/* loading pulse while the audit runs */
.af-loading #audit-msg { animation: af-pulse 1.1s ease-in-out infinite; }
@keyframes af-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* --- results --- */
#audit-result { padding: 72px 0; }
.af-findings {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.af-finding {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.af-finding:last-child { border-bottom: 1px solid var(--line); }
.af-finding .tag {
  display: inline-block;
  font: 700 11px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--red);
  border: 1px solid var(--line);
  border-radius: 0; /* override the global rounded .tag pill — sharp corners on-brand */
  padding: 6px 10px;
  margin-bottom: 14px;
}
.af-finding h3 {
  margin: 0 0 12px;
  font-family: 'Archivo', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 2.6vw, 26px);
  line-height: 1.15;
  color: var(--ink);
}
.af-finding p { margin: 0 0 10px; }
.af-gap {
  font: 400 16px/1.5 'Archivo', system-ui, sans-serif;
  color: var(--ink);
}
.af-why {
  font: 400 15px/1.55 'Archivo', system-ui, sans-serif;
  color: rgba(10, 10, 10, .65);
}
.af-fix {
  font: 400 15px/1.55 'Archivo', system-ui, sans-serif;
  color: var(--ink);
  padding-left: 14px;
  border-left: 2px solid var(--red);
}
.af-fix b { color: var(--red); font-weight: 700; }

#audit-result .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* respect reduced-motion — kill the loading pulse */
@media (prefers-reduced-motion: reduce) {
  .af-loading #audit-msg { animation: none; }
}

/* --- cinematic site scan (shown while the audit runs) --- */
#audit-scan { margin-top: 16px; }
#audit-scan[hidden] { display: none; }
.af-scan {
  position: relative;
  display: flex;
  gap: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 18px;
  height: 224px;
  overflow: hidden;
}
.af-page {
  position: relative;
  flex: 1;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
}
.af-blk {
  position: absolute;
  background: rgba(10, 10, 10, .08);
  transition: background .2s, box-shadow .2s;
}
.af-blk.lit {
  background: rgba(232, 16, 45, .14);
  box-shadow: inset 0 0 0 1px var(--red);
}
.af-line {
  position: absolute;
  left: 0; right: 0;
  top: 0;
  height: 2px;
  background: var(--red);
  box-shadow: 0 0 14px 2px rgba(232, 16, 45, .55);
}
.af-side {
  width: 150px;
  flex: 0 0 150px;
  font: 400 11px/1.6 var(--mono);
  color: var(--mut);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.af-side .af-v { color: var(--ink); }
.af-bar { height: 4px; background: rgba(10, 10, 10, .1); margin: 4px 0 12px; }
.af-bar i { display: block; height: 100%; width: 0; background: var(--red); transition: width .3s; }
.af-pct {
  font-family: 'Anton', sans-serif;
  font-size: 32px;
  color: var(--ink);
  line-height: 1;
  margin-top: 2px;
}
.af-pop {
  position: absolute;
  font: 700 10px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--red);
  background: #fff;
  border: 1px solid var(--red);
  padding: 3px 5px;
  opacity: 0;
  transition: opacity .15s;
  pointer-events: none;
}
.af-pop.show { opacity: 1; }
@media (max-width: 560px) {
  .af-scan { height: auto; flex-direction: column; }
  .af-page { height: 150px; }
  .af-side { width: 100%; flex: none; }
  .af-pct { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  /* animated scan is JS-skipped under reduced motion; neutralise any transitions if present */
  .af-blk, .af-bar i { transition: none; }
}
