/* Виджет бесплатной проверки работы: общий для страниц эссе по английскому
   (essay-checker-ege.html) и сочинения по русскому (sochinenie-ege-russkij.html).
   Разметку и поведение задаёт essay-checker.js по data-атрибутам блока .ec-tool. */
.ec-tool { max-width: 860px; margin: 0 auto; }
.ec-card { background: #fff; border-radius: 20px; box-shadow: 0 8px 30px rgba(15, 23, 42, .08); padding: 28px; }
.ec-label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 8px; color: #0f172a; }
.ec-textarea { width: 100%; min-height: 260px; resize: vertical; border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 14px 16px; font: inherit; font-size: 15px; line-height: 1.6; color: #0f172a; background: #f8fafc; box-sizing: border-box; }
.ec-textarea:focus { outline: none; border-color: #4f46e5; background: #fff; }
.ec-textarea-sm { min-height: 110px; }
.ec-label-note { font-weight: 400; color: #64748b; font-size: 13.5px; }
.ec-label-spaced { margin-top: 20px; }
.ec-counter { text-align: right; font-size: 13px; color: #64748b; margin-top: 6px; }
.ec-counter.ec-counter-error { color: #dc2626; }
.ec-hint { font-size: 13px; color: #b45309; margin-top: 4px; min-height: 18px; }
.ec-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 18px; }
.ec-list { border: 1px solid #e2e8f0; border-radius: 14px; padding: 14px 18px; }
.ec-list h4 { margin: 0 0 8px; font-size: 14px; color: #0f172a; }
.ec-list ul { margin: 0; padding-left: 18px; color: #334155; font-size: 13.5px; line-height: 1.6; }
.ec-comment p { margin: 0 0 10px; }
.ec-comment p:last-child { margin-bottom: 0; }
.ec-comment ul, .ec-comment ol { margin: 0 0 10px; padding-left: 20px; }
.ec-comment h3, .ec-comment h4 { margin: 12px 0 6px; font-size: 15px; }
.ec-captcha-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 18px; }
.ec-captcha-question { font-weight: 700; font-size: 17px; color: #312e81; background: #eef2ff; border: 1.5px dashed #c7d2fe; border-radius: 12px; padding: 10px 16px; white-space: nowrap; }
.ec-input { border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 10px 14px; font: inherit; font-size: 15px; width: 130px; background: #f8fafc; }
.ec-input:focus { outline: none; border-color: #4f46e5; background: #fff; }
.ec-link-btn { background: none; border: none; color: #4f46e5; font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; padding: 0; }
.ec-actions { margin-top: 22px; }
.ec-alert { border-radius: 12px; padding: 12px 16px; font-size: 14px; margin-top: 16px; display: none; }
.ec-alert.ec-alert-error { display: block; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.ec-alert.ec-alert-warning { display: block; background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
/* Ожидание проверки — как в кабинете (ThinkingIndicator): Мива за ноутбуком и шкала. */
.ec-progress-box { display: none; align-items: center; gap: 14px; margin-top: 20px; padding: 12px 16px; border: 1px solid #e0e7ff; border-radius: 14px; background: #f8fafc; }
.ec-progress-box.ec-visible { display: flex; }
.ec-miva { flex-shrink: 0; height: 56px; width: auto; animation: ec-bob 2.4s ease-in-out infinite; }
.ec-progress-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ec-progress-label { font-size: 14.5px; font-weight: 600; color: #1e293b; }
.ec-progress { height: 6px; border-radius: 999px; background: #e0e7ff; overflow: hidden; }
.ec-progress-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #4f46e5, #06b6d4); transition: width 0.25s linear; }
.ec-waiting { display: none; text-align: center; font-size: 13.5px; color: #64748b; margin-top: 10px; }
.ec-waiting.ec-visible { display: block; }
@keyframes ec-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .ec-miva { animation: none; } .ec-progress-fill { transition: none; } }
.ec-result { display: none; margin-top: 28px; }
.ec-result.ec-visible { display: block; }
.ec-total { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ec-total-score { font-size: 44px; font-weight: 800; background: linear-gradient(135deg, #4f46e5, #7c3aed); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ec-total-max { font-size: 20px; color: #64748b; font-weight: 600; }
.ec-criteria { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 18px; }
.ec-criterion { border: 1px solid #e2e8f0; border-radius: 14px; padding: 14px 16px; background: #fff; }
.ec-criterion-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ec-criterion-code { font-weight: 800; color: #4f46e5; font-size: 15px; }
.ec-criterion-score { font-weight: 700; color: #0f172a; white-space: nowrap; }
.ec-criterion-name { font-size: 13.5px; color: #475569; margin-top: 2px; }
.ec-criterion-comment { font-size: 13.5px; color: #334155; margin-top: 8px; line-height: 1.55; }
.ec-comment { margin-top: 18px; background: #f5f3ff; border: 1px solid #ddd6fe; border-radius: 14px; padding: 16px 18px; font-size: 15px; line-height: 1.65; color: #1e1b4b; }
.ec-cta { display: none; margin-top: 30px; background: linear-gradient(135deg, #0a0e27 0%, #1a1f4b 50%, #4f46e5 100%); color: #fff; border-radius: 20px; padding: 28px; }
.ec-cta.ec-visible { display: block; }
.ec-cta h3 { margin: 0 0 10px; font-size: 22px; }
.ec-cta p { color: #c7d2fe; margin: 0 0 14px; line-height: 1.6; }
.ec-cta ul { margin: 0 0 18px; padding-left: 20px; color: #e0e7ff; line-height: 1.7; }
.ec-cta .btn { background: #fff; color: #312e81; }
.ec-privacy { font-size: 12.5px; color: #94a3b8; margin: 10px 0 0; line-height: 1.55; }
.ec-privacy a { color: #64748b; }
.ec-disclaimer { font-size: 13px; color: #94a3b8; margin-top: 14px; }
@media (max-width: 640px) {
  .ec-card { padding: 18px; }
  .ec-total-score { font-size: 36px; }
}
