/* ============================================================
   Diligent - /audit/ page styles
   Layers ON TOP of styles.css + service-ppc.css (the shared frame).
   Reuses: tokens, nav, topbar, footer, buttons, reveal, .band,
   .recon-block/.recon-card (hero signature), .badge-chip, .num,
   .section-head, .final, .steps. Only NEW modules live here:
     A1 - "What we check" grouped audit columns (dark)
     A2 - "What you get back" deliverable (report doc + checklist)
     A3 - the 3-step BREADCRUMB FORM (the core)
     A4 - trust strip
   ============================================================ */

/* ---- hero tweaks: audit signature reuses .recon-block ---- */
.audit-hero .recon-stage { min-height: 472px; }
.audit-hero .recon-row .rv.flag { color: var(--coral-deep); }
.audit-hero .recon-row .rk .src.flag { background: var(--coral); }
.audit-hero .recon-row .rk .src.gap { background: var(--amber); }
.audit-hero .recon-card .rc-scan { display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10.5px; color: var(--coral-deep); }
.audit-hero .recon-card .rc-scan .pulse { width: 7px; height: 7px; border-radius: 50%;
  background: var(--coral); position: relative; }
.audit-hero .recon-card .rc-scan .pulse::after { content:""; position:absolute; inset:0;
  border-radius:50%; background: var(--coral); animation: pulse 1.8s ease-out infinite; }
.audit-hero .hero-note { font-family: var(--mono); font-size: 12px; color: var(--muted-2);
  margin-top: 26px; letter-spacing: .01em; display: flex; align-items: center; gap: 9px; }
.audit-hero .hero-note::before { content:""; width: 16px; height: 1.5px; background: var(--coral); flex-shrink: 0; }

/* ============================================================
   A1 - WHAT WE CHECK: grouped audit columns (dark band)
   Three groups (Google Ads / Analytics / Tag Manager), each a
   headed sub-column of dimensions. Reuses the .dimensions shell.
   ============================================================ */
.check-groups { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.check-col { background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.075));
  border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius); padding: 24px 22px 20px;
  box-shadow: 0 16px 38px rgba(0,0,0,.32); }
.check-col .cc-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px;
  margin-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.16); }
.check-col .cc-mk { width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,.08);
  border: 1px solid var(--line-ink); display: grid; place-items: center; font-family: var(--display);
  font-weight: 700; color: var(--on-dark); font-size: 15px; flex-shrink: 0; }
.check-col:nth-child(1) .cc-mk { background: var(--coral); color: var(--ink); border-color: transparent; }
.check-col .cc-t { font-family: var(--display); font-weight: 700; color: var(--on-dark); font-size: 1.06rem; line-height: 1.1; }
.check-col .cc-t small { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--amber); font-weight: 400; margin-top: 4px; }
.check-col ul { list-style: none; display: flex; flex-direction: column; gap: 0; }
.check-col li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0;
  color: var(--on-dark); font-size: .93rem; line-height: 1.4; border-bottom: 1px solid rgba(255,255,255,.06); }
.check-col li:last-child { border-bottom: none; }
.check-col li .tick { color: var(--amber); font-family: var(--mono); font-size: .82rem; margin-top: 2px; flex-shrink: 0; }
.check-foot { position: relative; display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line-ink); }
.check-foot .cf-note { font-family: var(--mono); font-size: 12px; color: var(--on-dark-mut); letter-spacing: .02em; max-width: 60ch; }
.check-foot .cf-note b { color: var(--amber); font-weight: 500; }
.check-foot .cf-stat { display: flex; align-items: baseline; gap: 10px; flex-shrink: 0; }
.check-foot .cf-stat .v { font-family: var(--mono); font-size: 2.4rem; font-weight: 600; color: var(--on-dark); letter-spacing: -.04em; line-height: 1; }
.check-foot .cf-stat .v .u { color: var(--amber); }
.check-foot .cf-stat .l { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-mut); max-width: 14ch; }

@media (max-width: 860px) { .check-groups { grid-template-columns: 1fr; } }

/* ============================================================
   A2 - WHAT YOU GET BACK: report doc + included list
   ============================================================ */
.deliver-grid { display: grid; grid-template-columns: .92fr 1.08fr; gap: 48px; align-items: center; }

/* the report "document" signature visual */
.report-doc { position: relative; }
.report-doc .rd-paper { background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 26px 26px 22px; }
.report-doc .rd-top { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 16px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.report-doc .rd-kicker { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); }
.report-doc .rd-title { font-family: var(--display); font-weight: 700; color: var(--ink); font-size: 1.16rem; letter-spacing: -.02em; margin-top: 4px; }
.report-doc .rd-pages { font-family: var(--mono); font-size: 10.5px; color: var(--coral-deep); border: 1px solid var(--line);
  border-radius: 7px; padding: 5px 9px; flex-shrink: 0; }
.report-doc .rd-row { display: flex; align-items: flex-start; gap: 13px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.report-doc .rd-row:last-child { border-bottom: none; }
.report-doc .rd-sev { font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  border-radius: 6px; padding: 4px 8px; flex-shrink: 0; min-width: 64px; text-align: center; }
.report-doc .rd-sev.crit { background: rgba(216,80,47,.12); color: var(--coral-deep); }
.report-doc .rd-sev.high { background: rgba(244,162,60,.18); color: #9a6a1a; }
.report-doc .rd-sev.ok { background: rgba(34,167,106,.14); color: #1f8a5b; }
.report-doc .rd-txt { font-size: .94rem; color: var(--text); line-height: 1.32; font-weight: 600; }
.report-doc .rd-sev { margin-top: 1px; }
.report-doc .rd-txt small { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--muted-2); margin-top: 4px; letter-spacing: .01em; font-weight: 400; line-height: 1.4; }
.report-doc .rd-foot { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line);
  font-family: var(--mono); font-size: 10.5px; color: var(--muted-2); letter-spacing: .02em; }
/* a second sheet peeking behind for depth */
.report-doc::before { content: ""; position: absolute; inset: 14px -10px -12px 14px; background: var(--bone-card);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-md); z-index: -1; transform: rotate(2.4deg); }

.deliver-list .dl-intro { color: var(--muted); font-size: 1.08rem; line-height: 1.62; margin-bottom: 24px; max-width: 52ch; }
.deliver-list .dl-intro b { color: var(--ink); font-weight: 600; }
.deliver-steps { display: flex; flex-direction: column; gap: 12px; }
.deliver-row { display: flex; align-items: flex-start; gap: 16px; padding: 18px 20px; background: var(--bone-card);
  border: 1px solid var(--line); border-radius: 14px; }
.deliver-row .dr-ic { width: 40px; height: 40px; border-radius: 11px; background: var(--ink); color: var(--amber);
  display: grid; place-items: center; font-size: 17px; flex-shrink: 0; }
.deliver-row:nth-child(1) .dr-ic { background: var(--coral); color: var(--ink); }
.deliver-row .dr-t { font-family: var(--display); font-weight: 700; color: var(--ink); font-size: 1.06rem; letter-spacing: -.01em; }
.deliver-row .dr-d { color: var(--muted); font-size: .94rem; line-height: 1.5; margin-top: 4px; }

/* the 24h / 5-7 days / 100% strip, adapted for a light band */
.audit-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.audit-step { background: var(--bone-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow-sm); }
.audit-step .as-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--ink); color: var(--amber);
  display: grid; place-items: center; margin-bottom: 16px; font-size: 18px; }
.audit-step .as-v { font-family: var(--mono); font-size: 1.9rem; font-weight: 600; color: var(--ink); letter-spacing: -.03em; line-height: 1; }
.audit-step .as-l { color: var(--muted); margin-top: 8px; font-size: .96rem; line-height: 1.5; }

@media (max-width: 860px) { .deliver-grid { grid-template-columns: 1fr; gap: 36px; }
  .report-doc { max-width: 460px; } }
@media (max-width: 640px) { .audit-steps { grid-template-columns: 1fr; } }

/* ============================================================
   A3 - THE 3-STEP BREADCRUMB FORM (the core)
   ============================================================ */
.form-band { background: var(--ink); color: var(--on-dark); position: relative; overflow: hidden; }
.form-band::before { content:""; position:absolute; top:-26%; right:-8%; width:520px; height:520px; border-radius:50%;
  background: radial-gradient(circle, rgba(236,106,76,.26), transparent 65%); pointer-events:none; }
.form-grid { position: relative; display: grid; grid-template-columns: .82fr 1.18fr; gap: 44px; align-items: start; }

/* left rail - reassurance */
.form-rail .eyebrow.on-dark { margin-bottom: 18px; }
.form-rail h2 { color: var(--on-dark); font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
.form-rail .fr-sub { color: var(--on-dark-mut); font-size: 1.06rem; line-height: 1.62; margin-top: 18px; max-width: 42ch; }
.form-rail .fr-list { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.form-rail .fr-list li { display: flex; align-items: flex-start; gap: 13px; color: var(--on-dark); font-size: .98rem; line-height: 1.45; }
.form-rail .fr-list li .frk { width: 24px; height: 24px; border-radius: 7px; background: rgba(255,255,255,.06);
  border: 1px solid var(--line-ink); color: var(--amber); display: grid; place-items: center; font-size: 12px; flex-shrink: 0; margin-top: 1px; }
.form-rail .fr-list li b { color: var(--on-dark); font-weight: 600; }
.form-rail .fr-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.form-rail .fr-badge { display: inline-flex; align-items: center; gap: 9px; background: rgba(255,255,255,.05);
  border: 1px solid var(--line-ink); border-radius: 11px; padding: 9px 13px; font-size: .82rem; color: var(--on-dark); }
.form-rail .fr-badge .g { width: 22px; height: 22px; border-radius: 6px; background: var(--paper); color: var(--ink);
  display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 12px; flex-shrink: 0; }

/* the form card */
.audit-form-card { background: var(--bone-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.5); padding: 30px 32px 32px; }

/* breadcrumb / progress */
.af-crumbs { list-style: none; display: flex; align-items: center; gap: 0; margin-bottom: 26px; }
.af-crumb { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; }
.af-crumb .afc-dot { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  font-family: var(--mono); font-size: .92rem; font-weight: 600; color: var(--muted-2);
  background: var(--paper); border: 1.5px solid var(--line); transition: all .25s ease; }
.af-crumb .afc-meta { min-width: 0; }
.af-crumb .afc-step { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); }
.af-crumb .afc-label { font-family: var(--display); font-weight: 700; color: var(--ink); font-size: .96rem; line-height: 1.1; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-crumb .afc-line { flex: 1; height: 2px; background: var(--line); margin: 0 12px; border-radius: 2px; position: relative; min-width: 18px; }
.af-crumb .afc-line::after { content:""; position:absolute; inset:0; width:0; background: var(--coral); border-radius: 2px; transition: width .35s ease; }
/* states */
.af-crumb.is-active .afc-dot { background: var(--coral); color: var(--ink); border-color: transparent; box-shadow: var(--shadow-sm); }
.af-crumb.is-done .afc-dot { background: var(--ink); color: var(--on-dark); border-color: transparent; }
.af-crumb.is-done .afc-line::after { width: 100%; }
.af-crumb.is-done { cursor: pointer; }
.af-crumb.is-upcoming .afc-label { color: var(--muted-2); }
@media (max-width: 560px) {
  .af-crumb .afc-meta { display: none; }
  .af-crumb { flex: 0 0 auto; }
  .af-crumb .afc-line { flex: 1; min-width: 24px; }
  .af-crumbs { gap: 0; }
}

/* panels */
/* Visibility is NEVER gated on a keyframe animation: CSS animations sit at frame 0
   in throttled / backgrounded iframes, so an opacity:0 start would leave the panel
   blank. The animation moves transform only; opacity always rests at 1. */
.af-panel { display: none; }
.af-panel.is-active { display: block; opacity: 1; animation: afFade .35s ease; }
@keyframes afFade { from { transform: translateY(8px); } to { transform: none; } }
.af-panel-head { margin-bottom: 18px; }
.af-panel-head .afp-kicker { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--coral-deep); }
.af-panel-head h3 { font-size: 1.36rem; margin-top: 6px; letter-spacing: -.02em; }

.af-field { margin-bottom: 16px; }
.af-field > label { display: block; font-weight: 600; color: var(--ink); font-size: .96rem; margin-bottom: 8px; }
.af-field > label .req { color: var(--coral-deep); }

/* select + input shared shell */
.af-select, .af-input { width: 100%; font-family: var(--body); font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 13px; padding: 14px 16px;
  transition: border-color .18s ease, box-shadow .18s ease; line-height: 1.3; }
.af-select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 5l4 4 4-4' fill='none' stroke='%23D8502F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; }
.af-select:invalid, .af-select.is-placeholder { color: var(--muted-2); }
.af-select:focus, .af-input:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 3px rgba(236,106,76,.16); }
.af-input::placeholder { color: var(--muted-2); }
.af-field.has-error .af-select, .af-field.has-error .af-input { border-color: var(--coral-deep); box-shadow: 0 0 0 3px rgba(216,80,47,.14); }
.af-error { display: none; font-family: var(--mono); font-size: 11.5px; color: var(--coral-deep); margin-top: 7px; letter-spacing: .01em; }
.af-field.has-error .af-error { display: block; }
.af-hint { font-size: .82rem; color: var(--muted-2); margin-top: 7px; display: flex; align-items: center; gap: 7px; line-height: 1.4; }
.af-hint .lock { color: #1f8a5b; flex-shrink: 0; }

/* two-up dropdown rows where it reads better */
.af-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .af-row2 { grid-template-columns: 1fr; } }

/* actions */
.af-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 24px; }
.af-actions .af-back { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--muted);
  font-size: .96rem; background: none; padding: 8px 4px; }
.af-actions .af-back:hover { color: var(--ink); }
.af-actions .af-spacer { flex: 1; }
.af-actions .btn { box-shadow: var(--shadow-sm); }
.af-actions .btn-primary { box-shadow: var(--shadow-warm); }
.af-progress-note { font-family: var(--mono); font-size: 11px; color: var(--muted-2); text-align: center; margin-top: 16px; letter-spacing: .02em; }

/* success state */
.af-success { display: none; text-align: center; padding: 22px 10px 14px; animation: afFade .4s ease; }
.af-success.is-shown { display: block; opacity: 1; }
.af-success .afs-check { width: 64px; height: 64px; border-radius: 50%; background: var(--coral); color: var(--ink);
  display: grid; place-items: center; margin: 0 auto 22px; font-size: 30px; box-shadow: var(--shadow-md); }
.af-success h3 { font-size: 1.6rem; }
.af-success p { color: var(--muted); font-size: 1.04rem; line-height: 1.6; margin: 14px auto 0; max-width: 42ch; }
.af-success .afs-meta { font-family: var(--mono); font-size: 11.5px; color: var(--muted-2); margin-top: 22px;
  padding-top: 20px; border-top: 1px solid var(--line); letter-spacing: .02em; }

@media (max-width: 860px) {
  .form-grid { grid-template-columns: 1fr; gap: 32px; }
  .audit-form-card { padding: 26px 22px 28px; }
}

/* ============================================================
   A4 - TRUST STRIP
   ============================================================ */
.trust-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px 28px; }
.trust-item { padding: 0; }
.trust-item .ti-ic { width: 38px; height: 38px; border-radius: 50%; background: var(--bone-2); color: var(--coral-deep);
  display: grid; place-items: center; font-size: 16px; margin-bottom: 16px; border: 1px solid var(--line); }
.trust-item:nth-child(1) .ti-ic { background: var(--coral); color: var(--ink); border-color: transparent; }
.trust-item h4 { font-family: var(--display); font-size: 1.02rem; line-height: 1.18; }
.trust-item p { color: var(--muted); font-size: .9rem; line-height: 1.55; margin-top: 8px; }
@media (max-width: 860px) { .trust-strip { grid-template-columns: 1fr 1fr; gap: 30px 24px; } }
@media (max-width: 480px) { .trust-strip { grid-template-columns: 1fr; gap: 26px; } }

/* submit-level error note (network/server failure) - added for the live POST path
   (the prototype mock had no error state). Sits below the actions on step 3. */
.af-submit-error { margin-top: 16px; font-family: var(--mono); font-size: 12px; line-height: 1.5;
  color: var(--coral-deep); background: rgba(216,80,47,.1); border: 1px solid rgba(216,80,47,.32);
  border-radius: 11px; padding: 12px 14px; }
