:root {
  color-scheme: dark;
  --navy: #051448;
  --panel: rgb(2 22 87 / 60%);
  --border: rgb(239 244 255 / 53%);
  --gold: #c59b56;
  --teal: #0072a0;
  --english: Calibri, Carlito, Arial, sans-serif;
  --arabic: Tahoma, Arial, sans-serif;
  font-family: var(--english);
  background: var(--navy);
  color: #fff;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: wait; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
[lang="ar"] { font-family: var(--arabic); }
[lang="en"] { font-family: var(--english); }
button:focus-visible, a:focus-visible { outline: 3px solid #fff1ce; outline-offset: 4px; }
h1:focus, h2:focus { outline: none; }

.experience {
  width: min(100%, 29rem);
  min-height: 100svh;
  margin-inline: auto;
  padding: max(2.4rem, env(safe-area-inset-top)) 0 max(2.9rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, #021759 0%, rgb(0 5 18 / 0%) 100%),
    var(--navy) url("/assets/background.webp") center / cover no-repeat;
}
.brand { display: grid; place-items: center; }
.brand img { width: min(57.8%, 14.2rem); height: auto; display: block; }
.experience[data-screen="welcome"] { padding-top: max(4.25rem, env(safe-area-inset-top)); }
[data-screen="welcome"] .brand img { width: min(71%, 17.45rem); }
#screen { width: min(82%, 22rem); margin-inline: auto; flex: 1; }
[data-screen="welcome"] #screen { width: 90%; }
[data-screen="language"] #screen,
[data-screen="submit"] #screen { display: grid; align-items: center; }
[data-screen="instructions"] #screen { display: grid; align-items: center; padding-top: 2.4rem; }
[data-screen="quiz"] #screen { padding-top: clamp(2rem, 7.4svh, 4rem); }
[data-screen="result"] #screen { padding-top: clamp(1.8rem, 6.2svh, 3.3rem); }
.campaign { margin: 0; text-align: center; font-weight: 800; line-height: 1.04; }
.campaign span { display: block; }
.campaign span + span { margin-top: .5em; text-transform: uppercase; }
footer.campaign { flex: none; padding: 2.25rem .75rem .55rem; font-size: 1rem; }
.welcome { display: grid; justify-items: center; padding-top: clamp(3.1rem, 11svh, 6rem); }
.welcome .campaign { font-size: clamp(1.2rem, 5.9vw, 1.55rem); }
.welcome-button { margin-top: clamp(3.3rem, 12svh, 6.4rem); text-transform: uppercase; }
.pill, .panel, .answer, .code-card {
  color: #fff;
  background: var(--panel);
  border: 1px solid var(--border);
}
.pill {
  min-height: 46px;
  width: min(100%, 10.55rem);
  border-radius: 999px;
  padding: .55rem 1rem;
  font-size: 1.125rem;
  font-weight: 700;
}
.welcome-button { width: min(100%, 12.45rem); min-height: 56px; }
@media (hover: hover) {
  .pill:hover, .answer:enabled:hover { background: rgb(10 49 125 / 88%); border-color: #eef4ff; }
}
.pill:active, .answer:enabled:active { background: #0b3f86; border-color: #fff; }
.panel { border-radius: 1rem; }
.language-panel { text-align: center; padding: 1.65rem 1rem 1.9rem; }
.language-panel h1 { font-size: 1.125rem; margin: 0 0 1.35rem; line-height: 1.35; }
.language-panel h1 span { display: block; }
.language-panel button { display: block; margin: .85rem auto 0; }
.instructions { text-align: center; }
.rules { margin: 0; padding: 1.45rem 1rem 1.45rem 2.4rem; text-align: start; line-height: 1.3; }
[dir="rtl"] .rules { padding: 1.45rem 2.4rem 1.45rem 1rem; }
.rules li + li { margin-top: .65rem; }
.instructions .pill { margin: clamp(1.65rem, 7svh, 3.75rem) auto 0; }
.progress { margin-bottom: clamp(1.05rem, 4svh, 2.8rem); }
.track {
  height: 17px;
  display: flex;
  border-radius: 999px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--border);
}
.track span { flex: none; border-radius: inherit; background: var(--gold); }
.track[data-step="1"] span { width: 20%; }
.track[data-step="2"] span { width: 40%; }
.track[data-step="3"] span { width: 60%; }
.track[data-step="4"] span { width: 80%; }
.track[data-step="5"] span { width: 100%; }
.counter {
  display: flex;
  justify-content: space-between;
  gap: .45rem;
  align-items: center;
  width: fit-content;
  margin: .55rem 0 0 auto;
  padding-inline-start: .65rem;
  border-radius: 999px;
  background: var(--teal);
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.25;
}
.counter span { display: grid; place-items: center; border-radius: 999px; min-width: 1.35rem; background: var(--gold); color: #061841; }
.question { margin: 0 .28rem 1.2rem; font-size: 1.125rem; line-height: 1.25; }
.answers { display: grid; gap: .65rem; }
.answer {
  display: flex;
  gap: .5rem;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: start;
  min-height: 3rem;
  padding: .65rem .8rem;
  line-height: 1.25;
  border-radius: .65rem;
}
.answer-correct, .answer-incorrect {
  background: var(--feedback-fill);
  border-color: var(--feedback-border);
  animation: answer-feedback 480ms ease-out;
}
.answer-correct { --feedback-fill: #12613e; --feedback-border: #a3efbd; }
.answer-incorrect { --feedback-fill: #8e2637; --feedback-border: #ffb5bd; }
.answer-mark { flex: none; font-size: 1.3rem; font-weight: 800; }
@keyframes answer-feedback {
  0% { box-shadow: 0 0 0 3px var(--feedback-border); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .answer-correct, .answer-incorrect { animation: none; }
}
.submit-panel { text-align: center; padding: 1.65rem 1rem 1.9rem; }
.submit-panel h1 { margin: 0 0 1.35rem; font-size: 1.25rem; line-height: 1.35; }
.result { text-align: center; }
.result-panel { border-radius: 1.5rem; padding: .9rem 1.65rem 1.55rem; }
.score-label { display: block; font-size: 1.7rem; font-weight: 700; }
.score-number { display: block; margin: .12rem auto 0; color: var(--gold); font-size: 2.5rem; line-height: 1.2; }
.result hr { width: 65%; border: 0; border-top: 1px solid var(--border); margin: .8rem auto 1.15rem; }
.result h1 { margin: 0 0 .5rem; color: var(--gold); font-size: 1.8rem; line-height: 1.2; }
.result p { line-height: 1.35; }
.result-message { margin: 0; font-weight: 700; }
.code-card { margin: .85rem auto 0; width: min(91%, 19rem); border-radius: .9rem; }
.code { display: block; border-radius: .8rem; background: var(--gold); color: #091a42; padding: .78rem .5rem; font-size: 2.2rem; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; user-select: all; }
.code-label { display: block; padding: .55rem .5rem; font-weight: 700; font-size: .925rem; }
.result .pill { margin: 3.2rem auto 0; width: min(91%, 19rem); min-height: 54px; font-size: 1.35rem; }
.notice { margin: .85rem 0 0; font-size: .9rem; color: #fff1ce; }
.error { margin: .8rem 0 0; color: #fff1ce; font-weight: 700; }
@media (min-width: 38rem) {
  body { background: radial-gradient(ellipse at top, #122864, #030b24 76%); }
  .experience { box-shadow: 0 0 3rem rgb(0 0 0 / 40%); }
}
@media (max-height: 720px) {
  .experience { padding-top: max(1.25rem, env(safe-area-inset-top)); padding-bottom: max(1.1rem, env(safe-area-inset-bottom)); }
  footer.campaign { padding-top: 1.4rem; }
  [data-screen="language"] #screen { padding-top: 1rem; }
}
