/* =====================================================
   PNBIOTICS — FIND YOUR PROBIOTICS
   Clean, polished, not overly fancy
===================================================== */

.pn-quiz-page {
  position: relative;
  display: flex;
  min-height: calc(100svh - 95px);
  align-items: center;
  overflow: hidden;
  padding: 24px 0 38px;
  background:
    radial-gradient(
      circle at 88% 8%,
      rgba(59, 182, 166, 0.12),
      transparent 29%
    ),
    radial-gradient(
      circle at 7% 94%,
      rgba(84, 156, 194, 0.08),
      transparent 27%
    ),
    #f5faf8;
}

.pn-quiz-page *,
.pn-quiz-page *::before,
.pn-quiz-page *::after {
  box-sizing: border-box;
}


/* =====================================================
   BACKGROUND DECORATION
===================================================== */

.pn-quiz-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.pn-quiz-orb {
  position: absolute;
  border-radius: 50%;
}

.pn-quiz-orb-one {
  top: -300px;
  right: -220px;
  width: 650px;
  height: 650px;
  border: 1px solid rgba(59, 182, 166, 0.10);
}

.pn-quiz-orb-two {
  bottom: -320px;
  left: -210px;
  width: 570px;
  height: 570px;
  background:
    radial-gradient(
      circle,
      rgba(59, 182, 166, 0.09),
      transparent 67%
    );
}

.pn-quiz-dot-pattern {
  position: absolute;
  right: 6%;
  bottom: 8%;
  width: 105px;
  height: 105px;
  opacity: 0.22;
  background-image:
    radial-gradient(
      rgba(59, 182, 166, 0.55) 1px,
      transparent 1px
    );
  background-size: 13px 13px;
}


/* =====================================================
   MAIN SHELL
===================================================== */

.pn-quiz-container {
  position: relative;
  z-index: 2;
  width: 100%;
}

.pn-quiz-shell {
  width: min(1080px, 100%);
  min-height: min(650px, calc(100svh - 140px));
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(21, 50, 55, 0.09);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 28px 72px rgba(21, 50, 55, 0.10);
}


/* =====================================================
   HEADER
===================================================== */

.pn-quiz-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 35px;
  padding: 25px 31px 21px;
  border-bottom: 1px solid rgba(21, 50, 55, 0.08);
  background:
    linear-gradient(
      135deg,
      #f8fcfb,
      #ffffff
    );
}

.pn-quiz-header-copy {
  min-width: 0;
}

.pn-quiz-kicker,
.pn-quiz-stage-label {
  display: block;
  color: #15998a;
  font-size: 0.63rem;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.pn-quiz-header h1 {
  margin: 8px 0 0;
  color: #153237;
  font-family: Manrope, sans-serif;
  font-size: clamp(2.2rem, 3.7vw, 3.7rem);
  font-weight: 800;
  line-height: 0.97;
  letter-spacing: -0.06em;
}

.pn-quiz-header h1 em {
  color: #3bb6a6;
  font-style: normal;
}

.pn-quiz-header-meta {
  display: flex;
  max-width: 365px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.pn-quiz-header-meta span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgba(21, 50, 55, 0.08);
  border-radius: 999px;
  background: #ffffff;
  color: #607774;
  font-size: 0.61rem;
  font-weight: 750;
}


/* =====================================================
   QUIZ STAGES
===================================================== */

.pn-quiz-stage {
  min-height: 500px;
  padding: 28px 31px 24px;
}

.pn-quiz-stage[hidden] {
  display: none !important;
}

.pn-quiz-stage.is-entering {
  animation: pnQuizStageIn 0.3s ease both;
}

@keyframes pnQuizStageIn {
  from {
    opacity: 0;
    transform: translateY(9px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* =====================================================
   START SCREEN
===================================================== */

.pn-quiz-start-stage {
  background:
    radial-gradient(
      circle at 91% 12%,
      rgba(59, 182, 166, 0.08),
      transparent 25%
    ),
    #ffffff;
}

.pn-quiz-start-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1.08fr)
    minmax(315px, 0.92fr);
  min-height: 380px;
  align-items: center;
  gap: clamp(2.8rem, 3vw, 2.8rem);
}

.pn-quiz-start-copy {
  max-width: 620px;
}

.pn-quiz-start-copy h2 {
  margin: 11px 0 17px;
  color: #153237;
  font-family: Manrope, sans-serif;
  font-size: clamp(2.8rem, 5vw, 2.8rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.065em;
}

.pn-quiz-start-copy > p {
  max-width: 580px;
  margin: 0;
  color: #667a7d;
  font-size: 0.9rem;
  line-height: 1.72;
}


/* Start button */

.pn-quiz-page button.pn-quiz-start-button {
  display: inline-grid !important;
  grid-template-columns: 30px auto 22px;
  min-width: 215px;
  min-height: 53px;
  align-items: center;
  gap: 10px;
  margin-top: 27px;
  padding: 0 18px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background:
    linear-gradient(
      135deg,
      #153237,
      #1e4646
    ) !important;
  color: #ffffff !important;
  cursor: pointer;
  font: inherit !important;
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  text-align: left;
  box-shadow:
    0 15px 32px rgba(21, 50, 55, 0.18);
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.pn-quiz-page button.pn-quiz-start-button:hover {
  background:
    linear-gradient(
      135deg,
      #198f82,
      #3bb6a6
    ) !important;
  transform: translateY(-2px);
  box-shadow:
    0 19px 38px rgba(59, 182, 166, 0.24);
}

.pn-quiz-start-icon {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  background: #3bb6a6;
  color: #ffffff;
  font-size: 0.66rem;
}

.pn-quiz-start-arrow {
  justify-self: end;
  transition: transform 0.22s ease;
}

.pn-quiz-start-button:hover .pn-quiz-start-arrow {
  transform: translateX(3px);
}


/* Preview card */

.pn-quiz-start-preview {
  position: relative;
  padding: 23px;
  border: 1px solid rgba(21, 50, 55, 0.09);
  border-radius: 23px;
  background:
    linear-gradient(
      145deg,
      #f4faf8,
      #ffffff
    );
  box-shadow:
    0 18px 42px rgba(21, 50, 55, 0.07);
}

.pn-quiz-start-preview::before {
  content: "";
  position: absolute;
  top: 0;
  right: 24px;
  left: 24px;
  height: 3px;
  border-radius: 0 0 5px 5px;
  background:
    linear-gradient(
      90deg,
      #3bb6a6,
      #85ddcf
    );
}

.pn-quiz-preview-kicker {
  display: block;
  margin-bottom: 15px;
  color: #81918e;
  font-size: 0.59rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.pn-quiz-preview-item {
  display: grid;
  grid-template-columns: 37px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(21, 50, 55, 0.08);
  border-radius: 15px;
  background: #ffffff;
}

.pn-quiz-preview-item + .pn-quiz-preview-item {
  margin-top: 10px;
}

.pn-quiz-preview-item.is-highlighted {
  border-color: rgba(59, 182, 166, 0.31);
  background:
    linear-gradient(
      135deg,
      #eaf8f4,
      #ffffff
    );
}

.pn-quiz-preview-index {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 11px;
  background: #f1f7f5;
  color: #81918e;
  font-size: 0.61rem;
  font-weight: 850;
}

.pn-quiz-preview-item.is-highlighted
.pn-quiz-preview-index {
  background: #3bb6a6;
  color: #ffffff;
}

.pn-quiz-preview-item strong {
  display: block;
  color: #153237;
  font-size: 0.81rem;
  font-weight: 800;
}

.pn-quiz-preview-item small {
  display: block;
  margin-top: 3px;
  color: #81918e;
  font-size: 0.66rem;
  line-height: 1.4;
}

.pn-quiz-preview-status {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  background: rgba(59, 182, 166, 0.11);
  color: #3bb6a6;
  font-size: 0.68rem;
  font-weight: 850;
}

.pn-quiz-preview-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.pn-quiz-preview-formats span {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  background: #edf6f3;
  color: #506d69;
  font-size: 0.6rem;
  font-weight: 750;
}


/* Bottom stats */

.pn-quiz-start-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(21, 50, 55, 0.08);
}

.pn-quiz-start-footer > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pn-quiz-start-footer > div + div {
  padding-left: 24px;
  border-left: 1px solid rgba(21, 50, 55, 0.08);
}

.pn-quiz-start-footer strong {
  color: #3bb6a6;
  font-family: Manrope, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
}

.pn-quiz-start-footer span {
  color: #667a7d;
  font-size: 0.66rem;
}


/* =====================================================
   PROGRESS
===================================================== */

.pn-quiz-progress {
  margin-bottom: 22px;
}

.pn-quiz-progress-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 8px;
  color: #657a77;
  font-size: 0.7rem;
  font-weight: 750;
}

.pn-quiz-progress-top strong {
  color: #15998a;
}

.pn-quiz-progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6efed;
}

.pn-quiz-progress-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(
      90deg,
      #3bb6a6,
      #7bd8ca
    );
  box-shadow:
    0 0 13px rgba(59, 182, 166, 0.25);
  transition: width 0.3s ease;
}

.pn-quiz-progress-dots {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.pn-quiz-progress-dot {
  width: 8px;
  height: 8px;
  border: 1px solid rgba(21, 50, 55, 0.14);
  border-radius: 50%;
  background: #ffffff;
}

.pn-quiz-progress-dot.is-complete {
  border-color: #3bb6a6;
  background: #3bb6a6;
}

.pn-quiz-progress-dot.is-current {
  border-color: #3bb6a6;
  background: #ffffff;
  box-shadow:
    0 0 0 4px rgba(59, 182, 166, 0.13);
}


/* =====================================================
   QUESTION
===================================================== */

.pn-quiz-question-content {
  min-height: 355px;
}

.pn-quiz-question-content h2 {
  max-width: 840px;
  margin: 10px 0 10px;
  color: #153237;
  font-family: Manrope, sans-serif;
  font-size: clamp(2.3rem, 4.1vw, 4rem);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.pn-quiz-question-help {
  margin: 0;
  color: #667a7d;
  font-size: 0.8rem;
  line-height: 1.6;
}


/* =====================================================
   OPTION GRID
===================================================== */

.pn-quiz-options {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-top: 20px;
}

.pn-quiz-options[data-question="goal"] {
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
}


/* =====================================================
   OPTION BUTTON
===================================================== */

.pn-quiz-page button.pn-quiz-option {
  position: relative;
  display: grid !important;
  grid-template-columns:
    35px
    minmax(0, 1fr)
    24px;
  width: 100% !important;
  min-height: 74px !important;
  align-items: center;
  gap: 11px;
  margin: 0 !important;
  padding: 13px 14px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  border: 1px solid rgba(21, 50, 55, 0.11) !important;
  border-radius: 17px !important;
  outline: none !important;
  background:
    linear-gradient(
      145deg,
      #ffffff,
      #f8fbfa
    ) !important;
  color: #153237 !important;
  cursor: pointer;
  font: inherit !important;
  text-align: left !important;
  box-shadow:
    0 8px 19px rgba(21, 50, 55, 0.045) !important;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease !important;
}

.pn-quiz-page button.pn-quiz-option::before {
  content: "";
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 0;
  width: 3px;
  border-radius: 0 5px 5px 0;
  background: #3bb6a6;
  opacity: 0;
  transform: scaleY(0.45);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.pn-quiz-page button.pn-quiz-option:hover {
  border-color: rgba(59, 182, 166, 0.50) !important;
  background:
    linear-gradient(
      145deg,
      #ffffff,
      #eff9f6
    ) !important;
  transform: translateY(-2px);
  box-shadow:
    0 13px 28px rgba(21, 50, 55, 0.09) !important;
}

.pn-quiz-page button.pn-quiz-option.is-selected {
  border-color: #3bb6a6 !important;
  background:
    linear-gradient(
      145deg,
      #e7f7f2,
      #f8fcfb
    ) !important;
  box-shadow:
    0 14px 30px rgba(59, 182, 166, 0.15) !important;
}

.pn-quiz-page button.pn-quiz-option.is-selected::before {
  opacity: 1;
  transform: scaleY(1);
}


/* Option number */

.pn-quiz-option-index {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(21, 50, 55, 0.10);
  border-radius: 11px;
  background: #f1f6f5;
  color: #81918e;
  font-size: 0.61rem;
  font-weight: 850;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.pn-quiz-option.is-selected
.pn-quiz-option-index {
  border-color: #3bb6a6;
  background: #3bb6a6;
  color: #ffffff;
}


/* Option content */

.pn-quiz-option-copy {
  min-width: 0;
}

.pn-quiz-option-copy strong {
  display: block;
  color: #153237;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.25;
}

.pn-quiz-option-copy small {
  display: block;
  margin-top: 4px;
  color: #7c918e;
  font-size: 0.67rem;
  line-height: 1.38;
}


/* Selected tick */

.pn-quiz-option-check {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  background: rgba(59, 182, 166, 0.12);
  color: #3bb6a6;
  font-size: 0.67rem;
  font-weight: 900;
  opacity: 0;
  transform: scale(0.6);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.pn-quiz-option.is-selected
.pn-quiz-option-check {
  opacity: 1;
  transform: scale(1);
}


/* =====================================================
   BOTTOM NAVIGATION
===================================================== */

.pn-quiz-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(21, 50, 55, 0.08);
}

.pn-quiz-page button.pn-quiz-back-button,
.pn-quiz-page button.pn-quiz-restart-button {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #667a7d !important;
  cursor: pointer;
  font: inherit !important;
  font-size: 0.75rem !important;
  font-weight: 750 !important;
  box-shadow: none !important;
}

.pn-quiz-page button.pn-quiz-back-button:hover,
.pn-quiz-page button.pn-quiz-restart-button:hover {
  color: #153237 !important;
}

.pn-quiz-select-note {
  color: #93a29f;
  font-size: 0.64rem;
}


/* =====================================================
   RESULTS
===================================================== */

.pn-quiz-result-heading h2 {
  margin: 10px 0;
  color: #153237;
  font-family: Manrope, sans-serif;
  font-size: clamp(2.2rem, 3.8vw, 3.7rem);
  font-weight: 800;
  line-height: 0.97;
  letter-spacing: -0.06em;
}

.pn-quiz-result-heading p {
  margin: 0;
  color: #667a7d;
  font-size: 0.8rem;
  line-height: 1.6;
}

.pn-quiz-result-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.pn-quiz-result-card {
  position: relative;
  overflow: hidden;
  min-height: 215px;
  padding: 21px;
  border: 1px solid rgba(21, 50, 55, 0.10);
  border-radius: 21px;
  background:
    linear-gradient(
      145deg,
      #ffffff,
      #f6faf8
    );
}

.pn-quiz-result-card::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 145px;
  height: 145px;
  border-radius: 50%;
  background:
    radial-gradient(
      circle,
      rgba(59, 182, 166, 0.13),
      transparent 70%
    );
}

.pn-quiz-result-card.is-primary {
  border-color: rgba(59, 182, 166, 0.36);
  background:
    linear-gradient(
      145deg,
      #e7f7f2,
      #ffffff
    );
}

.pn-quiz-result-card > * {
  position: relative;
  z-index: 2;
}

.pn-quiz-result-label {
  display: block;
  margin-bottom: 10px;
  color: #81918e;
  font-size: 0.6rem;
  font-weight: 850;
  letter-spacing: 0.11em;
}

.pn-quiz-result-card.is-primary
.pn-quiz-result-label {
  color: #15998a;
}

.pn-quiz-result-format {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #ffffff;
  color: #15998a;
  font-size: 0.6rem;
  font-weight: 800;
}

.pn-quiz-result-card h3 {
  margin: 12px 0 8px;
  color: #153237;
  font-family: Manrope, sans-serif;
  font-size: 1.48rem;
  font-weight: 780;
  line-height: 1.1;
}

.pn-quiz-result-card p {
  margin: 0;
  color: #667a7d;
  font-size: 0.76rem;
  line-height: 1.55;
}

.pn-quiz-result-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  color: #153237;
  font-size: 0.75rem;
  font-weight: 800;
  text-decoration: none;
}

.pn-quiz-result-card.is-primary
.pn-quiz-result-link {
  color: #15998a;
}

.pn-quiz-result-actions {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-top: 18px;
}

.pn-quiz-disclaimer {
  display: block;
  margin-top: 12px;
  color: #93a29f;
  font-size: 0.61rem;
}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 900px) {
  .pn-quiz-page {
    min-height: auto;
    align-items: flex-start;
    padding: 18px 0 35px;
  }

  .pn-quiz-shell {
    min-height: auto;
  }

  .pn-quiz-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .pn-quiz-header-meta {
    justify-content: flex-start;
  }

  .pn-quiz-start-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 640px) {
  .pn-quiz-page {
    padding: 10px 0 25px;
  }

  .pn-quiz-shell {
    border-radius: 21px;
  }

  .pn-quiz-header {
    padding: 18px 17px 15px;
  }

  .pn-quiz-header h1 {
    font-size: 2.15rem;
  }

  .pn-quiz-header-meta {
    gap: 5px;
  }

  .pn-quiz-header-meta span {
    min-height: 24px;
    padding: 4px 7px;
    font-size: 0.55rem;
  }

  .pn-quiz-stage {
    min-height: auto;
    padding: 20px 17px 17px;
  }

  .pn-quiz-start-grid {
    min-height: auto;
    gap: 23px;
  }

  .pn-quiz-start-copy h2 {
    font-size: 2.45rem;
  }

  .pn-quiz-page button.pn-quiz-start-button {
    width: 100%;
  }

  .pn-quiz-start-preview {
    padding: 18px;
  }

  .pn-quiz-start-footer > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 1px;
  }

  .pn-quiz-start-footer > div + div {
    padding-left: 12px;
  }

  .pn-quiz-start-footer strong {
    font-size: 1.08rem;
  }

  .pn-quiz-start-footer span {
    font-size: 0.57rem;
  }

  .pn-quiz-question-content {
    min-height: auto;
  }

  .pn-quiz-question-content h2 {
    font-size: 2.1rem;
  }

  .pn-quiz-options,
  .pn-quiz-options[data-question="goal"] {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
  }

  .pn-quiz-page button.pn-quiz-option {
    grid-template-columns:
      27px
      minmax(0, 1fr)
      19px;
    min-height: 62px !important;
    gap: 8px;
    padding: 10px !important;
    border-radius: 14px !important;
  }

  .pn-quiz-option-index {
    width: 27px;
    height: 27px;
    border-radius: 9px;
  }

  .pn-quiz-option-copy strong {
    font-size: 0.75rem;
  }

  .pn-quiz-option-copy small {
    display: none;
  }

  .pn-quiz-option-check {
    width: 19px;
    height: 19px;
  }

  .pn-quiz-navigation {
    position: sticky;
    z-index: 5;
    bottom: 0;
    margin: 15px -17px -17px;
    padding: 12px 17px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
  }

  .pn-quiz-result-grid {
    grid-template-columns: 1fr;
  }

  .pn-quiz-result-card {
    min-height: auto;
  }

  .pn-quiz-result-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .pn-quiz-result-actions .button,
  .pn-quiz-restart-button {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
}


@media (max-width: 390px) {
  .pn-quiz-options,
  .pn-quiz-options[data-question="goal"] {
    grid-template-columns: 1fr;
  }

  .pn-quiz-start-copy h2,
  .pn-quiz-question-content h2 {
    font-size: 2rem;
  }
}


@media (prefers-reduced-motion: reduce) {
  .pn-quiz-stage.is-entering {
    animation: none;
  }

  .pn-quiz-page button.pn-quiz-option,
  .pn-quiz-progress-track > span {
    transition: none;
  }
}