/* ══════════════════════════════════════════════════════════════
   GRAMMAR CONTRASTS — the "Enfoque gramatical" explanation card
   (Sandra, 2026-10-01)

   One card, used by every conjugation activity that offers a
   contrast pack (SER vs ESTAR, indicativo vs subjuntivo), so the
   rule reads the same in Modo misión, Contrarreloj, Completar,
   Relacionar, Modo examen and Práctica libre.

   Each card sets --cx to its pack colour; everything tints off it.
   No font declarations here: Lexend comes from the app shell and
   must not be tightened.
══════════════════════════════════════════════════════════════ */

.cx-card {
  --cx: var(--c-primary);
  margin: 14px 0 4px;
  padding: 16px 16px 14px;
  border: 2px solid color-mix(in srgb, var(--cx) 35%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--cx) 7%, var(--c-surface, #fff));
  text-align: left;
}
.cx-card-top {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 8px;
}
.cx-badge {
  background: var(--cx); color: #fff;
  padding: 3px 11px; border-radius: 99px;
  font-size: .7rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em;
}
.cx-title { font-weight: 800; font-size: 1.02rem; color: var(--cx); }
/* The tense, said plainly beside the title — both packs drill the present. */
.cx-tense {
  font-weight: 700; font-size: .78rem; color: var(--c-text-soft);
  border: 1px solid var(--c-border); border-radius: 99px; padding: 2px 9px;
}
.cx-lead {
  margin: 0 0 12px; font-size: .92rem; line-height: 1.55;
  color: var(--c-text);
}
.cx-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cx-col {
  background: var(--c-surface, #fff);
  border: 1px solid var(--c-border);
  border-top: 4px solid var(--cx);
  border-radius: 14px; padding: 10px 12px 8px;
}
.cx-col-head {
  font-weight: 800; font-size: .82rem; color: var(--cx);
  letter-spacing: .03em; margin-bottom: 7px;
}
.cx-list { list-style: none; margin: 0; padding: 0; }
.cx-list li {
  display: flex; flex-direction: column; gap: 1px;
  padding: 5px 0; border-top: 1px dashed var(--c-border);
}
.cx-list li:first-child { border-top: 0; padding-top: 0; }
.cx-case { font-size: .78rem; font-weight: 700; color: var(--c-text-soft); }
.cx-ex   { font-size: .88rem; line-height: 1.45; color: var(--c-text); }
.cx-tip {
  margin: 12px 0 0; padding: 9px 12px;
  background: color-mix(in srgb, var(--cx) 12%, transparent);
  border-radius: 12px;
  font-size: .85rem; line-height: 1.55; color: var(--c-text);
}

/* One-line reminder above the question while playing. */
.cx-hint {
  --cx: var(--c-primary);
  margin: 0 auto 14px; max-width: 560px;
  padding: 7px 14px; border-radius: 99px;
  background: color-mix(in srgb, var(--cx) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--cx) 30%, transparent);
  color: var(--c-text);
  font-size: .8rem; font-weight: 600; line-height: 1.4;
  text-align: center;
}

/* The rule behind a wrong answer, under the feedback line. */
.cx-why {
  margin: 6px auto 0; max-width: 560px;
  font-size: .84rem; font-weight: 600; line-height: 1.45;
  color: var(--c-text-soft); text-align: center;
}
.cx-why b { color: var(--c-text); }

/* Rules missed, on the results screen. */
.cx-missed {
  margin: 12px 0 0; padding: 10px 12px;
  background: var(--c-surface2, rgba(0,0,0,.03));
  border-radius: 12px; text-align: left;
}
.cx-missed-head {
  font-size: .78rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .05em; color: var(--c-text-soft); margin-bottom: 4px;
}
.cx-missed-body { font-size: .88rem; line-height: 1.5; color: var(--c-text); }

/* Phones: the two columns stack rather than squeezing the examples. */
@media (max-width: 560px) {
  .cx-cols { grid-template-columns: 1fr; gap: 10px; }
  .cx-card { padding: 14px 13px 12px; }
  .cx-title { font-size: .96rem; }
}

/* Older engines without color-mix still get a readable card. */
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .cx-card   { background: var(--c-surface, #fff); border-color: var(--c-border); }
  .cx-tip    { background: var(--c-surface2, rgba(0,0,0,.04)); }
  .cx-hint   { background: var(--c-surface2, rgba(0,0,0,.04)); border-color: var(--c-border); }
}

/* "NUEVO" tag on a mission tile (the two contrast missions). */
.mission-tile-new {
  display: inline-block; margin-left: 7px;
  background: var(--mission-color, var(--c-primary)); color: #fff;
  padding: 1px 7px; border-radius: 99px;
  font-size: .6rem; font-weight: 800;
  letter-spacing: .07em; vertical-align: middle;
}

/* The Enfoque picker, so it spans both columns of a setup grid. */
.cx-pick { grid-column: 1 / -1; }
