.tfl-kviz {
  --tfl-kviz-bg: #f7f8fb;
  --tfl-kviz-card: #ffffff;
  --tfl-kviz-text: #172033;
  --tfl-kviz-muted: #5f6b7a;
  --tfl-kviz-line: #dfe5ee;
  --tfl-kviz-primary: #1a56db;
  --tfl-kviz-primary-dark: #113f9f;
  --tfl-kviz-good: #147a3d;
  --tfl-kviz-good-bg: #e9f8ef;
  --tfl-kviz-bad: #b42318;
  --tfl-kviz-bad-bg: #fff0ee;
  font-family: inherit;
  color: var(--tfl-kviz-text);
  width: 100%;
}

.tfl-kviz * {
  box-sizing: border-box;
}

.tfl-kviz__shell {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 34px);
  border: 1px solid var(--tfl-kviz-line);
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff 0%, var(--tfl-kviz-bg) 100%);
  box-shadow: 0 18px 50px rgba(18, 30, 55, 0.10);
}

.tfl-kviz__hero,
.tfl-kviz__final {
  text-align: center;
  padding: clamp(18px, 5vw, 54px) clamp(8px, 3vw, 30px);
}

.tfl-kviz__eyebrow {
  margin: 0 0 10px;
  color: var(--tfl-kviz-primary);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tfl-kviz__title {
  margin: 0 0 14px;
  font-size: clamp(2rem, 6vw, 4.25rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.tfl-kviz__intro,
.tfl-kviz__best {
  max-width: 620px;
  margin: 0 auto 24px;
  color: var(--tfl-kviz-muted);
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.55;
}

.tfl-kviz__primary,
.tfl-kviz__answer {
  appearance: none;
  border: 0;
  border-radius: 18px;
  font: inherit;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.tfl-kviz__primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 22px;
  color: #ffffff;
  background: var(--tfl-kviz-primary);
  font-weight: 800;
  box-shadow: 0 12px 22px rgba(26, 86, 219, 0.24);
}

.tfl-kviz__primary:hover,
.tfl-kviz__primary:focus-visible {
  background: var(--tfl-kviz-primary-dark);
  transform: translateY(-1px);
}

.tfl-kviz__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  color: var(--tfl-kviz-muted);
  font-size: 0.96rem;
  font-weight: 700;
}

.tfl-kviz__bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ecf5;
  margin-bottom: 18px;
}

.tfl-kviz__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--tfl-kviz-primary);
  transition: width 220ms ease;
}

.tfl-kviz__card {
  padding: clamp(18px, 4vw, 34px);
  border: 1px solid var(--tfl-kviz-line);
  border-radius: 24px;
  background: var(--tfl-kviz-card);
}

.tfl-kviz__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tfl-kviz__meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef3ff;
  color: var(--tfl-kviz-primary-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.tfl-kviz__question {
  margin: 0 0 22px;
  font-size: clamp(1.35rem, 3vw, 2.25rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.tfl-kviz__answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tfl-kviz__answer {
  min-height: 58px;
  padding: 15px 16px;
  border: 1px solid var(--tfl-kviz-line);
  background: #ffffff;
  color: var(--tfl-kviz-text);
  text-align: left;
  font-weight: 750;
  line-height: 1.25;
}

.tfl-kviz__answer:hover,
.tfl-kviz__answer:focus-visible {
  border-color: var(--tfl-kviz-primary);
  box-shadow: 0 10px 18px rgba(18, 30, 55, 0.08);
  transform: translateY(-1px);
}

.tfl-kviz__answer:disabled {
  cursor: default;
  opacity: 1;
  transform: none;
}

.tfl-kviz__answer.is-correct {
  border-color: rgba(20, 122, 61, 0.45);
  background: var(--tfl-kviz-good-bg);
  color: var(--tfl-kviz-good);
}

.tfl-kviz__answer.is-wrong {
  border-color: rgba(180, 35, 24, 0.45);
  background: var(--tfl-kviz-bad-bg);
  color: var(--tfl-kviz-bad);
}

.tfl-kviz__feedback {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--tfl-kviz-line);
}

.tfl-kviz__result {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 7px 11px;
  border-radius: 999px;
  font-weight: 900;
}

.tfl-kviz__result.is-correct {
  background: var(--tfl-kviz-good-bg);
  color: var(--tfl-kviz-good);
}

.tfl-kviz__result.is-wrong {
  background: var(--tfl-kviz-bad-bg);
  color: var(--tfl-kviz-bad);
}

.tfl-kviz__explanation,
.tfl-kviz__source {
  margin: 0 0 16px;
  color: var(--tfl-kviz-muted);
  line-height: 1.55;
}

.tfl-kviz__empty,
.tfl-kviz__loading {
  margin: 0;
  color: var(--tfl-kviz-muted);
  text-align: center;
  font-weight: 700;
}

@media (max-width: 680px) {
  .tfl-kviz__shell {
    border-radius: 22px;
    padding: 16px;
  }

  .tfl-kviz__top {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .tfl-kviz__answers {
    grid-template-columns: 1fr;
  }

  .tfl-kviz__card {
    padding: 18px;
    border-radius: 20px;
  }

  .tfl-kviz__answer {
    min-height: 54px;
  }
}

/* Aggressive reset: answer buttons must keep the capitalization stored in JSON.
   Some themes globally force button text to uppercase/title-case; these rules override that. */
.tfl-kviz .tfl-kviz__answer,
.tfl-kviz .tfl-kviz__answer *,
.tfl-kviz button.tfl-kviz__answer,
.tfl-kviz [type="button"].tfl-kviz__answer {
  text-transform: none !important;
  font-variant: normal !important;
  font-variant-caps: normal !important;
  letter-spacing: normal !important;
}

/* Version 1.1.3: stronger answer capitalization lock. */
.tfl-kviz.tfl-kviz .tfl-kviz__answers button.tfl-kviz__answer,
.tfl-kviz.tfl-kviz .tfl-kviz__answers .tfl-kviz__answer,
body .tfl-kviz .tfl-kviz__answers button.tfl-kviz__answer {
  text-transform: none !important;
  font-variant: normal !important;
  font-variant-caps: normal !important;
  letter-spacing: normal !important;
}
