/* The audit question flow, styled once for every page that mounts it.
   Companion to audit-flow.js. Loaded by /audit and by /vsl.

   Why every rule is written out longhand instead of in Tailwind classes: these pages ship a
   PRE-COMPILED Tailwind build, one per page, generated from that page's own markup. A utility
   class that only /audit happened to use has no rule at all on /vsl, so shared markup written in
   utilities would render correctly on one page and broken on the other, silently. The numbers below
   were read out of the live /audit page (computed font-size, line-height, colour, margin of every
   element, at 375px and at 1280px) before the markup moved, so the page looks the same after the
   move as before it. The md breakpoint is Tailwind's own, 768px. */

/* ---------- the screen stack ---------- */
/* All screens sit in one grid cell and cross-fade. The stack is clipped horizontally because the
   screen waiting off to the right (translateX(48px)) used to widen the document by 28px at 375px
   and give /audit a horizontal scrollbar. `clip` rather than `hidden`: `hidden` would make this a
   scroll container and break position:sticky for the player on /vsl. */
.audit-screens-stack { display: grid; min-height: 620px; overflow-x: clip; }
.audit-screens-stack > .audit-screen {
  grid-column: 1; grid-row: 1;
  align-self: start;
  opacity: 0;
  transform: translateX(48px);
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 420ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 420ms;
  will-change: opacity, transform;
}
.audit-screens-stack > .audit-screen.is-active {
  opacity: 1;
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 420ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}
.audit-screens-stack > .audit-screen.is-leaving {
  opacity: 0;
  transform: translateX(-48px);
  visibility: visible;
  pointer-events: none;
  transition:
    opacity 360ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 360ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0s linear 360ms;
}
.audit-screens-stack > .audit-screen.fade-only,
.audit-screens-stack > .audit-screen.fade-only.is-active,
.audit-screens-stack > .audit-screen.fade-only.is-leaving { transform: none !important; }
/* Hide redundant Continue button on auto-advance card screens; keep Back */
.audit-screen[data-screen-kind="cards"] .btn-primary[data-action="advance"] { display: none; }
@media (prefers-reduced-motion: reduce) {
  .audit-screens-stack > .audit-screen,
  .audit-screens-stack > .audit-screen.is-active,
  .audit-screens-stack > .audit-screen.is-leaving { transition-duration: 0s; transform: none !important; }
}

/* ---------- progress ---------- */
#audit-progress-track { height: 3px; background: rgba(255,255,255,0.06); width: 100%; position: fixed; top: 0; left: 0; z-index: 50; }
#audit-progress-fill { height: 100%; background: linear-gradient(to right, #288d71, #5bccac); width: 0%; transition: width 350ms cubic-bezier(0.16,1,0.3,1); }
#audit-progress-label { position: fixed; top: 14px; right: 20px; font-size: 11px; font-weight: 700; letter-spacing: 0.18em; color: #94a3b8; text-transform: uppercase; z-index: 50; }

/* ---------- option cards (Q4/Q5/Q6) ---------- */
.option-card { display: block; width: 100%; padding: 18px 22px; background: rgba(15,23,42,0.6); border: 1px solid rgba(148,163,184,0.2); border-radius: 14px; color: #e2e8f0; font-size: 16px; line-height: 1.45; text-align: left; cursor: pointer; transition: border-color 200ms, background 200ms, transform 200ms; margin-bottom: 12px; font-family: inherit; }
.option-card:hover { border-color: rgba(91,204,172,0.6); background: rgba(15,23,42,0.85); }
.option-card.is-selected { border-color: transparent; background: linear-gradient(rgba(15,23,42,0.95), rgba(15,23,42,0.95)) padding-box, linear-gradient(to right, #288d71, #5bccac) border-box; border: 2px solid transparent; padding: 17px 21px; }

/* ---------- error display ---------- */
@keyframes audit-shake { 0%,100% { transform: translateX(0); } 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }
.audit-error-shake { animation: audit-shake 200ms ease; }
.audit-error-msg { color: #f87171; font-size: 13px; margin-top: 8px; min-height: 1.2em; }
.audit-input-error { border-color: #f87171 !important; box-shadow: 0 0 0 2px rgba(248,113,113,0.2); }
@media (prefers-reduced-motion: reduce) { .audit-error-shake { animation: none; } }

/* ---------- inputs ---------- */
.audit-textarea, .audit-text-input { width: 100%; background: rgba(15,23,42,0.6); border: 1px solid rgba(148,163,184,0.2); border-radius: 12px; color: #f8fafc; font-size: 16px; padding: 16px 18px; font-family: inherit; line-height: 1.5; transition: border-color 200ms; resize: none; }
.audit-textarea:focus, .audit-text-input:focus { outline: none; border-color: #5bccac; }
.audit-textarea { min-height: 130px; }

/* ---------- identity step (asked only when something was not handed over) ---------- */
.af-fields { display: grid; gap: 12px; }
.af-field label { display: block; margin: 0 0 6px; font-size: 13px; line-height: 18px; font-weight: 600; color: #94a3b8; }
/* Every field is pinned to its own cell. A password manager drops a hidden anchor element beside the input
   it decorates, and when that lands as a direct child of this grid it takes a cell of its own: the email
   field moved to the right of an empty cell and the phone field fell to a third row (Samar, 5 Dec 2026,
   on the live page). A pinned field cannot be pushed, and anything that is not a field goes into the first
   cell, where it has no size and the name field covers it. Its inline position cannot be overridden, so
   it is placed rather than hidden. */
.af-fields > :not(.af-field) { grid-row: 1; grid-column: 1; }
@media (min-width: 768px) {
  .af-fields { grid-template-columns: 1fr 1fr; }
  .af-field-full { grid-column: 1 / -1; grid-row: 1; }
  .af-field-email { grid-column: 1; grid-row: 2; }
  .af-field-phone { grid-column: 2; grid-row: 2; }
}
/* The phone picker, in the flow's own colours. Its country list is appended to <body>, above everything. */
.audit-flow .iti { width: 100%; display: block; }
.audit-flow .iti .audit-text-input { padding-left: 5.5rem; }
.audit-flow .iti__selected-flag, .audit-flow .iti__selected-country { background: transparent !important; border-right: 1px solid rgba(51,65,85,0.5); padding: 0 0.75rem; }
.iti--container { z-index: 100000 !important; }
.iti--container .iti__country-list { background: #1e293b !important; border: 1px solid #334155 !important; border-radius: 0.75rem !important; color: #e2e8f0 !important; max-height: 200px !important; box-shadow: 0 -10px 40px rgba(0,0,0,0.5) !important; scrollbar-width: thin; }
.iti--container .iti__search-input { background: #0f172a !important; color: #e2e8f0 !important; border-color: #334155 !important; border-radius: 0.5rem !important; }
.iti--container .iti__country:hover, .iti--container .iti__country--highlight { background: #334155 !important; }
.iti--container .iti__divider { border-bottom-color: #334155 !important; }
.iti__arrow { border-top-color: #94a3b8 !important; }
.iti__arrow--up { border-bottom-color: #94a3b8 !important; }

/* ---------- buttons ---------- */
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #237d64; color: white; font-size: 17px; font-weight: 700; padding: 14px 32px; border-radius: 999px; border: none; cursor: pointer; transition: all 200ms; box-shadow: 0 0 30px rgba(40,141,113,0.4); font-family: inherit; line-height: 1.5; }
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 0 40px rgba(40,141,113,0.6); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-back { background: transparent; color: #94a3b8; font-size: 14px; font-weight: 600; padding: 10px 16px; border: 1px solid rgba(148,163,184,0.2); border-radius: 999px; cursor: pointer; transition: color 200ms, border-color 200ms; font-family: inherit; line-height: 1.5; }
.btn-back:hover { color: #e2e8f0; border-color: rgba(148,163,184,0.4); }
/* Keyboard users get a ring they can actually see on this dark page. :focus-visible only, so a
   mouse click still looks the way it always has. */
.btn-primary:focus-visible, .btn-back:focus-visible, .option-card:focus-visible, .af-link:focus-visible {
  outline: 2px solid #5bccac; outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) { .btn-primary:hover:not(:disabled) { transform: none; } }

/* ---------- Calendly ---------- */
/* Force tall iframe - Calendly's postMessage auto-resize is unreliable in some
   embed contexts and crops content. Explicit height gives the widget enough
   vertical canvas to render event details + calendar + time picker fully. */
.calendly-inline-widget { width: 100%; min-height: 1100px; }
/* When on the Calendly screen, widen the container so Calendly renders its 2-col desktop layout.
   The 2-col breakpoint is ~1000px; below that it falls back to mobile single-col (shorter
   but harder to read). */
.audit-screens-stack.is-wide { max-width: min(1080px, 96vw) !important; }
.audit-screens-stack.is-wide #screen-10 { width: 100%; }

/* ---------- keyboard hint ---------- */
.kbd-hint { font-size: 12px; color: #94a3b8; margin-top: 14px; text-align: center; }
.kbd-hint kbd { font-family: inherit; background: rgba(255,255,255,0.06); border: 1px solid rgba(148,163,184,0.2); border-radius: 4px; padding: 2px 7px; font-size: 11px; }

/* ---------- type and spacing inside a screen ---------- */
/* Each rule below replaces one string of Tailwind utilities from the original markup; the comment
   says which, so the two can be compared. */
.af-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }

/* text-3xl md:text-5xl font-black text-white text-center leading-tight mb-6 */
.af-title { margin: 0 0 24px; font-size: 30px; line-height: 37.5px; font-weight: 900; color: #fff; text-align: center; }

/* text-slate-300 text-base md:text-lg leading-relaxed text-center mb-10 max-w-xl mx-auto */
.af-lead { margin: 0 auto 40px; max-width: 576px; font-size: 16px; line-height: 26px; color: #cbd5e1; text-align: center; }

/* text-2xl md:text-3xl font-bold text-white leading-snug mb-6  (mb-3 with .af-q-tight) */
.af-q { margin: 0 0 24px; font-size: 24px; line-height: 33px; font-weight: 700; color: #fff; }
.af-q-tight { margin-bottom: 12px; }
.af-q-mid { margin-bottom: 16px; }
.af-q-center { text-align: center; }

/* text-xl md:text-2xl font-bold text-white leading-snug mb-5 */
.af-q-sm { margin: 0 0 20px; font-size: 20px; line-height: 27.5px; font-weight: 700; color: #fff; }

/* text-slate-400 text-sm md:text-base mb-6 */
.af-sub { margin: 0 0 24px; font-size: 14px; line-height: 20px; color: #94a3b8; }

/* text-slate-300 text-base leading-relaxed mb-3 / mb-7 / mb-2 */
.af-p { margin: 0 0 12px; font-size: 16px; line-height: 26px; color: #cbd5e1; }
.af-p-gap { margin-bottom: 28px; }
.af-p-tight { margin-bottom: 8px; }
.af-p-center { text-align: center; }

/* text-[#5bccac] font-bold text-base mb-3 */
.af-cue { margin: 0 0 12px; font-size: 16px; line-height: 24px; font-weight: 700; color: #5bccac; }

/* text-slate-500 text-sm leading-relaxed mb-8 text-center */
.af-fine { margin: 0 0 32px; font-size: 14px; line-height: 22.75px; color: #94a3b8; text-align: center; }
.af-consent { margin: 10px 0 0; font-size: 12px; line-height: 18px; color: #94a3b8; text-align: left; }
.af-link { color: #5bccac; text-decoration: underline; }

/* flex justify-between items-center mt-8 */
.af-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 32px; }
/* flex justify-center */
.af-center { display: flex; justify-content: center; }
.af-center-block { text-align: center; }

/* inline-flex items-center justify-center w-14 h-14 rounded-full bg-amber-500/15 border border-amber-400/40 mb-6 */
.af-badge { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 9999px; background: rgba(245,158,11,0.15); border: 1px solid rgba(251,191,36,0.4); margin-bottom: 24px; }
.af-badge svg { width: 28px; height: 28px; color: #fbbf24; }

/* text-center mb-6 (the Calendly screen's heading block) */
.af-cal-head { text-align: center; margin-bottom: 24px; }
.af-cal-sub { margin: 0; font-size: 16px; line-height: 24px; color: #cbd5e1; }

/* w-5 h-5 / w-4 h-4 inline -mt-0.5 — lucide copies these classes onto the svg it draws */
.af-ico { width: 20px; height: 20px; }
.af-ico-sm { width: 16px; height: 16px; display: inline; margin-top: -2px; }

/* The heading gradient, same values as the host pages define, so the module also looks right on a
   page that has never needed it. */
.audit-flow .text-gradient {
  background-clip: text; -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(to right, #288d71, #5bccac);
}

@media (min-width: 768px) {
  .af-title { font-size: 48px; line-height: 48px; }
  .af-lead { font-size: 18px; line-height: 28px; }
  .af-q { font-size: 30px; line-height: 36px; }
  .af-q-sm { font-size: 24px; line-height: 32px; }
  .af-sub { font-size: 16px; line-height: 24px; }
}

/* ---------- page mode: /audit, the flow is the whole page ---------- */
.audit-flow-page { width: 100%; }
.audit-flow-page .audit-screens-stack { width: 100%; max-width: 42rem; margin-left: auto; margin-right: auto; position: relative; }

/* ---------- overlay mode: /vsl, the flow sits beside or beneath a playing video ---------- */
/* The card is a panel of its own here, because it is laid over the page rather than being the page.
   The screens are absolutely stacked rather than grid-stacked so the panel is only as tall as the
   question showing: a grid row is as tall as its tallest item, which on /audit is the 1100px
   Calendly screen, and an empty 1100px panel behind one short question looks broken. */
.audit-flow-overlay {
  background: rgba(2, 6, 23, 0.86);
  border: 1px solid rgba(91, 204, 172, 0.18);
  border-radius: 16px;
  padding: 16px 16px 20px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.75);
}
.audit-flow-overlay .audit-screens-stack {
  display: block;
  position: relative;
  min-height: 0;
  max-width: none !important;
  overflow-x: clip;
}
.audit-flow-overlay .audit-screen { position: absolute; top: 0; left: 0; width: 100%; }
.audit-flow-overlay .audit-screen.is-active { position: relative; }
.audit-flow-overlay #audit-progress-track { position: static; border-radius: 999px; margin-bottom: 10px; }
.audit-flow-overlay #audit-progress-label { position: static; text-align: right; margin-bottom: 10px; display: block; }
/* Nothing to report on the welcome screen, and an empty bar reads as a broken one. */
.audit-flow-overlay[data-screen="0"] #audit-progress-track,
.audit-flow-overlay[data-screen="-2"] #audit-progress-track,
.audit-flow-overlay[data-screen="9"] #audit-progress-track { visibility: hidden; }
.audit-flow-overlay .af-lead { margin-bottom: 20px; max-width: 42rem; }
.audit-flow-overlay .af-q { font-size: 21px; line-height: 29px; }
.audit-flow-overlay .af-q-sm { font-size: 19px; line-height: 26px; }
.audit-flow-overlay .audit-textarea { min-height: 104px; }
.audit-flow-overlay .af-fields { gap: 10px; }
.audit-flow-overlay .af-field .audit-text-input { padding: 12px 14px; }
.audit-flow-overlay .kbd-hint { margin-top: 10px; }
.audit-flow-overlay .option-card { padding: 13px 16px; font-size: 15px; margin-bottom: 9px; }
.audit-flow-overlay .option-card.is-selected { padding: 12px 15px; }
.audit-flow-overlay .af-nav { margin-top: 20px; }
.audit-flow-overlay .btn-primary { font-size: 16px; padding: 12px 22px; }
@media (min-width: 768px) {
  .audit-flow-overlay { padding: 22px 24px 26px; }
  .audit-flow-overlay .af-q { font-size: 24px; line-height: 33px; }
  .audit-flow-overlay .af-q-sm { font-size: 21px; line-height: 29px; }
  .audit-flow-overlay .option-card { padding: 15px 18px; font-size: 16px; }
  .audit-flow-overlay .option-card.is-selected { padding: 14px 17px; }
}
