@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

.psh-quiz {
  --psh-primary: #2563eb;
  --psh-primary-600: #1d4ed8;
  --psh-ink: #0b132b;
  --psh-muted: #6b7280;
  --psh-border: #e5e7eb;
  --psh-surface: #ffffff;
  font-family: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
  background: linear-gradient(140deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.12));
  border-radius: 20px;
  padding: 22px;
  color: var(--psh-ink);
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(15, 23, 42, 0.12);
}

.psh-quiz::before {
  content: '';
  position: absolute;
  inset: -120px auto auto 55%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle at 30% 30%, rgba(37, 99, 235, 0.25), rgba(14, 165, 233, 0));
  transform: rotate(-10deg);
  pointer-events: none;
}

.psh-quiz>* {
  position: relative;
  z-index: 1;
}

.psh-quiz input,
.psh-quiz button,
.psh-quiz textarea {
  font-family: inherit;
}

.psh-quiz .psh-intro {
  background: linear-gradient(120deg, var(--psh-primary), #0ea5e9);
  color: #fff;
  padding: 18px 20px;
  border-radius: 16px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 32px rgba(37, 99, 235, 0.35);
}

.psh-quiz .psh-intro::after {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  pointer-events: none;
}

.psh-quiz .psh-intro-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.psh-quiz .psh-intro-sub {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
}

.psh-quiz .psh-intro-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}


.psh-quiz .psh-chip {
  display: inline-flex;
  flex-direction: column;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  min-width: 96px;
}

.psh-quiz .psh-chip-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
  opacity: 0.78;
  font-weight: 600;
}

.psh-quiz .psh-chip-value {
  font-size: 15px;
  font-weight: 700;
}

.psh-quiz .psh-intro-identity {
  margin: 0 0 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(2px);
}

.psh-quiz .psh-intro-identity-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.psh-quiz .psh-intro-identity-sub {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 500;
}

.psh-quiz .psh-intro-identity input {
  width: 100%;
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  font-size: 14px;
}

.psh-quiz .psh-intro-identity input:last-child {
  margin-bottom: 0;
}

.psh-quiz .psh-intro-identity input:focus {
  outline: none;
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.28);
}

.psh-quiz .psh-start {
  background: #fff;
  color: var(--psh-primary);
  border: 0;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.psh-quiz .psh-start:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2);
}

.psh-quiz .psh-quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 12px 0;
  background: var(--psh-surface);
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--psh-border);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.psh-quiz .psh-progress {
  flex: 1;
}

.psh-quiz .psh-progress-text {
  font-size: 13px;
  color: var(--psh-muted);
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.psh-quiz .psh-progress-bar {
  width: 100%;
  height: 10px;
  background: #e5ecff;
  border-radius: 999px;
  overflow: hidden;
}

.psh-quiz .psh-progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--psh-primary), #0ea5e9);
  width: 0%;
  transition: width .25s ease;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
}

.psh-quiz .psh-timer {
  font-weight: 700;
  color: var(--psh-primary-600);
  background: #eef2ff;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid #d9e0ff;
  min-width: 120px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.psh-quiz .psh-quiz-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.psh-quiz .psh-q {
  padding: 16px;
  border: 1px solid var(--psh-border);
  border-radius: 14px;
  background: var(--psh-surface);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  position: relative;
}

.psh-quiz button:focus-visible,
.psh-quiz input:focus-visible {
  outline: 2px solid var(--psh-primary);
  outline-offset: 2px;
}

.psh-quiz .psh-q-title {
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 80px;
  /* leave room for the pinned TTS buttons */
}

.psh-quiz .psh-q-title .psh-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--psh-primary);
  font-weight: 700;
}

.psh-quiz .psh-tts,
.psh-quiz .psh-tts-stop {
  position: absolute;
  top: 12px;
  border: 1px solid var(--psh-border);
  background: #eef2ff;
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
  line-height: 1;
  font-size: 15px;
  z-index: 2;
}

.psh-quiz .psh-tts {
  right: 48px;
  /* play sits to the left of stop */
}

.psh-quiz .psh-tts-stop {
  right: 12px;
  background: #fee2e2;
}

.psh-quiz .psh-q-meta {
  font-size: 12px;
  color: var(--psh-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.psh-quiz .psh-q-desc {
  color: #1f2937;
  margin-bottom: 10px;
  line-height: 1.6;
}

.psh-quiz .psh-q-media {
  margin: 10px 0;
}

.psh-quiz .psh-q-media img,
.psh-quiz .psh-q-media video {
  max-width: 100%;
  border-radius: 10px;
}

.psh-quiz .psh-q-media iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
  border-radius: 10px;
}

.psh-quiz .psh-opt {
  display: block;
  margin: 8px 0;
  position: relative;
  cursor: pointer;
}

.psh-quiz .psh-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.psh-quiz .psh-opt span {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--psh-border);
  border-radius: 12px;
  background: #f8fafc;
  transition: all .18s ease;
  font-weight: 600;
  color: #0f172a;
}

.psh-quiz .psh-opt span::before {
  content: '';
  width: 16px;
  height: 16px;
  border-radius: 6px;
  border: 2px solid #cbd5e1;
  background: #fff;
  transition: all .18s ease;
  flex-shrink: 0;
}

.psh-quiz .psh-opt input[type=radio]+span::before {
  border-radius: 50%;
}

.psh-quiz .psh-opt:hover span,
.psh-quiz .psh-opt:focus-within span {
  border-color: #cbd5ff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.psh-quiz .psh-opt input:checked+span {
  border-color: var(--psh-primary);
  background: #eef3ff;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.18);
}

.psh-quiz .psh-opt input:checked+span::before {
  border-color: var(--psh-primary);
  background: var(--psh-primary);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.psh-quiz .psh-a-text {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--psh-border);
  border-radius: 12px;
  background: #f8fafc;
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.psh-quiz .psh-a-text:focus {
  outline: none;
  border-color: var(--psh-primary);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
}

.psh-quiz .psh-q-tools {
  display: none;
}

.psh-quiz .psh-actions {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.psh-quiz .psh-nav-group {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-left: auto;
}

.psh-quiz .psh-actions .psh-clear {
  background: #f1f5f9;
  border: 1px solid #d7dee9;
  color: #0f172a;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: background .15s;
}

.psh-quiz .psh-actions .psh-clear:hover {
  background: #e2e8f0;
}

.psh-quiz .psh-actions .psh-submit,
.psh-quiz .psh-actions .psh-retry,
.psh-quiz .psh-emailpdf .psh-email-send,
.psh-quiz .psh-pdf-btn {
  background: linear-gradient(120deg, var(--psh-primary), #0ea5e9);
  border: 1px solid var(--psh-primary-600);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.2);
  transition: transform .12s ease, box-shadow .12s ease;
}

.psh-quiz .psh-actions .psh-submit:hover,
.psh-quiz .psh-actions .psh-retry:hover,
.psh-quiz .psh-emailpdf .psh-email-send:hover,
.psh-quiz .psh-pdf-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.24);
}

.psh-quiz .psh-actions .psh-prev,
.psh-quiz .psh-actions .psh-next {
  background: #eef2ff;
  border: 1px solid #d9e0ff;
  color: #0f172a;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}

.psh-quiz .psh-actions .psh-retry {
  background: linear-gradient(120deg, #334155, #0f172a);
  border-color: #0f172a;
}

.psh-quiz .psh-actions .psh-retry[disabled] {
  opacity: .6;
  cursor: not-allowed;
}

.psh-quiz .psh-results {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--psh-border);
}

.psh-quiz .psh-summary {
  background: var(--psh-surface);
  border: 1px solid var(--psh-border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.psh-quiz .psh-summary-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}

.psh-quiz .psh-summary-kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: var(--psh-muted);
  font-weight: 700;
}

.psh-quiz .psh-summary-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.psh-quiz .psh-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.psh-quiz .psh-stat {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
}

.psh-quiz .psh-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.psh-quiz .psh-stat-muted {
  color: var(--psh-muted);
  font-size: 13px;
  font-weight: 600;
}

.psh-quiz .psh-stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--psh-muted);
  margin-top: 4px;
  font-weight: 700;
}

.psh-quiz .psh-item.ok {
  color: #2f855a;
}

.psh-quiz .psh-item.bad {
  color: #c53030;
}

.psh-quiz .psh-share {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.psh-quiz .psh-share span {
  font-weight: 700;
  color: #0f172a;
}

.psh-quiz .psh-share .psh-share-btn {
  background: #f1f5f9;
  border: 1px solid #d7dee9;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 999px;
  color: #0f172a;
  font-weight: 700;
}

.psh-quiz .psh-share .psh-facebook {
  background: #1877F2;
  border-color: #1877F2;
  color: #fff;
}

.psh-quiz .psh-share .psh-twitter {
  background: #000000;
  border-color: #000000;
  color: #fff;
}

.psh-quiz .psh-share .psh-whatsapp {
  background: #25D366;
  border-color: #25D366;
  color: #fff;
}

.psh-quiz .psh-share .psh-linkedin {
  background: #0A66C2;
  border-color: #0A66C2;
  color: #fff;
}

.psh-quiz .psh-share .psh-copy {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.psh-quiz .psh-retry-msg {
  color: #c05621;
  margin-left: 4px;
}

.psh-quiz .psh-locked {
  background: #fff6ed;
  border: 1px solid #fdba74;
  padding: 10px;
  margin-top: 10px;
  border-radius: 10px;
  color: #9a3412;
  font-weight: 600;
}

.psh-quiz .psh-numgrid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  list-style: none;
  padding: 0;
}

.psh-quiz .psh-numbtn {
  min-width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid var(--psh-border);
  background: #f8fafc;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  line-height: 1;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  text-decoration: none;
  user-select: none;
  position: relative;
  vertical-align: middle;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: all .12s ease;
}

.psh-quiz .psh-numbtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.psh-quiz .psh-numbtn.ok {
  border-color: #38a169;
  background: #f0fff4;
  color: #2f855a;
}

.psh-quiz .psh-numbtn.bad {
  border-color: #e53e3e;
  background: #fff5f5;
  color: #c53030;
}

.psh-quiz .psh-numbtn.na {
  border-color: #a0aec0;
  background: #eef2f7;
  color: #4a5568;
}

.psh-quiz .psh-numbtn.active {
  outline: 2px solid var(--psh-primary);
}

.psh-quiz .psh-qdetails {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.psh-quiz .psh-detail-item {
  border: 1px solid var(--psh-border);
  border-radius: 12px;
  padding: 12px;
  background: var(--psh-surface);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.psh-quiz .psh-d-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.psh-quiz .psh-d-desc {
  color: var(--psh-muted);
  margin-bottom: 8px;
  line-height: 1.5;
}

.psh-quiz .psh-d-options {
  list-style: none;
  padding: 0;
  margin: 0;
}

.psh-quiz .psh-d-options li {
  padding: 7px 9px;
  border: 1px solid var(--psh-border);
  border-radius: 8px;
  margin: 4px 0;
}

.psh-quiz .psh-d-options li.chosen {
  box-shadow: inset 0 0 0 2px #718096;
}

.psh-quiz .psh-d-options li.correct {
  background: #f0fff4;
  border-color: #38a169;
}

.psh-quiz .psh-d-options li.chosen:not(.correct) {
  background: #fff5f5;
  border-color: #e53e3e;
}

.psh-quiz .psh-d-explain {
  margin-top: 8px;
  padding: 10px;
  background: #ebf8ff;
  border: 1px solid #bee3f8;
  border-radius: 8px;
}

.psh-quiz .psh-your-sel {
  margin-top: 6px;
  color: #0f172a;
  font-weight: 600;
}

.psh-quiz .psh-your-sel.bad {
  color: #c53030;
}

.psh-quiz .psh-your-sel.ok {
  color: #2f855a;
}

.psh-quiz .psh-your-sel.na {
  color: #4a5568;
  font-style: italic;
}

.psh-quiz .psh-accordion {
  display: grid;
  gap: 10px;
}

.psh-quiz .psh-acc-item {
  border: 1px solid var(--psh-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--psh-surface);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.psh-quiz .psh-acc-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #f8fafc;
  border: 0;
  cursor: pointer;
  font-weight: 700;
}

.psh-quiz .psh-acc-num {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #eef2ff;
  color: var(--psh-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.psh-quiz .psh-acc-title {
  flex: 1;
  text-align: left;
}

.psh-quiz .psh-acc-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #111827;
  font-size: 12px;
  font-weight: 700;
}

.psh-quiz .psh-acc-title {
  color: #0f172a;
}

.psh-quiz .psh-acc-icon {
  font-size: 12px;
  color: #4b5563;
}

.psh-quiz .psh-acc-head.is-open .psh-acc-icon {
  transform: rotate(180deg);
}

.psh-quiz .psh-acc-item.ok .psh-acc-pill {
  background: #dcfce7;
  color: #166534;
}

.psh-quiz .psh-acc-item.bad .psh-acc-pill {
  background: #fee2e2;
  color: #991b1b;
}

.psh-quiz .psh-acc-item.na .psh-acc-pill {
  background: #e5e7eb;
  color: #374151;
}

.psh-quiz .psh-acc-body {
  padding: 12px;
  border-top: 1px solid var(--psh-border);
}

.psh-quiz .psh-emailpdf {
  margin-top: 12px;
}

.psh-quiz .psh-emailpdf .psh-email-row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.psh-quiz .psh-emailpdf input {
  flex: 1;
  min-width: 180px;
  padding: 10px;
  border: 1px solid var(--psh-border);
  border-radius: 10px;
  background: #f8fafc;
}

.psh-quiz .psh-pdf-btn {
  margin-top: 10px;
}

.psh-quiz .psh-email-msg {
  color: var(--psh-muted);
  margin-top: 6px;
}

.psh-quiz .psh-cert {
  margin-top: 10px;
}

.psh-quiz .psh-cert-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(120deg, #10b981, #0ea5e9);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.25);
}

.psh-quiz .psh-leaderboard {
  margin-top: 14px;
  border: 1px solid var(--psh-border);
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
}

.psh-quiz .psh-leaderboard ol {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.psh-quiz .psh-lead-title {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.psh-quiz .psh-lead-name {
  font-weight: 700;
}

.psh-quiz .psh-lead-score {
  color: var(--psh-muted);
  margin-left: 6px;
}

.psh-leaderboard .psh-lead-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.psh-leaderboard .psh-lead-table th,
.psh-leaderboard .psh-lead-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

.psh-leaderboard .psh-lead-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 700;
}

.psh-leaderboard .psh-lead-meta {
  color: #6b7280;
  font-size: 12px;
}

.psh-quiz .psh-loading {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  text-align: center;
  font-weight: 700;
  color: #0f172a;
  z-index: 30;
  padding: 20px;
}

.psh-quiz .psh-loading.is-active {
  display: flex;
}

.psh-quiz .psh-loading::before {
  content: '';
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(37, 99, 235, 0.25);
  border-top-color: var(--psh-primary);
  animation: psh-spin 1s linear infinite;
}

.psh-quiz .psh-toast {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #0f172a;
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  z-index: 40;
}

/* ── Schedule message ────────────────────────────────────────── */
.psh-quiz.psh-schedule-msg {
  padding: 32px 24px;
  text-align: center;
  color: var(--psh-muted, #64748b);
  font-size: 15px;
}

.psh-quiz.psh-schedule-msg p {
  margin: 0;
}

/* ── Password gate ───────────────────────────────────────────── */
.psh-quiz .psh-pw-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.psh-quiz .psh-pw-gate-inner {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  padding: 40px 36px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.08);
}

.psh-quiz .psh-pw-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.psh-quiz .psh-pw-title {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}

.psh-quiz .psh-pw-desc {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 20px;
}

.psh-quiz .psh-pw-row {
  display: flex;
  gap: 8px;
}

.psh-quiz .psh-pw-input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
}

.psh-quiz .psh-pw-input:focus {
  border-color: var(--psh-primary, #2563eb);
}

.psh-quiz .psh-pw-submit {
  padding: 10px 18px;
  background: linear-gradient(120deg, var(--psh-primary, #2563eb), #0ea5e9);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
}

.psh-quiz .psh-pw-error {
  margin-top: 12px;
  font-size: 13px;
  color: #dc2626;
  font-weight: 600;
}

@keyframes psh-shake {

  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-6px);
  }

  40%,
  80% {
    transform: translateX(6px);
  }
}

.psh-quiz .psh-pw-shake {
  animation: psh-shake .45s ease;
}

@media (max-width: 640px) {
  .psh-quiz {
    padding: 16px;
  }

  .psh-quiz .psh-quiz-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .psh-quiz .psh-intro {
    padding: 16px;
  }

  .psh-quiz .psh-chip {
    flex: 1 1 42%;
  }

  .psh-quiz .psh-actions {
    justify-content: flex-start;
  }
}

@keyframes psh-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   TEMPLATE: CARD  —  Flash-card style, centred, big typography
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

.psh-quiz.psh-tmpl-card {
  --psh-primary: #7c3aed;
  --psh-primary-600: #6d28d9;
  --psh-ink: #1e1b4b;
  --psh-muted: #7c3aed;
  --psh-border: #ddd6fe;
  --psh-surface: #ffffff;
  font-family: 'Nunito', system-ui, sans-serif;
  background: linear-gradient(145deg, #f5f3ff 0%, #ede9fe 100%);
  border-radius: 24px;
  padding: 28px 24px;
  box-shadow: 0 24px 72px rgba(124, 58, 237, 0.18);
}

.psh-quiz.psh-tmpl-card::before {
  display: none;
}

/* Card-style single question block */
.psh-quiz.psh-tmpl-card .psh-q {
  border: none;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 20px 56px rgba(124, 58, 237, 0.14);
  padding: 32px 28px;
  text-align: center;
}

.psh-quiz.psh-tmpl-card .psh-q-title {
  font-size: 22px;
  font-weight: 800;
  justify-content: center;
  margin-bottom: 12px;
  line-height: 1.3;
}

.psh-quiz.psh-tmpl-card .psh-q-title .psh-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: #fff;
  font-size: 15px;
}

.psh-quiz.psh-tmpl-card .psh-q-desc {
  font-size: 16px;
  color: #4c1d95;
  margin-bottom: 24px;
  line-height: 1.7;
}

/* Options: 2-column grid cards */
.psh-quiz.psh-tmpl-card .psh-opts-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.psh-quiz.psh-tmpl-card .psh-opt span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  padding: 16px 12px;
  border: 2px solid #ddd6fe;
  border-radius: 16px;
  background: #f5f3ff;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  transition: all .2s ease;
  gap: 0;
}

.psh-quiz.psh-tmpl-card .psh-opt span::before {
  display: none;
}

.psh-quiz.psh-tmpl-card .psh-opt:hover span {
  border-color: #7c3aed;
  background: #ede9fe;
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.2);
}

.psh-quiz.psh-tmpl-card .psh-opt input:checked+span {
  border-color: #7c3aed;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: #fff;
  box-shadow: 0 14px 38px rgba(124, 58, 237, 0.35);
  transform: translateY(-3px);
}

.psh-quiz.psh-tmpl-card .psh-intro {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  border-radius: 20px;
}

.psh-quiz.psh-tmpl-card .psh-start {
  background: #fff;
  color: #7c3aed;
}

.psh-quiz.psh-tmpl-card .psh-actions .psh-submit,
.psh-quiz.psh-tmpl-card .psh-actions .psh-retry {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  border-color: #6d28d9;
}

.psh-quiz.psh-tmpl-card .psh-progress-fill {
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
}

.psh-quiz.psh-tmpl-card .psh-timer {
  color: #7c3aed;
  background: #ede9fe;
  border-color: #c4b5fd;
}

@media (max-width: 540px) {
  .psh-quiz.psh-tmpl-card .psh-opts-wrap {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   TEMPLATE: MINIMAL  —  Flat, serif, black & white editorial
   ============================================================ */
.psh-quiz.psh-tmpl-minimal {
  --psh-primary: #111827;
  --psh-primary-600: #000000;
  --psh-ink: #111827;
  --psh-muted: #6b7280;
  --psh-border: #d1d5db;
  --psh-surface: #ffffff;
  font-family: Georgia, 'Times New Roman', Times, serif;
  background: #fafafa;
  border-radius: 8px;
  padding: 32px;
  box-shadow: none;
  border: 1px solid #e5e7eb;
}

.psh-quiz.psh-tmpl-minimal::before {
  display: none;
}

.psh-quiz.psh-tmpl-minimal .psh-intro {
  background: #111827;
  border-radius: 6px;
  box-shadow: none;
}

.psh-quiz.psh-tmpl-minimal .psh-intro::after {
  display: none;
}

.psh-quiz.psh-tmpl-minimal .psh-intro-title {
  font-size: 26px;
  letter-spacing: -0.02em;
}

.psh-quiz.psh-tmpl-minimal .psh-start {
  background: #fff;
  color: #111827;
  border-radius: 6px;
  box-shadow: none;
  border: 1px solid #fff;
}

.psh-quiz.psh-tmpl-minimal .psh-quiz-header {
  border-radius: 4px;
  box-shadow: none;
  border: 1px solid #d1d5db;
  background: #fff;
}

.psh-quiz.psh-tmpl-minimal .psh-progress-fill {
  background: #111827;
  box-shadow: none;
}

.psh-quiz.psh-tmpl-minimal .psh-timer {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #111827;
  border-radius: 4px;
}

.psh-quiz.psh-tmpl-minimal .psh-q {
  border: 1px solid #d1d5db;
  border-radius: 4px;
  box-shadow: none;
  background: #fff;
}

.psh-quiz.psh-tmpl-minimal .psh-q-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.psh-quiz.psh-tmpl-minimal .psh-q-title .psh-num {
  background: #111827;
  color: #fff;
  border-radius: 4px;
}

/* Plain underline option style */
.psh-quiz.psh-tmpl-minimal .psh-opt span {
  border: none;
  border-bottom: 1px solid #d1d5db;
  border-radius: 0;
  background: transparent;
  padding: 10px 4px;
  box-shadow: none;
  font-weight: 400;
  font-size: 15px;
  color: #111827;
}

.psh-quiz.psh-tmpl-minimal .psh-opt span::before {
  border-radius: 2px;
  border-color: #9ca3af;
}

.psh-quiz.psh-tmpl-minimal .psh-opt:hover span {
  background: #f9fafb;
  border-color: #111827;
  box-shadow: none;
}

.psh-quiz.psh-tmpl-minimal .psh-opt input:checked+span {
  border-color: #111827;
  background: #f3f4f6;
  box-shadow: none;
}

.psh-quiz.psh-tmpl-minimal .psh-opt input:checked+span::before {
  background: #111827;
  border-color: #111827;
  box-shadow: none;
}

.psh-quiz.psh-tmpl-minimal .psh-actions .psh-submit,
.psh-quiz.psh-tmpl-minimal .psh-actions .psh-retry {
  background: #111827;
  border-color: #111827;
  box-shadow: none;
  border-radius: 6px;
}

.psh-quiz.psh-tmpl-minimal .psh-summary,
.psh-quiz.psh-tmpl-minimal .psh-acc-item,
.psh-quiz.psh-tmpl-minimal .psh-detail-item {
  border-radius: 4px;
  box-shadow: none;
}

.psh-quiz.psh-tmpl-minimal .psh-acc-num {
  background: #111827;
  color: #fff;
  border-radius: 2px;
}

/* ============================================================
   TEMPLATE: DARK  —  Slate dark bg, cyan neon accents
   ============================================================ */
.psh-quiz.psh-tmpl-dark {
  --psh-primary: #22d3ee;
  --psh-primary-600: #06b6d4;
  --psh-ink: #e2e8f0;
  --psh-muted: #94a3b8;
  --psh-border: #334155;
  --psh-surface: #1e293b;
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  background: #0f172a;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.6), 0 0 0 1px #1e293b;
  color: #e2e8f0;
}

.psh-quiz.psh-tmpl-dark::before {
  background: radial-gradient(circle at 30% 30%, rgba(34, 211, 238, 0.12), rgba(0, 0, 0, 0));
}

.psh-quiz.psh-tmpl-dark .psh-intro {
  background: linear-gradient(135deg, #0e7490, #164e63);
}

.psh-quiz.psh-tmpl-dark .psh-intro-sub {
  color: rgba(255, 255, 255, 0.7);
}

.psh-quiz.psh-tmpl-dark .psh-chip {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.psh-quiz.psh-tmpl-dark .psh-start {
  background: #22d3ee;
  color: #0f172a;
}

.psh-quiz.psh-tmpl-dark .psh-quiz-header {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.psh-quiz.psh-tmpl-dark .psh-progress-bar {
  background: #334155;
}

.psh-quiz.psh-tmpl-dark .psh-progress-fill {
  background: linear-gradient(90deg, #22d3ee, #818cf8);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.5);
}

.psh-quiz.psh-tmpl-dark .psh-timer {
  background: #1e293b;
  border-color: #334155;
  color: #22d3ee;
}

.psh-quiz.psh-tmpl-dark .psh-q {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.psh-quiz.psh-tmpl-dark .psh-q-title {
  color: #f1f5f9;
}

.psh-quiz.psh-tmpl-dark .psh-q-title .psh-num {
  background: rgba(34, 211, 238, 0.15);
  color: #22d3ee;
}

.psh-quiz.psh-tmpl-dark .psh-q-desc {
  color: #cbd5e1;
}

.psh-quiz.psh-tmpl-dark .psh-q-meta {
  color: #64748b;
}

/* Dark options */
.psh-quiz.psh-tmpl-dark .psh-opt span {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

.psh-quiz.psh-tmpl-dark .psh-opt span::before {
  border-color: #475569;
  background: #1e293b;
}

.psh-quiz.psh-tmpl-dark .psh-opt:hover span {
  border-color: #22d3ee;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.3), 0 10px 28px rgba(0, 0, 0, 0.3);
  background: #162032;
}

.psh-quiz.psh-tmpl-dark .psh-opt input:checked+span {
  border-color: #22d3ee;
  background: rgba(34, 211, 238, 0.1);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.4), 0 12px 30px rgba(0, 0, 0, 0.3);
}

.psh-quiz.psh-tmpl-dark .psh-opt input:checked+span::before {
  border-color: #22d3ee;
  background: #22d3ee;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.7);
}

.psh-quiz.psh-tmpl-dark .psh-a-text {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

.psh-quiz.psh-tmpl-dark .psh-a-text:focus {
  border-color: #22d3ee;
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.25);
}

.psh-quiz.psh-tmpl-dark .psh-actions .psh-submit,
.psh-quiz.psh-tmpl-dark .psh-actions .psh-retry,
.psh-quiz.psh-tmpl-dark .psh-emailpdf .psh-email-send,
.psh-quiz.psh-tmpl-dark .psh-pdf-btn {
  background: linear-gradient(135deg, #0e7490, #22d3ee);
  border-color: #0891b2;
  color: #0f172a;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.35);
}

.psh-quiz.psh-tmpl-dark .psh-actions .psh-prev,
.psh-quiz.psh-tmpl-dark .psh-actions .psh-next {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

.psh-quiz.psh-tmpl-dark .psh-summary {
  background: #1e293b;
  border-color: #334155;
}

.psh-quiz.psh-tmpl-dark .psh-summary-title {
  color: #f1f5f9;
}

.psh-quiz.psh-tmpl-dark .psh-stat {
  background: #0f172a;
  border-color: #334155;
}

.psh-quiz.psh-tmpl-dark .psh-stat-value {
  color: #f1f5f9;
}

.psh-quiz.psh-tmpl-dark .psh-acc-item {
  background: #1e293b;
  border-color: #334155;
}

.psh-quiz.psh-tmpl-dark .psh-acc-head {
  background: #162032;
}

.psh-quiz.psh-tmpl-dark .psh-acc-title {
  color: #e2e8f0;
}

.psh-quiz.psh-tmpl-dark .psh-acc-num {
  background: rgba(34, 211, 238, 0.15);
  color: #22d3ee;
}

.psh-quiz.psh-tmpl-dark .psh-detail-item {
  background: #1e293b;
  border-color: #334155;
}

.psh-quiz.psh-tmpl-dark .psh-d-options li {
  border-color: #334155;
  background: #0f172a;
  color: #cbd5e1;
}

.psh-quiz.psh-tmpl-dark .psh-d-options li.correct {
  background: rgba(34, 211, 238, 0.1);
  border-color: #22d3ee;
  color: #22d3ee;
}

.psh-quiz.psh-tmpl-dark .psh-loading {
  background: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
}

.psh-quiz.psh-tmpl-dark .psh-toast {
  background: #22d3ee;
  color: #0f172a;
}

.psh-quiz.psh-tmpl-dark .psh-share .psh-share-btn {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

.psh-quiz.psh-tmpl-dark .psh-leaderboard {
  background: #1e293b;
  border-color: #334155;
}

.psh-quiz.psh-tmpl-dark .psh-lead-title {
  color: #f1f5f9;
}

.psh-quiz.psh-tmpl-dark .psh-emailpdf input {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

.psh-quiz.psh-tmpl-dark .psh-locked {
  background: #1c1007;
  border-color: #92400e;
  color: #fde68a;
}

.psh-quiz.psh-tmpl-dark .psh-q-tools .psh-clear {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

/* ============================================================
   TEMPLATE: VIBRANT  —  Coral/violet gradient, bubbly Nunito
   ============================================================ */
.psh-quiz.psh-tmpl-vibrant {
  --psh-primary: #f97316;
  --psh-primary-600: #ea580c;
  --psh-ink: #1c0533;
  --psh-muted: #7e22ce;
  --psh-border: #fad7f5;
  --psh-surface: #ffffff;
  font-family: 'Nunito', system-ui, sans-serif;
  background: linear-gradient(135deg, #fff7ed 0%, #fdf4ff 50%, #f0fdf4 100%);
  border-radius: 28px;
  padding: 28px 24px;
  box-shadow: 0 28px 80px rgba(249, 115, 22, 0.15), 0 0 0 1px #fde8d0;
}

.psh-quiz.psh-tmpl-vibrant::before {
  background: radial-gradient(circle at 30% 30%, rgba(249, 115, 22, 0.18), rgba(168, 85, 247, 0));
}

.psh-quiz.psh-tmpl-vibrant .psh-intro {
  background: linear-gradient(135deg, #f97316, #a855f7);
  border-radius: 22px;
}

.psh-quiz.psh-tmpl-vibrant .psh-intro-title {
  font-size: 24px;
  font-weight: 800;
}

.psh-quiz.psh-tmpl-vibrant .psh-start {
  background: #fff;
  color: #f97316;
  border-radius: 999px;
  font-size: 15px;
}

.psh-quiz.psh-tmpl-vibrant .psh-quiz-header {
  background: #fff;
  border-color: #fde8d0;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.1);
}

.psh-quiz.psh-tmpl-vibrant .psh-progress-fill {
  background: linear-gradient(90deg, #f97316, #a855f7);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.psh-quiz.psh-tmpl-vibrant .psh-timer {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
  border-radius: 14px;
}

.psh-quiz.psh-tmpl-vibrant .psh-q {
  border-color: #fce8ff;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(249, 115, 22, 0.1);
}

.psh-quiz.psh-tmpl-vibrant .psh-q-title {
  font-size: 18px;
  font-weight: 800;
}

.psh-quiz.psh-tmpl-vibrant .psh-q-title .psh-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #a855f7);
  color: #fff;
}

/* Vibrant pill options */
.psh-quiz.psh-tmpl-vibrant .psh-opt span {
  border: 2px solid #fde8d0;
  border-radius: 999px;
  background: #fff7ed;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 18px;
  color: #7c2d12;
  transition: all .2s cubic-bezier(.34, 1.56, .64, 1);
}

.psh-quiz.psh-tmpl-vibrant .psh-opt span::before {
  display: none;
}

.psh-quiz.psh-tmpl-vibrant .psh-opt:hover span {
  border-color: #f97316;
  background: #fff7ed;
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.2);
}

.psh-quiz.psh-tmpl-vibrant .psh-opt input:checked+span {
  background: linear-gradient(135deg, #f97316, #a855f7);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 28px rgba(249, 115, 22, 0.4);
  transform: scale(1.03);
}

.psh-quiz.psh-tmpl-vibrant .psh-actions .psh-submit,
.psh-quiz.psh-tmpl-vibrant .psh-actions .psh-retry,
.psh-quiz.psh-tmpl-vibrant .psh-emailpdf .psh-email-send,
.psh-quiz.psh-tmpl-vibrant .psh-pdf-btn {
  background: linear-gradient(135deg, #f97316, #a855f7);
  border-color: #ea580c;
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.3);
  border-radius: 999px;
  font-size: 15px;
}

.psh-quiz.psh-tmpl-vibrant .psh-actions .psh-prev,
.psh-quiz.psh-tmpl-vibrant .psh-actions .psh-next {
  background: #fff7ed;
  border-color: #fde8d0;
  color: #92400e;
  border-radius: 999px;
}

.psh-quiz.psh-tmpl-vibrant .psh-summary {
  border-radius: 18px;
  border-color: #fde8d0;
}

.psh-quiz.psh-tmpl-vibrant .psh-stat {
  border-radius: 16px;
  background: #fff7ed;
  border-color: #fde8d0;
}

.psh-quiz.psh-tmpl-vibrant .psh-stat-value {
  color: #c2410c;
}

.psh-quiz.psh-tmpl-vibrant .psh-acc-item {
  border-radius: 18px;
  border-color: #fde8d0;
}

.psh-quiz.psh-tmpl-vibrant .psh-acc-head {
  background: #fff7ed;
}

.psh-quiz.psh-tmpl-vibrant .psh-acc-num {
  background: #ffedd5;
  color: #c2410c;
}

.psh-quiz.psh-tmpl-vibrant .psh-share .psh-share-btn {
  border-radius: 999px;
}

.psh-quiz.psh-tmpl-vibrant .psh-toast {
  background: linear-gradient(135deg, #f97316, #a855f7);
}
