/* Twig component styles: colours come from tokens.css variables only. */

/* top bar (step or brand on the left, chip or chrono on the right) */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

/* button */
.btn {
  line-height: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  border: none;
  cursor: pointer;
  background: var(--coral);
  color: var(--white);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.01em;
  text-decoration: none;
  padding: 16px 20px;
  border-radius: var(--r-pill);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--grey);
}
.btn--light {
  background: var(--white);
  color: var(--ink);
}

/* card */
.card {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: 16px;
}

/* chips */
.seg {
  line-height: normal;
  border: 1px solid var(--grey);
  background: var(--white);
  border-radius: var(--r-pill);
  padding: 9px 14px;
  font-size: var(--fs-small);
  font-weight: 700;
  cursor: pointer;
}
.seg--on {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}
.ai-chip {
  line-height: normal;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--blue-tint);
  border: 1px solid var(--blue-line);
  color: var(--blue-deep);
  border-radius: var(--r-pill);
  padding: 8px 14px;
  font-size: var(--fs-small);
  font-weight: 700;
}
.ai-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
}
.eyebrow {
  line-height: normal;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--coral);
  background: var(--coral-tint);
  padding: 6px 12px;
  border-radius: var(--r-pill);
}
.bonus-badge {
  line-height: normal;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--coral-tint);
  color: var(--coral-deep);
  border-radius: var(--r-pill);
  padding: 7px 13px;
  font-size: var(--fs-small);
  font-weight: 800;
}

/* chrono */
.chrono {
  line-height: normal;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-variant-numeric: tabular-nums;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  background: var(--grey-light);
  border: 1px solid var(--hairline);
  padding: 6px 13px;
  border-radius: var(--r-pill);
}
.chrono svg {
  color: var(--coral);
}
.chrono--alert {
  color: var(--coral-deep);
  border-color: var(--coral-tint);
  background: var(--coral-tint);
}

/* QCM choices */
.choices {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  text-align: left;
  line-height: normal;
  background: var(--white);
  border: 1px solid var(--grey);
  border-radius: 16px;
  padding: 14px 15px;
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.choice .key {
  width: 28px;
  height: 28px;
  border-radius: var(--r-squircle);
  background: var(--grey-light);
  border: 1px solid var(--hairline);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  flex: none;
}
.choice--selected {
  border-color: var(--ink);
  background: var(--surface-selected);
}
.choice--correct {
  border-color: var(--green);
  background: var(--green-tint);
  color: var(--green);
}
.choice--correct .key {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.choice--wrong {
  border-color: var(--coral);
  background: var(--coral-tint);
  color: var(--coral-deep);
}
.choice--wrong .key {
  background: var(--coral);
  color: var(--white);
  border-color: var(--coral);
}
.choice .mark {
  margin-left: auto;
  display: grid;
  place-items: center;
}
.img-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.img-choice {
  width: 100%;
  line-height: normal;
  border: 1px solid var(--grey);
  border-radius: 14px;
  padding: 14px 0;
  text-align: center;
  font-weight: 800;
  font-size: 20px;
  color: var(--ink);
  cursor: pointer;
  background: var(--white);
}
.img-choice img {
  display: block;
  width: 100%;
  height: auto;
}
.img-choice--selected {
  border-color: var(--ink);
  background: var(--surface-selected);
}
.img-choice--correct {
  border-color: var(--green);
  background: var(--green-tint);
  color: var(--green);
}
.img-choice--wrong {
  border-color: var(--coral);
  background: var(--coral-tint);
  color: var(--coral-deep);
}
.choice:disabled, .img-choice:disabled {
  cursor: default;
}

/* race vs agent */
.race {
  display: flex;
  flex-direction: column;
  gap: 8px;
  line-height: normal;
  background: var(--grey-light);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 12px 13px;
  margin-bottom: 18px;
}
.lane {
  display: flex;
  align-items: center;
  gap: 9px;
}
.lane .av {
  width: 22px;
  height: 22px;
  border-radius: var(--r-squircle);
  color: var(--white);
  font-size: 10px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex: none;
}
.lane .nm {
  font-size: var(--fs-small);
  font-weight: 800;
  width: 56px;
  flex: none;
}
.lane .bar {
  flex: 1;
  height: 6px;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.lane .bar > i {
  display: block;
  height: 100%;
  border-radius: var(--r-pill);
}
.lane .tm {
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  width: 42px;
  text-align: right;
  flex: none;
  color: var(--ink-muted);
}
.lane--player .av, .lane--player .bar > i {
  background: var(--coral);
}
.lane--agent .av, .lane--agent .bar > i {
  background: var(--blue);
}
.agent-line {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--blue);
  margin-top: 2px;
}
.race-note {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--coral);
  margin-top: 2px;
}
.agent-line .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  animation: blink 1s infinite;
}
@keyframes blink {
  50% { opacity: .25; }
}
@media (prefers-reduced-motion: reduce) {
  .agent-line .dot { animation: none; }
}

/* feedback */
.feedback {
  margin-top: 14px;
  line-height: normal;
  border-radius: 16px;
  padding: 14px 15px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.feedback--wrong {
  background: var(--coral-tint);
}
.feedback--ok {
  background: var(--green-tint);
}
.feedback .ic {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: var(--r-squircle);
  display: grid;
  place-items: center;
  color: var(--white);
}
.feedback--wrong .ic {
  background: var(--coral);
}
.feedback--ok .ic {
  background: var(--green);
}
.feedback h4 {
  margin: 0 0 3px;
  font-size: var(--fs-body);
  font-weight: 800;
}
.feedback--wrong h4 {
  color: var(--coral-deep);
}
.feedback--ok h4 {
  color: var(--green);
}
.feedback p {
  margin: 0;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--ink-muted);
}
