:root {
  --bg: #100e0c;
  --raise: #1b1814;
  --choice: #262119;
  --line: rgba(240, 214, 170, 0.16);
  --text: #f6f1e7;
  --muted: #cfc6b6;
  --amber: #f0a202;
  --amber-2: #ffd27a;
  --ink: #1a140c;
  --good: #b7e4c7;
  --good-bg: rgba(90, 158, 122, 0.2);
  --bad: #ffc2b3;
  --bad-bg: rgba(196, 84, 58, 0.22);
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
  --sans: "Barlow", "Segoe UI", sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.5;
  background:
    radial-gradient(ellipse 90% 45% at 50% -8%, rgba(240, 162, 2, 0.2), transparent 58%),
    radial-gradient(ellipse 42% 32% at 100% 100%, rgba(176, 72, 36, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 18%),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: auto 0 0;
  height: 72px;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 28px,
      rgba(246, 241, 231, 0.14) 28px 46px,
      transparent 46px 78px
    );
  mask-image: linear-gradient(180deg, transparent, #000 40%);
}

.wrap {
  width: min(740px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 64px;
}

.mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 22px;
}

.lang-switch {
  display: flex;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.lang-switch button {
  appearance: none;
  background: transparent;
  color: var(--muted);
  border: 0;
  cursor: pointer;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.8rem;
}

.lang-switch button[aria-pressed="true"] {
  background: var(--amber);
  color: var(--ink);
}

.lang-switch button:focus-visible {
  outline: 2px solid var(--amber-2);
  outline-offset: 2px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mark {
  width: 52px;
  height: 52px;
  color: var(--amber-2);
  flex: none;
}

.brand-kicker,
.eyebrow,
.count,
.key-hint,
footer {
  color: var(--muted);
}

.brand-kicker,
.eyebrow {
  margin: 0;
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-name {
  margin: 0;
  font-family: var(--display);
  font-size: 1.45rem;
  letter-spacing: 0.02em;
  line-height: 1;
}

.panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 28%),
    var(--raise);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 32px 28px 28px;
}

.panel[hidden] {
  display: none;
}

h1,
h2,
h3,
.rank,
.score-line {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

h1 {
  margin: 8px 0 12px;
  font-size: clamp(4rem, 12vw, 6.4rem);
  line-height: 0.84;
}

#hero-accent {
  color: var(--amber);
}

h2 {
  margin: 18px 0 16px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.05;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

h3 {
  margin: 8px 0 10px;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
}

.lede {
  margin: 0 0 18px;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.facts li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--muted);
}

.facts strong {
  color: var(--text);
  font-weight: 600;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--amber);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.8rem 1.35rem;
}

.btn:hover {
  background: var(--amber-2);
}

.btn:focus-visible,
.choice:focus-visible {
  outline: 2px solid var(--amber-2);
  outline-offset: 3px;
}

.key-hint {
  margin: 14px 0 0;
  font-size: 0.92rem;
}

.quiz-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.chip {
  display: inline-block;
  background: var(--amber);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.count {
  font-family: var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.progress {
  margin-top: 14px;
  height: 6px;
  border-radius: 999px;
  background: rgba(246, 241, 231, 0.08);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--amber), var(--amber-2));
  transition: width 0.25s ease;
}

.choices {
  display: grid;
  gap: 10px;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  color: var(--text);
  background: var(--choice);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 14px;
  font: inherit;
  cursor: pointer;
}

.choice:hover:not(:disabled) {
  border-color: rgba(240, 162, 2, 0.7);
  background: rgba(240, 162, 2, 0.08);
}

.choice:disabled {
  cursor: default;
}

.letter {
  flex: none;
  width: 1.6rem;
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--amber-2);
  line-height: 1.2;
}

.choice.is-correct {
  background: var(--good-bg);
  border-color: rgba(183, 228, 199, 0.7);
}

.choice.is-correct .letter {
  color: var(--good);
}

.choice.is-wrong {
  background: var(--bad-bg);
  border-color: rgba(255, 194, 179, 0.7);
}

.choice.is-wrong .letter {
  color: var(--bad);
}

.feedback {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.feedback p {
  margin: 0 0 14px;
}

.rank {
  margin: 6px 0 0;
  font-size: clamp(3rem, 10vw, 4.6rem);
  line-height: 0.9;
  color: var(--amber);
}

.score-line {
  margin: 10px 0 8px;
  font-size: 1.8rem;
}

.score-line span {
  color: var(--muted);
}

#review {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  max-height: 280px;
  overflow: auto;
}

#review li {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

#review p {
  margin: 0;
}

#review .q {
  font-weight: 600;
}

#review .a {
  margin-top: 4px;
  color: var(--muted);
}

footer {
  margin-top: 18px;
  font-size: 0.92rem;
}

footer p {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.noscript {
  width: min(740px, calc(100% - 32px));
  margin: 16px auto;
  padding: 12px 14px;
  background: var(--raise);
  border-radius: 12px;
}

@media (max-width: 640px) {
  .wrap {
    width: min(740px, calc(100% - 20px));
    padding-top: 22px;
  }

  .mast {
    flex-wrap: wrap;
    gap: 12px;
  }

  .brand {
    flex: 1;
    min-width: 200px;
  }

  .panel {
    padding: 24px 16px 18px;
    border-radius: 18px;
  }

  .key-hint {
    display: none;
  }

  .brand-name {
    font-size: 1.2rem;
  }

  .choice {
    padding: 16px 14px;
    gap: 16px;
  }

  .btn {
    padding: 1rem 1.5rem;
    font-size: 1.35rem;
  }
}

@media (max-width: 480px) {
  .panel {
    padding: 20px 14px 14px;
  }
}

@media (max-width: 360px) {
  h1 {
    font-size: clamp(2.8rem, 10vw, 5rem);
  }

  .brand-name {
    font-size: 1rem;
  }
}

@media (min-width: 1200px) {
  .wrap {
    width: min(840px, calc(100% - 48px));
    padding: 48px 0 80px;
  }

  .choices {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .btn:focus-visible,
  .choice:focus-visible {
    outline-width: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .progress span {
    transition: none;
  }
}
