/* Hindu knowledge quiz */

.hq-page {
  --hq-accent: #1d4ed8;
  --hq-accent-soft: rgba(29, 78, 216, 0.1);
  --hq-deep: #1e3a8a;
  --hq-ink: #12161f;
  --hq-muted: #4b5563;
  --hq-line: rgba(18, 22, 31, 0.12);
  --hq-card: rgba(248, 250, 255, 0.94);
  --hq-ok: #166534;
  --hq-bad: #991b1b;
  --hq-display: Fraunces, Georgia, serif;
  --hq-body: Outfit, system-ui, sans-serif;
  font-family: var(--hq-body);
  background:
    radial-gradient(ellipse 75% 45% at 10% 0%, rgba(29, 78, 216, 0.1), transparent 55%),
    linear-gradient(180deg, #f4f7ff 0%, #f7f8fc 50%, #eef1f8 100%);
  min-height: 100vh;
}

.hq-wrap { max-width: 42rem; }

.hq-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(180deg, #1e3a8a 0%, #1d4ed8 100%);
  color: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 20;
}

.hq-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.hq-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.88rem;
}

.hq-top-link { color: #dbeafe; text-decoration: none; }
.hq-top-link:hover { color: #fff; }
.hq-user { opacity: 0.9; }

.hq-hero-mark {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1rem;
  position: relative;
  display: grid;
  place-items: center;
}

.hq-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(29, 78, 216, 0.35);
  background: conic-gradient(from 40deg, rgba(29, 78, 216, 0.22), transparent 45%, rgba(30, 58, 138, 0.15), transparent 80%);
  animation: hq-spin 18s linear infinite;
}

.hq-ring-core {
  position: relative;
  font-family: var(--hq-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--hq-deep);
}

@keyframes hq-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .hq-ring { animation: none; }
}

.hq-note {
  margin: 1.25rem 0 0;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(29, 78, 216, 0.25);
  background: linear-gradient(145deg, rgba(29, 78, 216, 0.07), rgba(255, 255, 255, 0.8));
}

.hq-note p { margin: 0 0 0.55rem; line-height: 1.55; color: var(--hq-ink); }
.hq-cta {
  color: var(--hq-accent);
  font-weight: 600;
  text-decoration: none;
}
.hq-cta:hover { text-decoration: underline; }

.hq-panel { display: none; margin-top: 1.5rem; }
.hq-panel.is-active { display: block; }

.hq-setup {
  display: grid;
  gap: 1.1rem;
  padding: 1.15rem;
  border: 1px solid var(--hq-line);
  background: var(--hq-card);
}

.hq-field {
  display: grid;
  gap: 0.35rem;
}

.hq-field span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--hq-deep);
}

.hq-field input,
.hq-field select {
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--hq-line);
  font: inherit;
  background: #fff;
}

.hq-fieldset {
  margin: 0;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--hq-line);
}

.hq-fieldset legend {
  padding: 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--hq-deep);
}

.hq-check {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin: 0.35rem 0;
  font-size: 0.92rem;
  color: var(--hq-ink);
  cursor: pointer;
}

.hq-pool-hint {
  margin: 0;
  font-size: 0.88rem;
  color: var(--hq-muted);
}

.hq-error {
  margin: 0;
  color: var(--hq-bad);
  font-size: 0.92rem;
}

.hq-btn {
  border: 1px solid var(--hq-line);
  background: #fff;
  color: var(--hq-ink);
  padding: 0.65rem 1.1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.hq-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hq-btn-primary {
  background: var(--hq-accent);
  border-color: var(--hq-accent);
  color: #fff;
}

.hq-btn-primary:hover:not(:disabled) {
  background: var(--hq-deep);
}

.hq-btn-ghost:hover:not(:disabled) {
  border-color: rgba(29, 78, 216, 0.4);
  background: var(--hq-accent-soft);
}

.hq-progress { margin-bottom: 1rem; }
.hq-progress-track {
  height: 0.4rem;
  background: rgba(29, 78, 216, 0.12);
  overflow: hidden;
}
.hq-progress-bar {
  height: 100%;
  width: 0;
  background: var(--hq-accent);
  transition: width 0.25s ease;
}
.hq-progress-label {
  margin: 0.45rem 0 0;
  font-size: 0.85rem;
  color: var(--hq-muted);
}

.hq-q-meta {
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--hq-accent);
}

.hq-question {
  font-family: var(--hq-display);
  font-size: 1.25rem;
  line-height: 1.4;
  margin: 0 0 1rem;
  color: var(--hq-ink);
}

.hq-options {
  display: grid;
  gap: 0.55rem;
}

.hq-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  text-align: left;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--hq-line);
  background: #fff;
  font: inherit;
  cursor: pointer;
  color: var(--hq-ink);
}

.hq-option:hover:not(:disabled) {
  border-color: rgba(29, 78, 216, 0.4);
  background: var(--hq-accent-soft);
}

.hq-option.is-selected {
  border-color: rgba(29, 78, 216, 0.55);
  background: var(--hq-accent-soft);
}

.hq-option.is-correct {
  border-color: rgba(22, 101, 52, 0.55);
  background: rgba(22, 101, 52, 0.08);
}

.hq-option.is-wrong {
  border-color: rgba(153, 27, 27, 0.5);
  background: rgba(153, 27, 27, 0.07);
}

.hq-option-letter {
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--hq-accent-soft);
  color: var(--hq-deep);
  font-size: 0.8rem;
  font-weight: 700;
}

.hq-option p { margin: 0.15rem 0 0; line-height: 1.45; }

.hq-hint {
  margin: 0.85rem 0 0;
  padding: 0.7rem 0.85rem;
  background: rgba(180, 83, 9, 0.08);
  border-left: 3px solid #b45309;
  color: var(--hq-muted);
  font-size: 0.92rem;
}

.hq-feedback {
  margin: 0.85rem 0 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--hq-line);
  background: #fff;
}

.hq-feedback.is-correct { border-color: rgba(22, 101, 52, 0.35); }
.hq-feedback.is-wrong { border-color: rgba(153, 27, 27, 0.35); }
.hq-feedback strong { display: block; margin-bottom: 0.35rem; }
.hq-feedback p { margin: 0.35rem 0 0; line-height: 1.5; color: var(--hq-muted); font-size: 0.95rem; }

.hq-quiz-actions,
.hq-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.15rem;
}

.hq-score-line {
  font-size: 1.05rem;
  color: var(--hq-ink);
}

.hq-score-ring {
  width: 5.5rem;
  height: 5.5rem;
  margin: 0.75rem 0 1.25rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 4px solid rgba(29, 78, 216, 0.25);
  background: var(--hq-accent-soft);
  font-family: var(--hq-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--hq-deep);
}

.hq-review {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  max-height: 18rem;
  overflow: auto;
}

.hq-review li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--hq-line);
  background: #fff;
  font-size: 0.9rem;
  line-height: 1.4;
}

.hq-review li.is-correct strong { color: var(--hq-ok); }
.hq-review li.is-wrong strong { color: var(--hq-bad); }

.hq-reveal { opacity: 1; }

.hq-samples {
  margin: 1.5rem 0;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--hq-line);
  background: rgba(255, 255, 255, 0.74);
}

.hq-samples-kicker,
.hq-sample-meta {
  margin: 0 0 0.25rem;
  color: var(--hq-blue);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hq-samples > h2 {
  margin: 0 0 0.35rem;
  font-family: var(--bk-display);
}

.hq-sample {
  margin-top: 1rem;
  padding: 1rem;
  border-top: 1px solid var(--hq-line);
}

.hq-sample h3 {
  margin: 0.25rem 0 0.65rem;
  font-size: 1.05rem;
  line-height: 1.5;
}

.hq-sample ol {
  display: grid;
  gap: 0.25rem;
}

.hq-sample details {
  padding: 0.65rem 0.75rem;
  background: rgba(29, 78, 216, 0.05);
}

.hq-sample summary {
  cursor: pointer;
  color: var(--hq-blue);
  font-weight: 700;
}

@media (max-width: 640px) {
  .hq-question { font-size: 1.1rem; }
}
