/* The country test. Restyle through these, on .qz or any ancestor:
     --qz-bg          step background (transparent by default: the section's ground)
     --qz-fg          text
     --qz-muted       progress text, back link
     --qz-answer-bg   answer button background
     --qz-answer-fg   answer button text
     --qz-answer-border
     --qz-accent      focus ring, current dot, primary result button
     --qz-on-accent   text on the primary result button
     --qz-radius      answer and button corners
     --qz-serif       the big line (question, result)
     --qz-sans        everything else */

.qz {
  --qz-bg: transparent;
  --qz-fg: var(--color-ink, #1d1316);
  --qz-muted: var(--color-ink-muted, #6b5a60);
  --qz-answer-bg: var(--color-surface-card, #fff);
  --qz-answer-fg: var(--color-ink, #1d1316);
  --qz-answer-border: var(--color-border, #e3ddd6);
  --qz-accent: var(--color-accent, #82182e); /* burgundy on the light shelf, #e6d6db on the dark one */
  --qz-on-accent: var(--color-on-accent, #fff);
  --qz-radius: var(--radius-control, 12px);
  --qz-serif: var(--font-serif, "Instrument Serif", Georgia, serif);
  --qz-sans: var(--font-sans, "Inter Variable", system-ui, sans-serif);
  display: block;
  max-width: 36rem;
  background: var(--qz-bg);
  color: var(--qz-fg);
  font-family: var(--qz-sans);
  /* The slide starts 24px to the side; clipping it sideways keeps the page from
     scrolling, and the 8px of padding keeps focus rings inside the clip. */
  overflow-x: clip;
  padding-inline: 8px;
  margin-inline: -8px;
}
.qz * { box-sizing: border-box; }

.qz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
}
.qz-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--qz-muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}
.qz-dots { display: inline-flex; gap: 6px; }
.qz-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.3;
}
.qz-dot.is-done { opacity: 0.75; }
.qz-dot.is-current { opacity: 1; background: var(--qz-accent); }

.qz-back {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--qz-muted);
  font: 500 0.875rem/1 var(--qz-sans);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.qz-back:hover { color: var(--qz-fg); }

.qz-question {
  margin: 16px 0 24px;
  font: 400 clamp(1.875rem, 1.4rem + 2vw, 2.75rem)/1.1 var(--qz-serif);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.qz-question:focus, .qz-result__title:focus { outline: none; } /* focused by script to announce the step */

.qz-answers { display: grid; gap: 10px; }
.qz-answer {
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  border: 1.5px solid var(--qz-answer-border);
  border-radius: var(--qz-radius);
  background: var(--qz-answer-bg);
  color: var(--qz-answer-fg);
  font: 400 1rem/1.4 var(--qz-sans);
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, transform 120ms ease;
}
.qz-answer:hover { border-color: var(--qz-accent); }
.qz-answer:active { transform: scale(0.99); }

.qz-back:focus-visible,
.qz-answer:focus-visible,
.qz-share:focus-visible,
.qz-again:focus-visible { outline: 2px solid var(--qz-accent); outline-offset: 3px; }

.qz-gate__body { margin: -8px 0 20px; font-size: 1rem; line-height: 1.5; }

.qz-result__title {
  margin: 8px 0 16px;
  font: 400 clamp(2.5rem, 1.8rem + 3.5vw, 4rem)/1.02 var(--qz-serif);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.qz-result__streak {
  margin: -6px 0 16px;
  font: italic 400 1.5rem/1.2 var(--qz-serif);
}
.qz-result__character { margin: 0 0 16px; font-size: 1.0625rem; line-height: 1.55; }
.qz-result__promise { margin: 0 0 24px; font-size: 1rem; line-height: 1.55; color: var(--qz-muted); }
.qz-result__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.qz-share, .qz-again {
  flex: 1 1 12rem;
  min-height: 52px;
  padding: 0 20px;
  border-radius: var(--qz-radius);
  font: 600 1rem/1.2 var(--qz-sans);
  cursor: pointer;
}
.qz-share { border: 0; background: var(--qz-accent); color: var(--qz-on-accent); }
.qz-again { border: 1.5px solid var(--qz-answer-border); background: transparent; color: var(--qz-fg); }
.qz-result__note { margin: 12px 0 0; font-size: 0.875rem; }
.qz-result__note:empty { display: none; }

@media (prefers-reduced-motion: reduce) {
  .qz-answer { transition: none; }
}
