.bsq-quiz {
  --bsq-ink: #08343a;
  --bsq-accent: #009f8f;
  --bsq-accent-dark: #0a6a77;
  --bsq-surface: #eef8f7;
  --bsq-line: rgba(8, 52, 58, 0.12);
  --bsq-danger: #af2f43;
  --bsq-success: #1e7c57;
  --bsq-leaderboard-row-a: rgba(0, 80, 102, 0.7);
  --bsq-leaderboard-row-b: rgba(0, 113, 144, 0.82);
  --bsq-leaderboard-head: rgba(255, 255, 255, 0.16);
  color: var(--bsq-ink);
  background: linear-gradient(180deg, #f8fcfc 0%, #eef8f7 100%);
  border: 1px solid var(--bsq-line);
  border-radius: 0;
  padding: 24px;
}

.bsq-quiz[data-bsq-state="intro"] {
  background: transparent;
  border: 0;
  padding: 0;
}

.bsq-quiz__eyebrow {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  font-weight: 700;
}

.bsq-quiz__title,
.bsq-quiz__question,
.bsq-leaderboard h3,
.bsq-form h3 {
  margin: 0 0 12px;
}

.bsq-quiz__text,
.bsq-quiz__feedback,
.bsq-empty {
  margin: 0;
}

.bsq-quiz__intro {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.bsq-quiz__modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.bsq-quiz__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 24, 36, 0.52);
  backdrop-filter: blur(8px);
}

.bsq-quiz__dialog {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(88vh, 920px);
  overflow: auto;
  background: #fff;
  color: var(--bsq-ink);
  padding: 32px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
}

.bsq-quiz__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #005066;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 80, 102, 0.22);
}

.bsq-quiz__meta,
.bsq-quiz__stats,
.bsq-leaderboard__item,
.bsq-leaderboard__head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.bsq-quiz__meta,
.bsq-quiz__bar,
.bsq-quiz__answers,
.bsq-quiz__stats,
.bsq-form,
.bsq-leaderboard {
  margin-top: 18px;
}

.bsq-leaderboard {
  margin-top: 0;
  color: #fff;
}

.bsq-quiz__bar {
  height: 10px;
  background: rgba(8, 52, 58, 0.08);
  border-radius: 0;
  overflow: hidden;
}

.bsq-quiz__bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--bsq-accent) 0%, var(--bsq-accent-dark) 100%);
}

.bsq-quiz__answers {
  display: grid;
  gap: 12px;
}

.bsq-answer,
.bsq-button,
.bsq-link {
  appearance: none;
  border: 0;
  cursor: pointer;
}

.bsq-answer {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 0;
  background: #fff;
  border: 2px solid rgba(0, 80, 102, 0.18);
  text-align: left;
  color: #08343a;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.bsq-answer:disabled {
  opacity: 0.7;
  cursor: wait;
}

.bsq-answer:hover {
  border-color: #009cc8;
  background: #f4fbfd;
  box-shadow: 0 12px 28px rgba(0, 80, 102, 0.12);
  transform: translateY(-1px);
}

.bsq-answer__key {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  background: var(--bsq-accent);
  color: #fff;
  font-weight: 700;
}

.bsq-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 0;
  background: var(--bsq-ink);
  color: #fff;
  font-weight: 700;
}

.bsq-button--elementor {
  min-height: auto;
  padding: 20px 48px;
  background: #005066;
  color: #fff;
  line-height: 1;
  text-decoration: none;
}

.bsq-button--elementor .elementor-button-content-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bsq-button--elementor .elementor-button-text {
  color: inherit;
  font-size: 1.1rem;
  font-weight: 700;
}

.bsq-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.bsq-link {
  background: transparent;
  color: #009cc8;
  padding: 0;
  font-weight: 700;
  text-decoration: none;
}

.bsq-quiz__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.bsq-quiz__stats article {
  flex: 1 1 140px;
  padding: 18px 20px;
  background: #f7fbfc;
  border-radius: 0;
  border: 1px solid rgba(0, 80, 102, 0.14);
}

.bsq-quiz__stats span,
.bsq-form label span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.92rem;
}

.bsq-quiz__stats strong {
  font-size: 2rem;
  color: #005066;
}

.bsq-form label {
  display: block;
  margin-bottom: 12px;
}

.bsq-form h3 {
  font-size: 2rem;
  color: #005066;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.bsq-gdpr-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 12px;
}

.bsq-gdpr-consent input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: #005066;
  cursor: pointer;
}

.bsq-gdpr-consent span {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #08343a;
}

.bsq-gdpr-consent a {
  color: #005066;
  text-decoration: underline;
}

.bsq-form input {
  width: 100%;
  border: 2px solid rgba(0, 80, 102, 0.16);
  border-radius: 0;
  padding: 16px 18px;
  background: #f9fcfd;
  color: #08343a;
  font-size: 1rem;
  box-sizing: border-box;
}

.bsq-form input:focus {
  outline: none;
  border-color: #009cc8;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 156, 200, 0.12);
}

.bsq-form .bsq-button[type="submit"] {
  width: 100%;
  min-height: 56px;
  margin-top: 12px;
  background: #009cc8;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.bsq-leaderboard__table {
  display: grid;
  gap: 12px;
}

.bsq-leaderboard__row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1.8fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.bsq-leaderboard__row--head {
  padding: 14px 16px;
  background: var(--bsq-leaderboard-head);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bsq-leaderboard__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.bsq-leaderboard__item {
  padding: 16px;
  border-bottom: 0;
  color: #fff;
}

.bsq-leaderboard__item:nth-child(odd) {
  background: var(--bsq-leaderboard-row-a);
}

.bsq-leaderboard__item:nth-child(even) {
  background: var(--bsq-leaderboard-row-b);
}

.bsq-leaderboard__item strong,
.bsq-leaderboard__item span {
  color: inherit;
}

.bsq-leaderboard__place {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  color: #005066;
  font-weight: 700;
}

.bsq-quiz__feedback[data-state="error"] {
  color: var(--bsq-danger);
}

.bsq-quiz__feedback[data-state="success"] {
  color: var(--bsq-success);
}

@media (max-width: 767px) {
  .bsq-quiz {
    padding: 18px;
    border-radius: 0;
  }

  .bsq-answer {
    grid-template-columns: 48px 1fr;
    padding: 14px;
  }

  .bsq-button--elementor {
    width: 100%;
    min-width: 0;
  }

  .bsq-quiz__modal {
    padding: 0 !important;
  }

  .bsq-quiz__dialog {
    width: 100% !important;
    max-height: 100vh !important;
    min-height: 100vh;
    padding: 20px 16px !important;
    box-sizing: border-box;
  }

  .bsq-quiz__stats {
    grid-template-columns: 1fr;
  }

  .bsq-quiz__question {
    font-size: 1rem !important;
    line-height: 1.15 !important;
  }

  .bsq-quiz__meta {
    padding-right: 56px !important;
  }

  .bsq-leaderboard__row--head {
    display: none !important;
  }

  .bsq-leaderboard__item {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px 16px !important;
    align-items: start !important;
  }

  .bsq-leaderboard__item > [role="cell"] {
    display: block;
    min-width: 0;
  }

  .bsq-leaderboard__item > [role="cell"]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .bsq-leaderboard__place {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .bsq-leaderboard__place::before {
    color: rgba(255, 255, 255, 0.74);
  }

  .bsq-leaderboard__item strong[role="cell"] {
    font-size: 1rem;
  }
}
