/* „Audyt chaosu operacyjnego" — LP interaktywnej ankiety. Współgra z order-implementation.css
   (klasy oi-* dla formularza, btn-hero-primary). Tu tylko powłoka quizu (aq-*). Marka: fiolet. */
:root {
  --aq-purple: #7b5fbf;
  --aq-purple-deep: #5f498e;
  --aq-purple-dark: #3d2a63;
  --aq-bg: #f8f8fa;
  --aq-ink: #1a1a2e;
  --aq-muted: #6b7080;
}

/* Mini hero — kompaktowy wariant doko-hero (mniej pionu, bo karta quizu go nakrywa) */
.aq-hero .doko-hero-content {
  padding: 44px 0 116px;
  max-width: 680px;
}

/* Sekcja quizu: karta „wjeżdża" w dolną krawędź hero */
.aq-wrap {
  position: relative;
  margin-top: -72px;
  padding: 0 0 4rem;
  background: linear-gradient(180deg, transparent 0 72px, #fff 72px, var(--aq-bg) 100%);
}
.aq-glow {
  position: absolute;
  top: -2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 52rem;
  max-width: 92vw;
  height: 26rem;
  background: radial-gradient(closest-side, rgba(123, 95, 191, 0.14), transparent);
  pointer-events: none;
  z-index: 1;
}

/* Karta quizu */
.aq-quiz {
  position: relative;
  z-index: 2;
  max-width: 46rem;
  margin: 0 auto;
  width: 100%;
  background: #fff;
  border: 1px solid rgba(123, 95, 191, 0.12);
  border-radius: 1.5rem;
  box-shadow: 0 24px 60px rgba(61, 42, 99, 0.16);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  overflow: hidden;
  /* Zapas na przyklejone menu (#stickyToolbar, fixed ~60px) przy każdym natywnym scrollu do karty. */
  scroll-margin-top: 84px;
}

/* Pasek postępu */
.aq-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}
.aq-progress-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(123, 95, 191, 0.15);
  overflow: hidden;
}
.aq-progress-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--aq-purple), var(--aq-purple-deep));
  transition: width 0.35s ease;
}
.aq-progress-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--aq-purple-deep);
  white-space: nowrap;
}

/* Ekrany */
.aq-screen {
  animation: aq-fade 0.35s ease;
}
.aq-screen--center {
  text-align: center;
}
@keyframes aq-fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.aq-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(123, 95, 191, 0.1);
  color: var(--aq-purple-deep);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}
.aq-badge svg {
  width: 1rem;
  height: 1rem;
}

.aq-title {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--aq-ink);
  margin-bottom: 1rem;
}
.aq-lead {
  font-size: 1.1rem;
  color: var(--aq-muted);
  max-width: 34rem;
  margin: 0 auto 1rem;
}
.aq-note {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--aq-purple-deep);
  margin-bottom: 2rem;
}
.aq-note svg {
  width: 1.05rem;
  height: 1.05rem;
}
.aq-start {
  font-size: 1.05rem;
}

/* Pytania */
/* Ikona + tytuł ekranu powitania (kompaktowy start pod hero) */
.aq-welcome-icon {
  width: 3.75rem;
  height: 3.75rem;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--aq-purple-deep);
  background: rgba(123, 95, 191, 0.1);
  box-shadow: 0 0 0 8px rgba(123, 95, 191, 0.05);
}
.aq-welcome-icon svg {
  width: 1.9rem;
  height: 1.9rem;
}
.aq-welcome-title {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 800;
  color: var(--aq-ink);
  margin-bottom: 0.6rem;
}

/* Pill z numerem pytania (lekka dekoracja kroku) */
.aq-q-index {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(123, 95, 191, 0.09);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--aq-purple-deep);
  margin-bottom: 0.85rem;
}
.aq-q-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--aq-purple);
  animation: aq-pulse 1.6s ease-in-out infinite;
}
@keyframes aq-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.7);
  }
}
.aq-q-text {
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--aq-ink);
  margin-bottom: 1.25rem;
}
.aq-examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}
.aq-examples-label {
  font-size: 0.85rem;
  color: var(--aq-muted);
}
.aq-chip {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(123, 95, 191, 0.25);
  font-size: 0.8rem;
  color: var(--aq-purple-deep);
}

.aq-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.aq-answer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.15rem 1rem;
  border-radius: 1rem;
  border: 2px solid rgba(123, 95, 191, 0.25);
  background: #fff;
  color: var(--aq-ink);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}
.aq-answer svg {
  width: 1.25rem;
  height: 1.25rem;
}
.aq-answer:hover {
  transform: translateY(-2px);
  border-color: var(--aq-purple);
  box-shadow: 0 10px 24px rgba(123, 95, 191, 0.18);
}
.aq-answer--yes:hover,
.aq-answer--yes.is-active {
  background: linear-gradient(135deg, var(--aq-purple), var(--aq-purple-deep));
  border-color: transparent;
  color: #fff;
}
.aq-answer--no.is-active {
  border-color: var(--aq-purple);
  background: rgba(123, 95, 191, 0.08);
}
.aq-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  color: var(--aq-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0;
}
.aq-back svg {
  width: 1rem;
  height: 1rem;
}
.aq-back:hover {
  color: var(--aq-purple-deep);
}

/* Analiza */
.aq-spinner {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1.25rem;
  border: 4px solid rgba(123, 95, 191, 0.2);
  border-top-color: var(--aq-purple);
  border-radius: 50%;
  animation: aq-spin 0.8s linear infinite;
}
@keyframes aq-spin {
  to {
    transform: rotate(360deg);
  }
}
.aq-analysis-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--aq-purple-deep);
}

/* Wynik */
.aq-score {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.aq-score-num {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  color: var(--aq-purple);
}
.aq-score-max {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--aq-muted);
}
.aq-score-cap {
  flex-basis: 100%;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--aq-muted);
  margin-top: 0.35rem;
}
.aq-result-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.aq-result-icon svg {
  width: 2rem;
  height: 2rem;
}
.aq-result-icon--low {
  background: rgba(40, 167, 69, 0.12);
  color: #28a745;
}
.aq-result-icon--medium {
  background: rgba(245, 158, 11, 0.14);
  color: #d97706;
}
.aq-result-icon--high {
  background: rgba(220, 53, 69, 0.12);
  color: #dc3545;
}
.aq-result-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--aq-ink);
  margin-bottom: 0.75rem;
}
.aq-result-desc {
  font-size: 1.05rem;
  color: var(--aq-muted);
  max-width: 32rem;
  margin: 0 auto 1.5rem;
}

/* Poziom chaosu (ekran wyniku) — kolor zależny od progu (band ustawia JS) */
.aq-level {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 1.25rem;
}
.aq-level[data-band='low'] {
  color: #28a745;
}
.aq-level[data-band='medium'] {
  color: #d97706;
}
.aq-level[data-band='high'] {
  color: #dc3545;
}

/* Krotki opis wyniku (0-39 / 40-69 / 70-100) - tresc wstawia JS z audit.result.descriptions. */
.aq-level-desc {
  max-width: 34rem;
  margin: -0.75rem auto 1.5rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--aq-muted);
}

/* Wykryte obszary (do 4) — lista wypełniana przez JS */
.aq-areas {
  max-width: 26rem;
  margin: 0 auto 1.75rem;
  text-align: left;
}
.aq-areas-title {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--aq-muted);
  margin-bottom: 0.6rem;
}
.aq-areas-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.aq-areas-list li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0;
  font-weight: 600;
  color: var(--aq-ink);
}
.aq-areas-check {
  color: var(--aq-purple);
  font-weight: 900;
  flex-shrink: 0;
}
.aq-areas-empty {
  color: var(--aq-muted);
  font-weight: 500;
}

/* Zapewnienie „bez spamu" na formularzu */
.aq-reassure {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
}
.aq-reassure li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--aq-muted);
}
.aq-reassure svg {
  width: 0.95rem;
  height: 0.95rem;
  color: #28a745;
}

/* Linki drugorzędne na stronie podziękowania (pod głównym CTA „Umów konsultację") */
.aq-done-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: center;
  margin-top: 1rem;
}
.aq-result-list {
  list-style: none;
  padding: 0;
  max-width: 20rem;
  margin: 0 auto 1.75rem;
  text-align: left;
}
.aq-result-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0;
  font-weight: 600;
  color: var(--aq-ink);
}
.aq-result-list svg {
  width: 1.1rem;
  height: 1.1rem;
  color: #28a745;
}

/* Panel „raport gotowy" — wspólny na ekranie wyniku (lejek: wynik → e-mail → raport) */
.aq-report {
  max-width: 34rem;
  margin: 1.75rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(123, 95, 191, 0.15);
}
.aq-report-ready {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--aq-ink);
  margin-bottom: 1.25rem;
}
.aq-report-ready svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--aq-purple);
  flex-shrink: 0;
}
.aq-report-benefits {
  text-align: left;
  max-width: 22rem;
  margin: 0 auto 1.25rem;
}
.aq-report-benefits-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--aq-purple-deep);
  margin-bottom: 0.5rem;
}
.aq-report-benefits ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.aq-report-benefits li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0;
  color: var(--aq-ink);
}
.aq-report-benefits svg {
  width: 1rem;
  height: 1rem;
  color: #28a745;
  flex-shrink: 0;
}

/* Fragment raportu — podgląd 3 obszarów + zajawka „reszta na e-mail" */
.aq-report-preview {
  background: var(--aq-bg);
  border: 1px solid rgba(123, 95, 191, 0.15);
  border-radius: 0.9rem;
  padding: 1rem 1.15rem;
  margin-bottom: 1.5rem;
}
.aq-report-preview-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--aq-muted);
  margin-bottom: 0.7rem;
}
.aq-report-preview-label svg {
  width: 0.85rem;
  height: 0.85rem;
}
.aq-report-areas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.aq-report-area {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--aq-purple-deep);
  background: rgba(123, 95, 191, 0.1);
  border-radius: 0.6rem;
  padding: 0.4rem 0.85rem;
}
.aq-report-note {
  font-size: 0.9rem;
  color: var(--aq-muted);
  margin: 0;
}
.aq-report-cta {
  margin-top: 0.25rem;
}
.aq-report-timing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--aq-muted);
  margin: 0.85rem 0 0;
}
.aq-report-timing svg {
  width: 0.95rem;
  height: 0.95rem;
}

/* Teaser wyniku na górze formularza (zastępuje osobny ekran wyniku — szczegóły idą na e-mail) */
.aq-teaser {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(123, 95, 191, 0.15);
}
.aq-teaser-score {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  flex-wrap: wrap;
  justify-content: center;
}
.aq-teaser-score-num {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
  color: var(--aq-purple);
}
.aq-teaser-score-max {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--aq-muted);
}
.aq-teaser-score-cap {
  flex-basis: 100%;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--aq-muted);
  margin-top: 0.25rem;
}
.aq-teaser-band {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--aq-ink);
  margin: 0.6rem 0 0;
}

/* Formularz */
.aq-form-sub {
  font-size: 1rem;
  color: var(--aq-muted);
  max-width: 30rem;
  margin: 0 auto;
}
.aq-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.5rem;
}
.aq-radio-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.aq-choice {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.85rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(123, 95, 191, 0.2);
  background: #fff;
  font-size: 0.92rem;
  color: var(--aq-ink);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}
.aq-choice:hover {
  border-color: var(--aq-purple);
}
.aq-choice input {
  accent-color: var(--aq-purple);
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}
.aq-choice:has(input:checked) {
  border-color: var(--aq-purple);
  background: rgba(123, 95, 191, 0.07);
}

.aq-done-extra {
  font-size: 1rem;
  color: var(--aq-purple-deep);
  background: rgba(123, 95, 191, 0.08);
  border-radius: 0.75rem;
  padding: 0.85rem 1.15rem;
  max-width: 32rem;
  margin: 0 auto;
}
.aq-done-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
}
.aq-done-again {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: var(--aq-purple-deep);
  text-decoration: none;
}
.aq-done-again:hover {
  text-decoration: underline;
}
.aq-done-again svg {
  width: 1rem;
  height: 1rem;
}

@media (max-width: 575px) {
  .aq-answers {
    grid-template-columns: 1fr;
  }
}

/* ── Audyt v2: skala częstotliwości 0–3 ─────────────────────────────── */
.aq-scale {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 1.25rem;
}
.aq-scale-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  border: 1.5px solid rgba(95, 73, 142, .22);
  border-radius: 12px;
  background: #fff;
  font-weight: 600;
  font-size: .9rem;
  color: #3d2a63;
  cursor: pointer;
  transition: border-color .12s, background .12s, transform .12s;
}
.aq-scale-btn:hover { border-color: #5f498e; transform: translateY(-1px); }
.aq-scale-btn.is-active { border-color: #5f498e; background: rgba(95, 73, 142, .08); }
.aq-scale-dots { display: flex; gap: 3px; }
.aq-scale-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5f498e;
  opacity: .85;
}

/* ── Audyt v2: wynik /100 ───────────────────────────────────────────── */
.aq-score--v2 { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.aq-score-title {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #5f498e;
}

/* ── Audyt v2: sekcja PRODUKT (scenki) ──────────────────────────────── */
.aq-product { margin-top: 2.5rem; }
.aq-product-title {
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  font-weight: 800;
  text-align: center;
  color: #1f1b2e;
  margin-bottom: .4rem;
}
.aq-product-sub { text-align: center; color: #6b6880; margin-bottom: 1.5rem; }
.aq-product-scenes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.aq-scene {
  margin: 0;
  border: 1px solid rgba(95, 73, 142, .16);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(31, 27, 46, .06);
}
.aq-scene img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
  border-bottom: 1px solid rgba(95, 73, 142, .12);
}
.aq-scene figcaption { padding: 12px 14px 14px; }
.aq-scene-q {
  display: block;
  font-weight: 700;
  color: #3d2a63;
  margin-bottom: 4px;
}
.aq-scene-desc { display: block; font-size: .85rem; color: #55506a; line-height: 1.45; }

/* ── Audyt v2: jedno CTA + odsłaniany formularz ─────────────────────── */
.aq-cta { margin-top: 2.25rem; }
.aq-form-wrap { margin-top: 2.25rem; scroll-margin-top: 90px; }

@media (max-width: 767px) {
  .aq-product-scenes { grid-template-columns: 1fr; }
  .aq-scale { grid-template-columns: repeat(2, 1fr); }
}

/* ── Tryb audytu: jednotorowa sciezka pytanie -> odpowiedz -> wynik ──────
   Klasy na <body> ustawia audit-quiz.js (setFunnelState).
   .aq-in-progress = ekrany pytan 1/5-5/5, .aq-form-open = odsloniety formularz. */
body.aq-in-progress .gto-section {
  display: none;
}

/* Pływajace przyciski (? i "do gory") potrafia na malym ekranie zaslonic tresc
   i CTA - w trakcie audytu oraz na formularzu chowamy je na mobile. */
@media (max-width: 767px) {
  body.aq-in-progress .doko-fab-stack,
  body.aq-form-open .doko-fab-stack {
    display: none;
  }
}
