/* Public quiz pages (/uk/quiz/…, /en/quiz/…). Loaded after style.css and built on its
   tokens: --paper, --ink, --muted, --purple, --line, --lime. */
.qz {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  font-size: 17px;
}
.qz > * {
  flex-shrink: 0;
}
.qz main {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding-bottom: 40px;
}
.qz .site-bar {
  background: var(--paper);
  box-shadow: 0 1px 0 var(--line);
}
.qz .button {
  min-height: 54px;
  font-size: 16px;
}
.qz .header-actions .button {
  min-height: 44px;
  font-size: 14px;
}
.qz .footer {
  padding-top: 40px;
}
.qz .footer > div > p,
.qz .footer-links {
  font-size: 14px;
}
.qz .footer-bottom small {
  font-size: 12px;
}

/* Section chips under the header: the way around the catalog on a phone, where the
   header keeps only the brand, the language switch and the call to action. */
.qz-subnav {
  display: flex;
  gap: 8px;
  padding-block: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
}
.qz-subnav::-webkit-scrollbar {
  display: none;
}
.qz-subnav a {
  flex: none;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fffdf8;
}
.qz-subnav a:hover,
.qz-subnav a[aria-current] {
  color: var(--purple);
  border-color: var(--lav-3);
  background: var(--lav-2);
}

.qz-crumbs {
  padding-top: 22px;
  font-size: 14px;
  color: var(--muted);
}
.qz-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.qz-crumbs li + li::before {
  content: "›";
  margin-right: 8px;
  color: #a5a79c;
}
.qz-crumbs a:hover {
  color: var(--purple);
}
.qz-crumbs [aria-current] {
  color: var(--ink);
  font-weight: 700;
}

.qz-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 48px;
  padding-block: 36px 52px;
}
.qz-hero h1 {
  margin: 8px 0 16px;
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.qz-lead {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(18px, 1.6vw, 20px);
  line-height: 1.6;
}
.qz-hero-art {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ece8dc;
  box-shadow: 0 14px 34px -22px #3a2a5c80;
}
.qz-hero-art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}
.qz-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  font-weight: 800;
}
.qz-meta li {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
}
.qz-actions {
  margin: 30px 0 0;
}

.qz-block {
  padding-block: 28px;
}
.qz-block h2,
.qz-board h2,
.qz-how h2,
.qz-play h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.2;
}
.qz-block h2 a:hover {
  color: var(--purple);
}
.qz-sub {
  margin: 0 0 18px;
  max-width: 68ch;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}
.qz-group {
  margin-top: 30px;
}
.qz-group h2,
.qz-group h3,
.qz-group h4 {
  margin: 0 0 12px;
  font-size: 20px;
}
.qz-group h3 {
  font-size: 17px;
}
.qz-group h4 {
  font-size: 15px;
  color: var(--muted);
}
.qz-group h2 a:hover {
  color: var(--purple);
}

.qz-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}
.qz-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  transition:
    border-color 0.2s,
    box-shadow 0.25s,
    transform 0.25s;
}
.qz-card:hover {
  border-color: var(--purple);
  box-shadow: 0 12px 24px -14px #4c357399;
  transform: translateY(-3px);
}
.qz-card strong {
  font-size: 17px;
  line-height: 1.3;
}
.qz-card span {
  color: var(--muted);
  font-size: 14px;
}
/* The last card of a game list: not a game, an invitation to build a mix. */
.qz-card--mix {
  position: relative;
  border: 1px dashed var(--night);
  background: var(--lime);
  color: var(--night);
}
.qz-card--mix:hover {
  border-color: var(--night);
  border-style: solid;
}
.qz-card--mix em {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--night);
  color: var(--lime);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.qz-card--mix span {
  color: var(--night);
  opacity: 0.75;
}
.qz-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.qz-pills a {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
  font-size: 13px;
  font-weight: 700;
}
.qz-pills a:hover {
  border-color: var(--purple);
  color: var(--purple);
}

/* The board: the landing's purple tiles, five columns on a desktop, stacked on a phone. */
.qz-board {
  padding-block: 28px;
}
.qz-columns {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 3px solid var(--lav-3);
  border-radius: 18px;
  background: var(--night);
  box-shadow: 0 8px 0 var(--lav-3);
}
.qz-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.qz-column h3 {
  margin: 0;
  padding: 6px 4px 8px;
  color: #f9edff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.qz-column ol {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.qz-clue {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid #ffffff18;
  border-radius: 8px;
  background: linear-gradient(130deg, #745997, #644b86);
  color: #f6f0ff;
  box-shadow: inset 0 1px #ffffff15;
}
.qz-clue p {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.qz-pts {
  color: #efe0a7;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}
.qz-clue--locked {
  flex: 1;
  min-height: 64px;
  background: #4c376b;
  color: #cbb9e4;
}
.qz-hint {
  margin: 0;
  color: #d8c9ee;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.qz-locked {
  margin-top: auto;
}
.qz-clue-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 6px;
  background: #4c376b;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.qz-clue-picture--hidden {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 6px;
  background: linear-gradient(120deg, #80699e, #4b386a);
  cursor: help;
}
.qz-clue-picture--hidden .qz-clue-img {
  height: 100%;
  filter: blur(14px);
  transform: scale(1.12);
}
.qz-clue-picture--hidden::after {
  content: attr(data-hint);
  position: absolute;
  inset: auto 8px 8px;
  padding: 5px 8px;
  border-radius: 5px;
  background: #1b103dc9;
  color: #fff;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.2s;
}
.qz-clue-picture--hidden:hover::after,
.qz-clue-picture--hidden:focus-visible::after {
  opacity: 1;
}
@media (hover: none) {
  .qz-clue-picture--hidden::after {
    opacity: 1;
  }
}
.qz-clue--locked .qz-pts {
  color: #b7a67a;
}
.qz-locked {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.qz-play {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-block: 32px;
  padding: 28px 32px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #5b3dba, var(--night));
  color: #fff;
}
.qz-play h2 {
  color: #fff;
}
.qz-play p {
  margin: 0;
  max-width: 56ch;
  color: var(--lav-2);
  line-height: 1.55;
}
.qz-play .qz-actions {
  margin: 0;
  flex: none;
}
.qz-play .button {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}
.qz-play .button:hover {
  background: #e6f6a0;
}

.qz-how {
  padding-block: 20px;
}
.qz-how ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.qz-how li {
  position: relative;
  padding: 18px 18px 18px 58px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  line-height: 1.5;
  counter-increment: step;
}
.qz-how li::before {
  content: counter(step);
  position: absolute;
  top: 16px;
  left: 16px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--lav-2);
  color: var(--purple);
  font-weight: 800;
}
.qz .text-link {
  display: inline-flex;
  flex-wrap: wrap;
  white-space: normal;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--purple);
}

.qz-message {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  padding-block: clamp(56px, 8vh, 100px);
  text-align: center;
}
.qz-message h1 {
  max-width: 20ch;
  margin: 0 0 20px;
  color: var(--night);
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.15;
}
.qz-message p {
  max-width: 44ch;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 20px);
  line-height: 1.65;
  text-wrap: pretty;
}
.qz-message .qz-actions {
  margin-top: 32px;
}

@media (max-width: 1100px) {
  .qz-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .qz-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding-block: 24px 36px;
  }
  .qz-hero-art {
    order: -1;
  }
  .qz-how ol {
    grid-template-columns: minmax(0, 1fr);
  }
  .qz-play {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
  }
}
@media (max-width: 700px) {
  .qz-columns {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .qz-column ol {
    flex-direction: column;
  }
  .qz-clue--locked {
    flex: none;
    min-height: 0;
  }
  .qz .header .button {
    display: none;
  }
}

/* Every row of the board as tall as its tallest clue: the columns share the board's row tracks. */
@supports (grid-template-rows: subgrid) {
  .qz-columns {
    gap: 8px 12px;
  }
  .qz-column {
    display: grid;
    grid-row: span var(--qz-span, 6);
    grid-template-rows: subgrid;
  }
  .qz-column ol {
    display: grid;
    grid-row: span var(--qz-rows, 5);
    grid-template-rows: subgrid;
  }
  .qz-column h3 {
    align-self: end;
  }
  .qz-clue--locked {
    min-height: 0;
  }
  @media (max-width: 1100px) {
    .qz-column {
      margin-bottom: 10px;
    }
  }
}

/* Motion. CSS only: the page stays plain HTML for crawlers and for visitors with scripts off. */
@keyframes qz-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}
@keyframes qz-zoom {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
}
/* A tile turning up on the board, like a card being flipped face-up. */
@keyframes qz-flip {
  from {
    opacity: 0;
    transform: perspective(600px) rotateX(-70deg) translateY(10px);
  }
}
@keyframes qz-wiggle {
  0%,
  100% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(-14deg);
  }
  60% {
    transform: rotate(10deg);
  }
}
@keyframes qz-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 #d8ef7966;
  }
  50% {
    box-shadow: 0 0 0 10px #d8ef7900;
  }
}
@keyframes qz-drift {
  from {
    transform: translate(-6%, -4%) scale(1);
  }
  to {
    transform: translate(8%, 6%) scale(1.15);
  }
}

/* Above the fold: plays once on load, staggered. */
.qz-crumbs,
.qz-hero-copy > * {
  animation: qz-rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.qz-hero-copy > :nth-child(2) {
  animation-delay: 0.06s;
}
.qz-hero-copy > :nth-child(3) {
  animation-delay: 0.12s;
}
.qz-hero-copy > :nth-child(4) {
  animation-delay: 0.18s;
}
.qz-hero-copy > :nth-child(5) {
  animation-delay: 0.24s;
}
.qz-hero-art {
  animation: qz-zoom 0.8s 0.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.qz-hero-art img {
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.qz-hero-art:hover img {
  transform: scale(1.045);
}
.qz-meta li {
  transition:
    transform 0.2s,
    border-color 0.2s,
    background 0.2s;
}
.qz-meta li:hover {
  border-color: var(--purple);
  background: #f1ebfc;
  transform: translateY(-2px);
}

/* The board. */
.qz-clue {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.22s,
    background 0.22s,
    border-color 0.22s;
}
.qz-clue::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    #ffffff30 50%,
    transparent 65%
  );
  transform: translateX(-120%);
  pointer-events: none;
}
.qz-pts {
  transition:
    transform 0.22s cubic-bezier(0.3, 1.6, 0.5, 1),
    color 0.22s;
  transform-origin: left center;
}
.qz-lock {
  transform-origin: 50% 85%;
}
.qz-clue:active {
  transform: scale(0.98);
}

.qz-play .button > span {
  transition: transform 0.2s;
}
.qz-play .button:hover > span {
  transform: translate(3px, -3px);
}
.qz-play {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.qz-play::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -60%;
  left: -10%;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #7051cc66, transparent 65%);
  animation: qz-drift 9s ease-in-out infinite alternate;
}
.qz-play .button {
  animation: qz-glow 2.8s ease-in-out infinite;
}
.qz-play .button:hover {
  animation-play-state: paused;
}

.qz-how li {
  transition:
    transform 0.25s,
    border-color 0.25s,
    box-shadow 0.25s;
}
.qz-how li::before {
  transition:
    transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1),
    background 0.25s,
    color 0.25s;
}
.qz-how li:hover {
  border-color: var(--purple);
  box-shadow: 0 12px 24px -16px #4c357399;
  transform: translateY(-3px);
}
.qz-how li:hover::before {
  background: var(--purple);
  color: #fff;
  transform: rotate(-12deg) scale(1.12);
}

.qz-pills a {
  transition:
    transform 0.2s,
    border-color 0.2s,
    background 0.2s,
    color 0.2s;
}
.qz-pills a:hover {
  background: #f1ebfc;
  transform: translateY(-2px);
}
.qz-subnav a {
  transition:
    border-color 0.2s,
    background 0.2s,
    color 0.2s;
}

/* Hover: only where there is a pointer to hover with. */
@media (hover: hover) {
  .qz-clue:not(.qz-clue--locked):hover {
    z-index: 1;
    border-color: #ffffff55;
    background: linear-gradient(130deg, #8a6cb3, #6f539a);
    box-shadow:
      inset 0 1px #ffffff30,
      0 10px 22px -10px #1c0f33cc;
    transform: translateY(-3px) scale(1.025);
  }
  .qz-clue:not(.qz-clue--locked):hover::after {
    transform: translateX(120%);
    transition: transform 0.7s ease;
  }
  .qz-clue:hover > .qz-clue-img {
    transform: scale(1.06);
  }
  .qz-clue:not(.qz-clue--locked):hover .qz-pts {
    color: #ffe9a0;
    transform: scale(1.18);
  }
  .qz-clue--locked:hover {
    background: #57407a;
    transform: translateY(-1px);
  }
  .qz-clue--locked:hover .qz-lock {
    animation: qz-wiggle 0.5s ease;
  }
  .qz-clue--locked:hover .qz-locked {
    color: #efe3ff;
  }
  /* Spotlight the column under the pointer. */
  .qz-column {
    transition: opacity 0.25s;
  }
  .qz-columns:has(.qz-clue:hover) .qz-column:not(:has(.qz-clue:hover)) {
    opacity: 0.72;
  }
}

/* Below the fold: each block plays as it scrolls into view, where the browser can drive that. */
@supports (animation-timeline: view()) {
  .qz-card,
  .qz-how li,
  .qz-play,
  .qz-block > h2 {
    animation: qz-rise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 45%;
  }
  .qz-clue {
    animation: qz-flip linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 60%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qz-crumbs,
  .qz-hero-copy > *,
  .qz-hero-art,
  .qz-card,
  .qz-clue,
  .qz-how li,
  .qz-play,
  .qz-play::before,
  .qz-play .button,
  .qz-block > h2 {
    animation: none;
  }
  .qz *,
  .qz *::before,
  .qz *::after {
    transition: none !important;
  }
  .qz-clue:hover,
  .qz-card:hover,
  .qz-how li:hover,
  .qz-pills a:hover,
  .qz-meta li:hover,
  .qz-hero-art:hover img {
    transform: none !important;
  }
}

/* Search over the quiz pages (quiz-search.js shows it; without scripts it stays hidden). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.qz-search {
  position: relative;
  padding-top: 14px;
}
.qz-search[hidden] {
  display: none;
}
.qz-search-field {
  display: block;
}
.qz-search input {
  width: 100%;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.qz-search input:focus {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
  border-color: var(--purple);
}
.qz-search-results {
  position: absolute;
  inset-inline: 0;
  z-index: 20;
  max-height: min(70vh, 520px);
  margin: 8px 0 0;
  padding: 6px;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffdf8;
  box-shadow: 0 24px 40px -20px #2a1d4a66;
}
.qz-search-results[hidden] {
  display: none;
}
.qz-search-results a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 12px;
}
.qz-search-results a:hover,
.qz-search-results a:focus-visible {
  background: #e8dff8;
  outline: none;
}
.qz-search-results strong {
  font-size: 15px;
  line-height: 1.3;
}
.qz-search-results span,
.qz-search-empty {
  color: var(--muted);
  font-size: 12px;
}
.qz-search-empty {
  padding: 12px 14px;
}

.qz-admin-status {
  display: inline-flex;
  align-self: flex-start;
  width: fit-content;
  margin: 0 0 14px;
  padding: 7px 14px;
  border: 1px solid var(--lav-3);
  border-radius: 999px;
  background: var(--lav-2);
  color: var(--night);
  font-size: 14px;
  font-weight: 800;
}
