/* „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;
}
.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;
}

/* 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;
}

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