/* CivicLearn Costa Rica — entrenador de Español (ortografía, composición, lectura oral) */
.es-setup .es-intro, .es-intro { font-size: 15px; line-height: 1.6; color: var(--text-mid); margin: 0 0 18px; }
.es-small { font-size: 13.5px; line-height: 1.55; color: var(--text-mid); margin: 0 0 12px; }
.es-label { font-size: 12px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--text-mid); margin: 0 0 8px; }
.es-title { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; margin: 0 0 12px; color: var(--text); }
.es-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.es-topics { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 20px; }
.es-topic {
  text-align: left; padding: 13px 16px; border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--surface); font: inherit; color: var(--text); cursor: pointer; width: 100%;
}
.es-topic:hover { border-color: var(--accent); }
.es-topic.active { border-color: var(--accent); background: var(--accent-soft); }
.es-topic-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.es-topic-name { font-size: 15px; font-weight: 600; }
.es-topic.active .es-topic-name { color: var(--accent); }
.es-topic-count { flex: none; font-size: 12.5px; font-weight: 700; color: var(--text-mid); }
.es-topic-desc { font-size: 13px; line-height: 1.45; color: var(--text-mid); margin-top: 3px; }

/* ortografía */
.es-sentence { line-height: 1.7; }
.es-gap {
  display: inline-block; min-width: 72px; padding: 0 8px; margin: 0 2px; text-align: center;
  border-bottom: 2px solid var(--accent); color: var(--accent); font-weight: 700;
}
.es-gap.filled { border-bottom-color: var(--correct); color: #166534; background: var(--correct-bg); border-radius: 6px 6px 0 0; }
.es-list { display: flex; flex-direction: column; gap: 14px; margin: 10px 0 22px; text-align: left; }
.es-item { padding: 16px 18px 14px; border: 1.5px solid var(--border); border-left-width: 4px; border-radius: 13px; background: var(--surface); }
.es-item.full { border-left-color: var(--correct); }
.es-item.partial { border-left-color: var(--orange); }
.es-item.zero { border-left-color: var(--wrong); }
.es-item.ungraded { border-left-color: var(--text-muted); }
.es-item .ce-question { font-size: 16px; margin-bottom: 8px; }
.es-item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.es-item-topic { font-size: 14px; font-weight: 700; color: var(--text); }
.es-chip { flex: none; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 800; background: var(--surface-alt); color: var(--text); }
.es-item.full .es-chip { background: var(--correct-bg); color: var(--correct); }
.es-item.zero .es-chip { background: var(--wrong-bg); color: var(--wrong); }
.es-item.partial .es-chip { background: #ffedd5; color: var(--orange); }
.es-right-sentence { font-size: 15px; font-weight: 600; color: #166534; margin: 0 0 8px; }
.es-rule { font-size: 13.5px; line-height: 1.55; color: var(--text-mid); }

/* composición */
.es-textarea {
  display: block; width: 100%; box-sizing: border-box; min-height: 340px; resize: vertical;
  padding: 16px 18px; border: 1.5px solid var(--border); border-radius: 13px; background: var(--surface);
  font: inherit; font-size: 16px; line-height: 1.7; color: var(--text);
}
.es-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-mid); }
.es-meter { display: flex; justify-content: space-between; gap: 12px; margin: 8px 2px 18px; font-size: 13px; color: var(--text-mid); }
.es-count { font-weight: 700; color: var(--orange); }
.es-count.ok { color: var(--correct); }
.es-clock { font-variant-numeric: tabular-nums; font-weight: 700; }
.es-clock.over { color: var(--wrong); }
.es-guide { margin: 0 0 14px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); text-align: left; }
.es-guide summary { cursor: pointer; font-size: 14.5px; font-weight: 600; color: var(--accent); }
.es-guide ul { margin: 10px 0 6px 18px; padding: 0; font-size: 14.5px; line-height: 1.6; color: var(--text); }
.es-guide-tip { font-size: 13.5px; color: var(--text-mid); margin: 8px 0 0; }
.es-model-p { font-size: 15px; line-height: 1.7; color: var(--text); margin: 10px 0 0; text-indent: 1.5em; }
.es-block { margin: 0 0 18px; text-align: left; }
.es-mine { padding: 12px 14px; border-radius: 10px; background: var(--surface-alt); font-size: 15px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; text-align: left; }
.es-note { margin: 0 0 16px; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); border-left: 3px solid var(--accent); font-size: 14px; line-height: 1.55; color: var(--text); text-align: left; }
.es-note .es-row { margin: 10px 0 0; }
.es-warn { margin: 0 0 14px; padding: 11px 14px; border-radius: 10px; background: #ffedd5; border-left: 3px solid var(--orange); font-size: 14px; line-height: 1.5; color: #7c2d12; text-align: left; }
.es-rubric { display: flex; flex-direction: column; gap: 6px; }
.es-rubric-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 10px; cursor: pointer; }
.es-rubric-row input { margin-top: 3px; width: 17px; height: 17px; flex: none; accent-color: var(--accent); }
.es-rubric-name { font-size: 14.5px; font-weight: 600; color: var(--text); }
.es-rubric-max { font-size: 12px; font-weight: 700; color: var(--text-mid); margin-left: 4px; }
.es-rubric-hint { font-size: 13px; line-height: 1.45; color: var(--text-mid); }
.es-ai { margin: 6px 0 18px; padding: 16px 18px; border: 1.5px solid var(--accent-mid); border-radius: 13px; background: var(--accent-soft); text-align: left; }
.es-quota { font-weight: 600; color: var(--text); }
.es-grading { text-align: center; padding: 22px 12px 6px; color: var(--text-mid); font-weight: 600; }
.es-spinner { width: 34px; height: 34px; margin: 0 auto 14px; border-radius: 50%; border: 3px solid var(--accent-mid); border-top-color: var(--accent); animation: es-spin 0.9s linear infinite; }
@keyframes es-spin { to { transform: rotate(360deg); } }
.es-summary { font-size: 15px; line-height: 1.6; color: var(--text); margin: 0 0 14px; text-align: left; }
.es-feedback { font-size: 14.5px; line-height: 1.55; color: var(--text); margin: 0 0 6px; }
.es-error { padding: 8px 0 6px; border-top: 1px solid var(--border-lt); }
.es-error-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 15px; }
.es-error-bad { color: #991b1b; text-decoration: line-through; text-decoration-color: rgba(153,27,27,0.5); }
.es-error-arrow { color: var(--text-muted); }
.es-error-good { color: #166534; font-weight: 700; }
.es-error-why { font-size: 13px; line-height: 1.5; color: var(--text-mid); margin-top: 2px; }
.es-result .ce-result-score { margin-bottom: 10px; }

/* lectura oral */
.es-reading { margin: 4px 0 18px; padding: 20px 22px; border: 1.5px solid var(--border); border-radius: 13px; background: var(--surface); text-align: left; }
.es-reading-p { font-size: 17px; line-height: 1.8; color: var(--text); margin: 0 0 12px; }
.es-reading-p:last-child { margin-bottom: 0; }
.es-rec { margin: 0 0 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.es-rec-btn.recording { background: var(--wrong); border-color: var(--wrong); }
.es-rec-info { font-size: 13.5px; font-weight: 600; color: var(--text-mid); font-variant-numeric: tabular-nums; }
.es-rec-player { flex-basis: 100%; }
.es-rec-player audio, .es-audio-row audio { width: 100%; max-width: 420px; height: 38px; }
.es-audio-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 8px; }
.es-audio-name { font-size: 13.5px; font-weight: 600; color: var(--text); min-width: 96px; }
.es-self-row { padding: 10px 0; border-top: 1px solid var(--border-lt); }
.es-self-name { font-size: 14.5px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.es-self-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.es-key { padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 9px; background: var(--surface); font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text); cursor: pointer; }
.es-key:hover { border-color: var(--accent); color: var(--accent); }
.es-key.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.es-self-total { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; color: var(--accent); margin: 12px 0 4px; }
.es-ai-result { margin-top: 14px; }

/* lock card */
.es-lock { text-align: center; }
.es-lock-icon { font-size: 34px; margin-bottom: 8px; }
.es-lock h2 { font-size: 20px; font-weight: 700; margin: 0 0 10px; }

/* dashboard: Spanish row */
.db-section-title { font-size: 13px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--text-mid); margin: 26px 2px 10px; }

@media (max-width: 640px) {
  .es-textarea { min-height: 300px; font-size: 16px; }
  .es-reading { padding: 16px; }
  .es-reading-p { font-size: 16.5px; }
}

.es-sim-part { display: block; text-decoration: none; }
.es-sim-result { margin-top: 6px; text-align: left; }
.es-sim-result .ce-result-score { margin: 4px 0 10px; }
