/* inline-check.css — in-lesson knowledge-check gates */

.inline-check.ic-ready {
  margin: 2.25rem 0;
  padding: 1.25rem 1.35rem 1.35rem;
  border: 1px solid var(--tint-check-rule, #b4cce0);
  border-left: 4px solid var(--tint-check-ink, #3a6d8a);
  border-radius: var(--rad-lg, 10px);
  background: var(--tint-check, #e8f1fa);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 120px;
}
.inline-check.ic-passed {
  border-left-color: var(--success, #3a7d52);
  background: var(--success-soft, #eef6f0);
}

.inline-check .ic-head { margin-bottom: 0.9rem; }
.inline-check .ic-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: var(--tracking-caps, 0.08em);
  text-transform: uppercase;
  color: var(--tint-check-ink, #3a6d8a);
  margin-bottom: 0.4rem;
}
.inline-check.ic-passed .ic-badge { color: var(--success, #3a7d52); }
.inline-check.ic-passed .ic-badge::after { content: '  ✓ completed'; opacity: 0.8; }
:root[lang="es"] .inline-check.ic-passed .ic-badge::after { content: '  ✓ completado'; }

.inline-check .ic-title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  line-height: var(--lh-heading, 1.2);
  color: var(--ink, #2a2621);
  margin: 0 0 0.25rem;
}
.inline-check .ic-instructions {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--ink-soft, #5a534a);
  margin: 0;
}

.inline-check .ic-card { margin: 0.5rem 0; }

.inline-check .ic-feedback {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  margin-top: 0.75rem;
  min-height: 1.2em;
}
.inline-check .ic-feedback.ic-ok { color: var(--success, #3a7d52); font-weight: 600; }
.inline-check .ic-feedback.ic-no { color: var(--danger, #b23b2a); font-weight: 600; }

/* Prominent "there's more, locked" banner below the active check. */
.inline-check .ic-locknote {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--tint-check-ink, #3a6d8a);
  margin-top: 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px dashed var(--tint-check-rule, #b4cce0);
  border-radius: var(--rad-md, 7px);
  background: color-mix(in oklab, var(--tint-check, #e8f1fa) 70%, transparent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.inline-check .ic-locknote::before { content: '🔒'; font-size: 1.05em; }

/* ── Recap / spaced-recall variant — a distinct "look back" block ──────
   Reuses the inline-check gating + cards, but a cool indigo theme sets it
   apart from the warm "check your understanding" chrome, signalling "this is
   a memory check reaching back to an earlier module." */
.inline-check.recap-quiz.ic-ready {
  border: 1px solid oklch(0.84 0.05 285);
  border-left: 4px solid oklch(0.47 0.14 285);
  background: linear-gradient(180deg, oklch(0.97 0.028 285) 0%, oklch(0.985 0.012 285) 100%);
}
.inline-check.recap-quiz .ic-badge {
  color: #fff;
  background: oklch(0.47 0.14 285);
  padding: 0.22rem 0.66rem;
  border-radius: 999px;
}
.inline-check.recap-quiz .ic-badge::before { content: '↩ '; }
.inline-check.recap-quiz .ic-title { color: oklch(0.34 0.09 285); }
.inline-check.recap-quiz .ic-locknote {
  color: oklch(0.44 0.14 285);
  border-color: oklch(0.84 0.05 285);
  background: color-mix(in oklab, oklch(0.97 0.028 285) 70%, transparent);
}
.inline-check.recap-quiz .ic-locknote::before { content: '↩'; }
/* passed: green success like every gate, but keep the badge legible */
.inline-check.recap-quiz.ic-passed { border-left-color: var(--success, #3a7d52); background: var(--success-soft, #eef6f0); }
.inline-check.recap-quiz.ic-passed .ic-badge { background: var(--success, #3a7d52); color: #fff; }
.inline-check.recap-quiz.ic-passed .ic-badge::after { content: '  ✓'; }

/* Blurred peek of the next section, so the lesson visibly continues. */
.ic-teaser {
  filter: blur(5px);
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
  max-height: 4.5rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 100%);
  margin-bottom: 0 !important;
}

/* Locked outline links in the sidebar. */
.nav-section-item.locked {
  opacity: 0.45;
  pointer-events: none;
  cursor: default;
}
.nav-section-item.locked::after {
  content: '🔒';
  font-size: 0.78em;
  margin-left: 0.4em;
  opacity: 0.8;
}

@keyframes ic-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}
.inline-check.ic-wrong { animation: ic-shake 0.35s var(--ease-out); }

/* Gated content — hidden until the preceding check is passed. */
.ic-hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .inline-check.ic-wrong { animation: none; }
}
