/* ===========================================================================
   TEST DE CONVIVENCIA · estilos
   ---------------------------------------------------------------------------
   Todo lo de aquí empieza por .tc- y sólo afecta al test. No se cambia
   ninguna variable global ni ningún estilo del resto de la aplicación: se
   reutilizan las variables que ya existen en index.html (--brand,
   --brand-soft, --card, --line, --ink, --muted), así que el test queda
   automáticamente bien en modo claro y en modo oscuro.
   =========================================================================== */

.tc-card { max-width: 720px; margin: 0 auto; }

/* ---------- progreso ---------- */
.tc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.tc-step { font-size: .88rem; font-weight: 700; color: var(--muted); }
.tc-pctxt { font-size: .82rem; color: var(--muted); }
.tc-bar { height: 6px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.tc-bar > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .35s ease; }

/* ---------- mensaje de ánimo ---------- */
.tc-cheer { display: flex; align-items: center; gap: 9px; margin-top: 14px; padding: 9px 13px;
            border-radius: 10px; background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; font-size: .9rem; }
.tc-cheer svg { flex: none; }

/* ---------- chip del tema ---------- */
.tc-chip { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 10px; padding: 5px 14px 5px 6px;
           border-radius: 99px; background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; font-size: .85rem; }
.tc-chip > .tc-chipic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--card); flex: none; }

/* ---------- pregunta ---------- */
.tc-q { margin: 0 0 2px; font-size: 1.3rem; line-height: 1.3; letter-spacing: -.01em; }
.tc-hint { margin: 0 0 16px; color: var(--muted); font-size: .88rem; }

/* ---------- opciones ---------- */
.tc-opts { display: flex; flex-direction: column; gap: 10px; border: 0; padding: 0; margin: 0; }
.tc-opt { display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin: 0; font-weight: 500;
          border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer;
          transition: border-color .15s ease, background .15s ease; }
.tc-opt:hover { border-color: var(--brand-dark); }
.tc-opt .tc-ic { display: grid; place-items: center; width: 38px; height: 38px; flex: none;
                 border-radius: 11px; background: var(--brand-soft); color: var(--brand-dark); }
.tc-opt .tc-txt { flex: 1 1 auto; min-width: 0; }
/* El radio de verdad está, pero no se ve: lo sustituye el círculo de la derecha. */
.tc-opt input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.tc-opt .tc-dot { display: grid; place-items: center; width: 22px; height: 22px; flex: none;
                  border: 2px solid var(--line); border-radius: 50%; background: transparent; color: #fff; }
.tc-opt .tc-dot svg { opacity: 0; }
.tc-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); font-weight: 700; }
.tc-opt:has(input:checked) .tc-ic { background: var(--card); }
.tc-opt:has(input:checked) .tc-dot { background: var(--brand); border-color: var(--brand); animation: tc-pop .26s ease; }
.tc-opt:has(input:checked) .tc-dot svg { opacity: 1; }
.tc-opt:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 1px; }
@keyframes tc-pop { 0% { transform: scale(.5); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }

/* ---------- botones ---------- */
.tc-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; }
.tc-nav .btn { border-radius: 99px; padding: 11px 26px; }
.tc-nav .tc-next { min-width: 140px; }

/* ---------- entrada y final ---------- */
.tc-center { text-align: center; padding: 10px 4px 4px; }
.tc-hero { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 20px;
           border-radius: 20px; background: var(--brand-soft); color: var(--brand); }
.tc-center h1 { font-size: 1.6rem; margin-bottom: 10px; }
.tc-lead { max-width: 440px; margin: 0 auto 22px; color: var(--muted); }
.tc-meta { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px; padding: 7px 15px;
           border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: .85rem; font-weight: 600; }
.tc-foot { margin: 16px 0 0; color: var(--muted); font-size: .8rem; }

/* celebración de la pantalla final */
.tc-party { position: relative; width: 150px; height: 108px; margin: 0 auto 18px; }
.tc-party .tc-conf { position: absolute; inset: 0; color: var(--brand-soft); }
.tc-party .tc-badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
                      display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%;
                      background: var(--brand); color: var(--card); animation: tc-badge .4s ease both; }
@keyframes tc-badge { 0% { transform: translate(-50%, -50%) scale(.6); opacity: 0; } 60% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; } }

/* ---------- transición entre preguntas ---------- */
.tc-slide { animation: tc-in .28s ease both; }
@keyframes tc-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.tc-slide.tc-back { animation-name: tc-in-back; }
@keyframes tc-in-back { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .tc-slide, .tc-party .tc-badge, .tc-opt:has(input:checked) .tc-dot { animation: none; }
  .tc-bar > i { transition: none; }
}

/* ---------- móvil ---------- */
@media (max-width: 560px) {
  .tc-q { font-size: 1.15rem; }
  .tc-opt { padding: 8px 10px; gap: 10px; }
  .tc-opt .tc-ic { width: 34px; height: 34px; border-radius: 10px; }
  .tc-nav { gap: 8px; }
  .tc-nav .btn { padding: 11px 18px; }
  .tc-nav .tc-next { min-width: 0; flex: 1 1 auto; }
}
