/* F1 Experiences — entry fan quiz (start-light board) */

.qz{
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(3, 6, 9, .84);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden;
  transition: opacity .4s var(--ease-luxe), visibility .4s;
}
.qz.is-on{ opacity: 1; visibility: visible; }
.qz__panel:focus{ outline: none; }
.qz__panel{
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100svh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: linear-gradient(168deg, #0b1219 0%, #080d13 56%, #05090d 100%);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 48px 120px rgba(0, 0, 0, .78), 0 0 0 1px rgba(198, 161, 91, .1) inset;
  transform: translateY(26px) scale(.986);
  transition: transform .55s var(--ease-luxe);
}
.qz.is-on .qz__panel{ transform: none; }
/* carbon weave + a soft gold bloom, kept well under the copy */
.qz__panel::before{
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(120% 60% at 88% -10%, rgba(198, 161, 91, .16), transparent 62%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .022) 0 1px, transparent 1px 9px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .35) 42%, transparent 78%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .35) 42%, transparent 78%);
}
.qz__panel > *{ position: relative; }

/* chequered flag rail */
.qz__flag{
  height: 8px;
  background: repeating-conic-gradient(#efe9dc 0 25%, #0b0e12 0 50%) 0 0 / 8px 8px;
  opacity: .92;
}
.qz__top{
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px 0;
}
.qz__brand{
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase;
  color: rgba(255, 255, 255, .78);
}
.qz__brand i{
  width: 5px; height: 5px; display: block; transform: rotate(45deg);
  background: var(--color-gold);
}
.qz__step{
  margin-left: auto;
  font-size: 10px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--color-goldlight);
}
.qz__close{
  width: 34px; height: 34px; flex: 0 0 34px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid rgba(255, 255, 255, .16);
  color: rgba(255, 255, 255, .62); font-size: 17px; line-height: 1;
  cursor: pointer; transition: color .3s, border-color .3s;
}
.qz__close:hover{ color: var(--color-gold); border-color: rgba(198, 161, 91, .5); }
.qz__close:focus-visible{ outline: 2px solid var(--color-gold); outline-offset: 2px; }

/* five start lights, mounted on a gantry bar */
.qz__lights{
  display: flex; justify-content: center; gap: 12px;
  width: max-content;
  margin: 18px auto 4px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(180deg, #121a22 0%, #0a1017 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 10px 30px rgba(0, 0, 0, .45);
}
.qz__lamp{
  width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #702626 0%, #3b1414 64%, #220c0c 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 90, 90, .28), inset 0 -2px 3px rgba(0, 0, 0, .55), 0 0 0 3px rgba(0, 0, 0, .38);
}
.qz.is-on .qz__lamp{ animation: qz-lamp .46s ease forwards; }
.qz.is-on .qz__lamp:nth-child(1){ animation-delay: .06s; }
.qz.is-on .qz__lamp:nth-child(2){ animation-delay: .16s; }
.qz.is-on .qz__lamp:nth-child(3){ animation-delay: .26s; }
.qz.is-on .qz__lamp:nth-child(4){ animation-delay: .36s; }
.qz.is-on .qz__lamp:nth-child(5){ animation-delay: .46s; }
@keyframes qz-lamp{
  0%{ background: #3b1414; box-shadow: inset 0 0 0 1px rgba(255, 90, 90, .28), inset 0 -2px 3px rgba(0, 0, 0, .55), 0 0 0 3px rgba(0, 0, 0, .38); }
  45%{ background: #ff3030; box-shadow: 0 0 16px 3px rgba(255, 48, 48, .72), inset 0 0 0 1px rgba(255, 255, 255, .35), 0 0 0 3px rgba(0, 0, 0, .38); }
  100%{ background: #3b1414; box-shadow: inset 0 0 0 1px rgba(255, 90, 90, .28), inset 0 -2px 3px rgba(0, 0, 0, .55), 0 0 0 3px rgba(0, 0, 0, .38); }
}

.qz__body{ padding: 14px 20px 4px; }
.qz__kicker{
  font-size: 10px; letter-spacing: .34em; text-transform: uppercase;
  color: var(--color-gold);
}
.qz__q{
  margin-top: 12px;
  font-size: clamp(22px, 4.4vw, 30px);
  font-weight: 300; line-height: 1.18; letter-spacing: -.01em;
  color: #fff;
}
.qz__hint{
  margin-top: 10px; font-size: 12.5px; line-height: 1.6;
  color: rgba(255, 255, 255, .5);
}

/* team grid */
.qz__teams{
  display: grid; gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
}
.qz-team{
  position: relative;
  display: flex; align-items: center; gap: 11px;
  min-height: 52px; padding: 8px 12px 8px 15px;
  text-align: left;
  background: rgba(255, 255, 255, .025);
  border: 1px solid rgba(255, 255, 255, .1);
  color: #fff; font-family: inherit;
  cursor: pointer;
  transition: background .28s, border-color .28s, transform .28s var(--ease-luxe);
}
.qz-team::before{
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--team, #666);
  opacity: .85;
}
.qz-team:hover{ background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .22); }
.qz-team[aria-pressed="true"]{
  background: rgba(198, 161, 91, .12);
  border-color: rgba(198, 161, 91, .62);
  box-shadow: inset 0 0 0 1px rgba(198, 161, 91, .18);
}
.qz-team:focus-visible{ outline: 2px solid var(--color-gold); outline-offset: 2px; }
.qz-team__t{ min-width: 0; }
.qz-team__n{
  display: block;
  font-size: 13px; font-weight: 500; letter-spacing: .05em; line-height: 1.25;
}
.qz-team__c{
  display: block; margin-top: 3px;
  font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255, 255, 255, .42);
}
.qz-team[aria-pressed="true"] .qz-team__c{ color: rgba(226, 200, 147, .8); }
.qz-team__dot{
  width: 9px; height: 9px; border-radius: 50%; margin-left: auto; flex: 0 0 9px;
  background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3);
  transition: background .28s, box-shadow .28s;
}
.qz-team[aria-pressed="true"] .qz-team__dot{
  background: var(--team, #c6a15b);
  box-shadow: 0 0 10px 1px color-mix(in srgb, var(--team, #c6a15b) 60%, transparent);
}

/* circuit picks */
.qz__picks{
  display: grid; gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
}
.qz-pick{
  position: relative;
  display: flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 8px 12px;
  background: rgba(255, 255, 255, .025);
  border: 1px solid rgba(255, 255, 255, .1);
  cursor: pointer;
  transition: background .28s, border-color .28s;
}
.qz-pick:hover{ background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .2); }
.qz-pick input{
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0;
  pointer-events: none;
}
.qz-pick__box{
  width: 15px; height: 15px; flex: 0 0 15px;
  border: 1px solid rgba(255, 255, 255, .32);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .25s, border-color .25s;
}
.qz-pick__box::after{
  content: ""; width: 7px; height: 4px;
  border-left: 1.5px solid #05090d; border-bottom: 1.5px solid #05090d;
  transform: rotate(-45deg) scale(.4); opacity: 0;
  transition: opacity .2s, transform .2s;
}
.qz-pick input:checked + .qz-pick__box{ background: var(--color-gold); border-color: var(--color-gold); }
.qz-pick input:checked + .qz-pick__box::after{ opacity: 1; transform: rotate(-45deg) scale(1); }
.qz-pick input:focus-visible + .qz-pick__box{ outline: 2px solid var(--color-gold); outline-offset: 3px; }
.qz-pick:has(input:checked){ background: rgba(198, 161, 91, .1); border-color: rgba(198, 161, 91, .55); }
.qz-pick__t{ min-width: 0; }
.qz-pick__n{ display: block; font-size: 12.5px; letter-spacing: .03em; color: #fff; }
.qz-pick__c{ display: block; margin-top: 2px; font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .4); }
.qz-pick--wide{ grid-column: 1 / -1; }
.qz-pick--wide .qz-pick__n{ color: var(--color-goldlight); }

/* footer / pager */
.qz__foot{
  display: flex; align-items: center; gap: 12px;
  padding: 20px 20px 22px;
}
.qz__dots{ display: flex; gap: 6px; margin-right: auto; }
.qz__dot{ display: block; width: 26px; height: 2px; background: rgba(255, 255, 255, .16); transition: background .3s; }
.qz__dot.is-on{ background: var(--color-gold); }
.qz-btn{
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 22px;
  font-family: inherit; font-size: 10.5px; font-weight: 500;
  letter-spacing: .26em; text-transform: uppercase;
  cursor: pointer; border: 1px solid transparent;
  transition: background .3s, color .3s, border-color .3s, opacity .3s;
}
.qz-btn--ghost{ background: transparent; border-color: rgba(255, 255, 255, .18); color: rgba(255, 255, 255, .78); }
.qz-btn--ghost:hover{ border-color: rgba(198, 161, 91, .55); color: var(--color-gold); }
.qz-btn--gold{ background: var(--color-gold); color: #05090d; }
.qz-btn--gold:hover{ background: var(--color-goldlight); }
.qz-btn:disabled{ opacity: .32; cursor: not-allowed; }
.qz-btn:focus-visible{ outline: 2px solid var(--color-goldlight); outline-offset: 2px; }

/* result */
.qz-result{ padding-top: 4px; }
.qz-result__team{
  display: flex; align-items: center; gap: 14px;
  margin-top: 18px; padding: 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .03);
}
.qz-result__swatch{
  width: 6px; align-self: stretch; flex: 0 0 6px;
  background: var(--team, #c6a15b);
}
.qz-result__team > span:last-child{ min-width: 0; }
.qz-result__name{ display: block; font-size: 17px; font-weight: 500; letter-spacing: .04em; color: #fff; }
.qz-result__meta{ display: block; margin-top: 5px; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: rgba(255, 255, 255, .44); }
.qz-result__tracks{
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 16px;
}
.qz-result__chip{
  padding: 6px 9px;
  font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(226, 200, 147, .9);
  border: 1px solid rgba(198, 161, 91, .32);
  background: rgba(198, 161, 91, .07);
}
.qz-result__next{
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 12px; line-height: 1.65; color: rgba(255, 255, 255, .6);
}
.qz-result__next b{ font-weight: 500; color: #fff; }
.qz-result .qz-btn{ margin-top: 20px; width: 100%; }

.qz__note{
  padding: 4px 20px 18px;
  font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255, 255, 255, .3);
}
body.qz-open{ overflow: hidden; }

@media (min-width: 48rem){
  .qz__top{ padding: 20px 28px 0; }
  .qz__body{ padding: 16px 28px 6px; }
  .qz__foot{ padding: 22px 28px 26px; }
  .qz__note{ padding: 0 28px 20px; }
  .qz__teams{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .qz__picks{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 47.99rem){
  /* keep the pager reachable without hunting for it on a phone */
  .qz__foot{
    position: sticky; bottom: 0; z-index: 2;
    border-top: 1px solid rgba(255, 255, 255, .1);
    background: linear-gradient(to top, #080d13 60%, rgba(8, 13, 19, .92));
  }
  .qz__note{ display: none; }
}
@media (max-width: 26rem){
  .qz{ padding: 0; align-items: flex-end; }
  .qz__panel{ width: 100%; max-height: 96svh; border-left: 0; border-right: 0; border-bottom: 0; }
  .qz__teams, .qz__picks{ gap: 6px; }
  .qz-team{ min-height: 48px; padding: 7px 9px 7px 12px; gap: 8px; }
  .qz-team__n{ font-size: 12px; }
  .qz-team__c{ display: none; }
  .qz__body{ padding: 12px 14px 4px; }
  .qz__top{ padding: 14px 14px 0; }
  .qz__foot{ padding: 14px; }
  .qz__q{ font-size: 21px; }
  .qz-btn{ padding: 0 16px; letter-spacing: .18em; }
  .qz__close{ width: 38px; height: 38px; flex-basis: 38px; }
  .qz__lights{ margin-top: 12px; }
}
@media (max-width: 47.99rem){
  .qz__foot{ padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce){
  .qz, .qz__panel, .qz-team, .qz-pick{ transition: none; }
  .qz.is-on .qz__lamp{ animation: none; }
}
