/* Words to keep + quizzes. Pairs with play.js */

/* ---------- Words to keep ---------- */
.qs-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 2rem; }
.qs-head h2 { max-width: 30rem; }
.qs-filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.qs-filters button { font: inherit; font-family: var(--ui); font-size: .8125rem; font-weight: 500; cursor: pointer; background: transparent; border: 0; }
.qs-filters button[aria-pressed="true"] { background: rgba(232,185,111,.16); box-shadow: 0 0 0 1px var(--gold) inset; color: var(--gold-hi); }

.qs-stage {
  --accent: var(--gold);
  position: relative; overflow: hidden; isolation: isolate;
  min-height: clamp(22rem, 46vw, 27rem);
  border-radius: 1.25rem;
  background: linear-gradient(160deg, #0f2236 0%, #0a1726 60%, #08121e 100%);
  box-shadow: 0 0 0 1px var(--rule) inset, 0 40px 80px -50px rgba(0,0,0,.9);
  display: flex; align-items: center;
  transition: box-shadow .6s ease;
}
.qs-fx { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.qs-orb { position: absolute; border-radius: 50%; filter: blur(48px); opacity: .55; background: var(--accent); transition: background 1.2s ease; }
.qs-orb.a { width: 26rem; height: 26rem; left: -6rem; top: -8rem; animation: orbA 16s ease-in-out infinite alternate; opacity: .32; }
.qs-orb.b { width: 20rem; height: 20rem; right: -5rem; bottom: -7rem; animation: orbB 19s ease-in-out infinite alternate; opacity: .22; }
@keyframes orbA { to { transform: translate(8rem, 5rem) scale(1.15); } }
@keyframes orbB { to { transform: translate(-7rem, -4rem) scale(1.2); } }
.qs-floaters { position: absolute; inset: 0; }
.qs-float { position: absolute; bottom: -2rem; width: calc(1.1rem * var(--s)); height: calc(1.1rem * var(--s)); color: var(--accent); opacity: 0; animation: floatUp var(--d) linear var(--delay) infinite; }
.qs-float svg { width: 100%; height: 100%; display: block; }
@keyframes floatUp {
  0% { transform: translate(0, 0) rotate(-10deg); opacity: 0; }
  12% { opacity: .55; }
  80% { opacity: .35; }
  100% { transform: translate(var(--drift), -30rem) rotate(18deg); opacity: 0; }
}
.qs-stage.is-paused .qs-float, .qs-stage.is-paused .qs-orb { animation-play-state: paused; }

.qs-body { position: relative; width: 100%; padding: clamp(2.2rem, 6vw, 4.5rem) clamp(1.4rem, 6vw, 5rem) clamp(4.2rem, 7vw, 5rem); }
.qs-quote { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(1.6rem, 3.6vw, 2.75rem); line-height: 1.24; letter-spacing: -.015em; text-wrap: balance; max-width: 46rem; }
.qs-quote::before { content: "“"; display: block; font-style: normal; font-weight: 700; font-size: 4.5em; line-height: .6; height: .42em; color: var(--accent); opacity: .5; transition: color 1s ease; }
.qs-quote p { max-width: none; }
.qs-quote .w { display: inline-block; }
.qs-stage.is-in .qs-quote .w { animation: wordIn .7s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--n) * 55ms + 80ms); }
@keyframes wordIn { from { opacity: 0; transform: translateY(.45em); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

.qs-cite { display: flex; align-items: center; gap: .9rem; margin-top: 1.8rem; font-family: var(--ui); font-size: .875rem; }
.qs-stage.is-in .qs-cite { animation: citeIn .8s ease both .5s; }
@keyframes citeIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.qs-book img { width: 2.5rem; height: auto; border-radius: 2px 4px 4px 2px; box-shadow: 0 8px 18px -6px rgba(0,0,0,.8); transition: transform .3s ease; }
.qs-book:hover img { transform: rotate(-4deg) scale(1.06); }
.qs-cite > span { display: flex; flex-direction: column; line-height: 1.35; }
.qs-title { color: var(--chalk); text-decoration: none; font-weight: 500; }
.qs-title:hover { color: var(--accent); }
.qs-cite small { color: var(--mist); font-size: .8125rem; }
.qs-cite small a { color: var(--mist); }

.qs-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.06); }
.qs-bar span { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: var(--accent); animation: barFill linear forwards; }
.qs-stage:not(.is-visible) .qs-bar span, .qs-stage.is-paused .qs-bar span, .qs-stage.is-hover .qs-bar span { animation-play-state: paused; }
@keyframes barFill { to { transform: scaleX(1); } }

.qs-ctrls { display: flex; align-items: center; gap: .5rem; margin-top: 1rem; flex-wrap: wrap; }
.qs-btn { width: 2.75rem; height: 2.75rem; display: inline-grid; place-items: center; border-radius: 50%; border: 0; cursor: pointer; color: var(--chalk); background: transparent; box-shadow: 0 0 0 1px var(--gold-line) inset; transition: background .2s ease, transform .2s ease; }
.qs-btn:hover { background: rgba(232,185,111,.1); transform: translateY(-1px); }
.qs-btn svg { width: 1.15rem; height: 1.15rem; }
.qs-count { font-family: var(--ui); font-size: .8125rem; color: var(--mist); margin-left: .4rem; min-width: 3.2rem; }
.qs-share { margin-left: auto; display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: 0 1.1rem; border: 0; border-radius: 999px; cursor: pointer; font-family: var(--ui); font-size: .8125rem; font-weight: 500; color: var(--chalk); background: transparent; box-shadow: 0 0 0 1px var(--gold-line) inset; transition: background .2s ease; }
.qs-share:hover { background: rgba(232,185,111,.1); }
.qs-share svg { width: 1rem; height: 1rem; }

/* ---------- Quiz ---------- */
.play-teasers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.play-teaser { --accent: var(--gold); position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .55rem; padding: 1.6rem 1.5rem 1.4rem; border-radius: 1rem; text-decoration: none; color: var(--chalk); background: linear-gradient(160deg, #10243a, #0a1726); box-shadow: 0 0 0 1px var(--rule) inset; transition: transform .3s ease, box-shadow .3s ease; }
.play-teaser::after { content: ""; position: absolute; width: 12rem; height: 12rem; right: -4rem; top: -5rem; border-radius: 50%; background: var(--accent); opacity: .16; filter: blur(30px); transition: opacity .3s ease, transform .5s ease; }
.play-teaser:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--accent) inset, 0 24px 40px -24px rgba(0,0,0,.9); }
.play-teaser:hover::after { opacity: .3; transform: scale(1.2); }
.play-teaser .pt-kicker { font-family: var(--ui); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.play-teaser strong { font-size: 1.35rem; line-height: 1.25; font-weight: 600; }
.play-teaser .pt-meta { font-family: var(--ui); font-size: .8125rem; color: var(--mist); margin-top: auto; padding-top: .6rem; }
.play-teaser .pt-go { font-family: var(--ui); font-size: .875rem; font-weight: 500; color: var(--accent); }
@media (max-width: 52rem) { .play-teasers { grid-template-columns: 1fr; } }

.qz { --accent: var(--gold); }
.qz-card { position: relative; border-radius: 1.25rem; padding: clamp(1.4rem, 4vw, 2.4rem); background: linear-gradient(160deg, #10243a, #0a1726); box-shadow: 0 0 0 1px var(--rule) inset, 0 30px 60px -40px rgba(0,0,0,.9); }
.qz-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(30rem 14rem at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); }
.qz-card.is-in > * { animation: qzIn .5s cubic-bezier(.2,.7,.2,1) both; }
@keyframes qzIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.qz-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-family: var(--ui); font-size: .8125rem; color: var(--mist); margin-bottom: 1rem; }
.qz-dots { display: flex; gap: .35rem; }
.qz-dots span { width: .55rem; height: .55rem; border-radius: 50%; background: var(--rule); transition: background .3s ease, transform .3s ease; }
.qz-dots .done { background: var(--accent); }
.qz-dots .now { background: var(--accent); transform: scale(1.35); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.qz-q { font-size: clamp(1.3rem, 2.6vw, 1.7rem); line-height: 1.3; font-weight: 600; outline: none; margin-bottom: 1.4rem; text-wrap: balance; }
.qz-opts { display: grid; gap: .65rem; }
.qz-opt { position: relative; display: flex; align-items: center; gap: .9rem; width: 100%; min-height: 3.4rem; padding: .7rem 1rem; text-align: left; cursor: pointer; border: 0; border-radius: .8rem; font-family: var(--ui); font-size: .9375rem; line-height: 1.4; color: var(--chalk); background: rgba(255,255,255,.035); box-shadow: 0 0 0 1px var(--rule) inset; transition: background .2s ease, box-shadow .2s ease, transform .2s ease; }
.qz-card.is-in .qz-opt { animation: qzIn .45s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--n) * 70ms + 120ms); }
.qz-opt:hover:not(:disabled) { transform: translateX(4px); box-shadow: 0 0 0 1px var(--accent) inset; background: color-mix(in srgb, var(--accent) 8%, transparent); }
.qz-opt:disabled { cursor: default; }
.qz-key { flex: none; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: .5rem; font-size: .8125rem; font-weight: 500; color: var(--accent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent) inset; transition: background .2s ease, color .2s ease; }
.qz-opt.picked { box-shadow: 0 0 0 2px var(--accent) inset; background: color-mix(in srgb, var(--accent) 14%, transparent); animation: pop .35s ease; }
.qz-opt.picked .qz-key { background: var(--accent); color: var(--night); }
.qz-opt.right { box-shadow: 0 0 0 2px #7fcf9b inset; background: rgba(127,207,155,.12); }
.qz-opt.right .qz-key { background: #7fcf9b; color: var(--night); box-shadow: none; }
.qz-opt.wrong { box-shadow: 0 0 0 2px #e07a6a inset; background: rgba(224,122,106,.1); animation: shake .4s ease; }
.qz-opt.wrong .qz-key { background: #e07a6a; color: var(--night); box-shadow: none; }
@keyframes pop { 50% { transform: scale(1.02); } }
@keyframes shake { 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.qz-why { margin-top: 1.2rem; display: grid; gap: 1rem; justify-items: start; animation: qzIn .4s ease both; }
.qz-why p { font-size: 1rem; line-height: 1.6; color: var(--chalk); max-width: 34rem; }
.qz-why strong { color: var(--accent); font-family: var(--ui); font-weight: 500; }
.qz-next { border: 0; cursor: pointer; }

.qz-result { text-align: center; padding: .6rem 0 .2rem; }
.qz-you { font-family: var(--ui); font-size: .8125rem; letter-spacing: .16em; text-transform: uppercase; color: var(--mist); }
.qz-title { position: relative; display: inline-block; margin: .5rem 0 .9rem; font-size: clamp(2rem, 5vw, 3rem); font-style: italic; line-height: 1.1; color: var(--accent); outline: none; }
.qz-desc { margin: 0 auto; max-width: 30rem; font-size: 1.0625rem; }
.qz-tip { margin: 1rem auto 0; max-width: 30rem; font-family: var(--ui); font-size: .9375rem; color: var(--chalk); padding: .8rem 1rem; border-radius: .7rem; background: rgba(255,255,255,.04); box-shadow: 0 0 0 1px var(--rule) inset; }
.qz-score { margin-top: .9rem; font-family: var(--ui); font-size: .8125rem; color: var(--mist); }
.qz-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin-top: 1.5rem; }
.qz-row { display: flex; justify-content: center; gap: 1.4rem; margin-top: 1.1rem; }
.qz-again, .qz-share { border: 0; background: none; cursor: pointer; font-family: var(--ui); font-size: .875rem; color: var(--mist); text-decoration: underline; text-underline-offset: 3px; min-height: 2.75rem; }
.qz-again:hover, .qz-share:hover { color: var(--chalk); }

.qz-burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; z-index: 5; }
.qz-burst span { position: absolute; left: -.6rem; top: -.6rem; width: 1.2rem; height: 1.2rem; animation: burst 1.3s cubic-bezier(.15,.7,.3,1) forwards; }
.qz-burst svg { width: 100%; height: 100%; display: block; }
@keyframes burst {
  0% { transform: translate(0,0) scale(.3) rotate(0); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(var(--x), var(--y)) scale(1) rotate(var(--r)); opacity: 0; }
}

@media (max-width: 40rem) {
  .qs-share span { display: none; }
  .qs-share { width: 2.75rem; padding: 0; justify-content: center; }
  .qz-actions .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .qs-orb, .qs-float, .qs-bar span { animation: none !important; }
  .qs-stage.is-in .qs-quote .w, .qs-stage.is-in .qs-cite, .qz-card.is-in > *, .qz-card.is-in .qz-opt, .qz-opt.picked, .qz-opt.wrong, .qz-why { animation: none !important; }
  .qz-opt, .play-teaser, .qs-btn { transition: none; }
}

/* ---------- Watch: short films ---------- */
.reel-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.4vw, 1.75rem); }
.reel { margin: 0; display: grid; gap: .8rem; }
.reel-frame { position: relative; aspect-ratio: 9 / 16; max-width: 100%; border-radius: 1.25rem; overflow: hidden; background: #08121e; box-shadow: 0 0 0 1px var(--rule), 0 30px 60px -36px rgba(0,0,0,.9); }
.reel-frame video, .reel-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.reel-btn { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: .45rem; border: 0; cursor: pointer; font-family: var(--ui); font-size: .8125rem; font-weight: 500; color: #fff; background: rgba(8,18,30,.62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 999px; min-height: 2.75rem; padding: 0 1rem; box-shadow: 0 0 0 1px rgba(255,255,255,.2) inset; transition: background .2s ease, transform .2s ease; }
.reel-btn:hover { background: rgba(8,18,30,.8); transform: translateY(-1px); }
.reel-btn svg { width: 1.1rem; height: 1.1rem; }
.reel-sound { right: .8rem; bottom: .8rem; }
.reel-sound[aria-pressed="true"] { background: var(--gold); color: var(--night); box-shadow: none; }
.reel-play { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 4.2rem; height: 4.2rem; padding: 0; justify-content: center; }
.reel-play:hover { transform: translate(-50%, calc(-50% - 1px)); }
.reel.is-playing .reel-play { display: none; }
.reel figcaption { font-family: var(--ui); font-size: .875rem; line-height: 1.5; color: var(--mist); }
.reel figcaption b { display: block; color: var(--chalk); font-weight: 500; font-size: .9375rem; }
@media (max-width: 52rem) {
  .reel-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(72%, 18rem); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .6rem; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .reel { scroll-snap-align: start; }
}
