/* The question bank quiz page (quiz.html): topic and level picker, rounds, daily quiz, flashcards. */
.qz { max-width: 960px; margin: 0 auto; }
.qz-glass { background: rgba(255, 255, 255, .62); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  border-radius: 22px; box-shadow: inset 0 0 0 1px rgba(43, 52, 66, .13), inset 0 1px 0 #fff, 0 18px 44px -24px rgba(15, 40, 60, .4); }
.qz-daily { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding: 22px 24px; margin-bottom: 26px; }
.qz-daily h2 { margin: 0 0 .25em; }
.qz-daily p { margin: 0; color: var(--mist); }
.qz-step { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--mist); margin: 22px 0 10px; }
.qz-levels, .qz-modes { display: flex; flex-wrap: wrap; gap: 8px; }
.qz-levels .chip small { display: block; font-size: .72rem; color: inherit; opacity: .75; line-height: 1.1; }
.qz-levels .chip { min-height: 48px; text-align: left; line-height: 1.2; }
.qz-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.qz-topic { text-align: left; font: inherit; color: var(--paper); cursor: pointer; border: 0; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-height: 128px; transition: transform .12s ease, box-shadow .15s ease; }
.qz-topic:hover, .qz-topic:focus-visible { transform: translateY(-2px); box-shadow: inset 0 0 0 1.5px var(--ember), 0 18px 40px -22px rgba(15, 40, 60, .5); outline: none; }
.qz-topic h3 { font-size: 1.05rem; margin: 0; }
.qz-topic p { margin: 0; color: var(--mist); font-size: .9rem; line-height: 1.4; }
.qz-topic .meta { margin-top: auto; font-size: .82rem; color: var(--ember); font-weight: 500; }
.qz-topic[disabled] { opacity: .45; cursor: default; transform: none; }
.qz-card { padding: 24px; }
.qz-card h2 { font-family: var(--sans); font-weight: 600; font-size: clamp(1.15rem, 3.2vw, 1.5rem); line-height: 1.35; }
.qz-top { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; }
.qz-explain { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: rgba(239, 235, 229, .75); }
.qz-explain a { white-space: nowrap; }
.qz-review { display: grid; gap: 10px; margin-top: 18px; text-align: left; }
.qz-review li { padding: 12px 14px; border-radius: 14px; background: rgba(247, 245, 242, .8); list-style: none; }
.qz-review .ok { color: var(--good); font-weight: 600; }
.qz-review .no { color: var(--bad); font-weight: 600; }
.qz-review ol { padding: 0; margin: 0; display: grid; gap: 10px; }
.qz-fc { position: relative; min-height: 300px; perspective: 1200px; cursor: pointer; outline: none; touch-action: pan-y; margin: 14px 0; }
.qz-fc .face { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 26px; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .5s cubic-bezier(.3, .7, .2, 1); overflow: auto; }
.qz-fc .face p { max-width: 52ch; margin: 8px 0; }
.qz-fc .front p { font-size: 1.2rem; font-weight: 500; }
.qz-fc .back { transform: rotateY(180deg); }
.qz-fc.flipped .front { transform: rotateY(-180deg); }
.qz-fc.flipped .back { transform: rotateY(0); }
.qz-fc:focus-visible .face { box-shadow: 0 0 0 3px var(--ember); }
.qz-fc .ans { font-size: 1.25rem; font-weight: 600; }
.qz-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.qz-note { font-size: .88rem; color: var(--mist); }
@media (max-width: 600px) { .qz-card { padding: 18px 16px; } .qz-topics { grid-template-columns: 1fr 1fr; } .qz-topic { min-height: 110px; padding: 14px; } .qz-topic p { display: none; } }
@media (prefers-reduced-motion: reduce) { .qz-fc .face, .qz-topic { transition: none; } }

/* Until the quiz has drawn itself (empty, or only its "Loading…" line) the box is a screen tall,
   so the footer stays off screen and does not jump about. */
#quiz:empty, #quiz:has(> p.muted:only-child > .spinner) { min-height: 100vh; }
