/* ============================================================================
 * Академия МобилСервис (academy.html)
 * ========================================================================== */
body.ac-body { background: #f3f6fb; color: #0b1424; font-family: 'Inter', Arial, sans-serif; }
.ac-app { max-width: 1080px; margin: 0 auto; padding: 104px 20px 80px; min-height: 70vh; }
.ac-app a { color: inherit; }
.ac-muted { color: #5b6b7d; font-size: 14px; }
.ac-h2 { font: 700 20px 'Montserrat', sans-serif; margin: 34px 0 14px; }
.ac-card { background: #fff; border-radius: 20px; padding: 24px; box-shadow: 0 2px 14px rgba(8, 20, 40, .05); margin-top: 18px; }
.ac-card .ac-h2 { margin-top: 0; }

/* кнопки, бейджи */
.ac-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 20px; border-radius: 12px; border: 0; cursor: pointer;
  background: #1976d2; color: #fff !important; font: 600 14.5px 'Inter', sans-serif; text-decoration: none;
  transition: background .15s, transform .15s; white-space: nowrap;
}
.ac-btn:hover { background: #1565c0; }
.ac-btn:active { transform: translateY(1px); }
.ac-btn:disabled { opacity: .45; cursor: default; }
.ac-btn[hidden] { display: none; }
.ac-btn--lg { height: 52px; padding: 0 28px; font-size: 16px; }
.ac-btn--sm { height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.ac-btn--ghost { background: #e8eef7; color: #0b1424 !important; }
.ac-btn--ghost:hover { background: #dce5f2; }
.ac-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 100px; background: #e8f1fd; color: #1565c0; font-size: 11.5px; font-weight: 700; letter-spacing: .2px; }
.ac-tag--draft { background: #fff3e0; color: #c25e00; }
.ac-tag--ok { background: #e6f6ec; color: #1f8a46; }
.ac-tag--test { background: #f1e9ff; color: #6b3fd1; }
.ac-welcome-badge { display: inline-flex; padding: 6px 12px; border-radius: 100px; background: #fff; box-shadow: 0 2px 10px rgba(8, 20, 40, .06); font-size: 13px; font-weight: 600; margin-bottom: 14px; }

/* загрузка, пустые состояния */
.ac-loading { display: grid; place-items: center; height: 40vh; }
.ac-loading span { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #d6e2f2; border-top-color: #1976d2; animation: ac-spin .8s linear infinite; }
@keyframes ac-spin { to { transform: rotate(360deg); } }
.ac-empty { text-align: center; padding: 70px 20px; }
.ac-empty--sm { padding: 30px 20px; background: #fff; border-radius: 20px; }
.ac-empty-ic { font-size: 46px; margin-bottom: 10px; }
.ac-empty h2 { font: 700 22px 'Montserrat', sans-serif; margin-bottom: 12px; }
.ac-empty p { color: #5b6b7d; margin-bottom: 16px; }

/* вход / приглашение */
.ac-welcome, .ac-invite { max-width: 620px; margin: 6vh auto 0; text-align: center; }
.ac-welcome h1, .ac-invite h1 { font: 800 clamp(30px, 5vw, 46px)/1.1 'Montserrat', sans-serif; margin-bottom: 16px; }
.ac-welcome h1 span { color: #1976d2; }
.ac-welcome p, .ac-invite > p { color: #3a4a5c; font-size: 17px; line-height: 1.6; margin-bottom: 24px; }
.ac-form { display: grid; gap: 14px; text-align: left; background: #fff; padding: 26px; border-radius: 20px; box-shadow: 0 2px 14px rgba(8, 20, 40, .06); }
.ac-form label { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; color: #34435a; }
.ac-form input[type=text], .ac-form input:not([type]), .ac-form input[type=password] { height: 46px; border: 1.5px solid #dbe3ee; border-radius: 12px; padding: 0 14px; font: 15px 'Inter', sans-serif; }
.ac-form input:focus { outline: none; border-color: #1976d2; }
.ac-check { display: flex !important; grid-template-columns: none !important; align-items: flex-start; gap: 10px !important; font-weight: 400 !important; }
.ac-check input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; }
.ac-check a { color: #1976d2; }
.ac-error { color: #c62828; font-size: 14px; }

/* кабинет */
.ac-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.ac-hero h1 { font: 800 clamp(26px, 4vw, 36px)/1.15 'Montserrat', sans-serif; margin-bottom: 6px; }
.ac-hero p { color: #3a4a5c; }
.ac-path { display: grid; gap: 0; margin-top: 18px; }
.ac-step { display: flex; gap: 16px; position: relative; padding-bottom: 18px; }
.ac-step:not(:last-child)::before { content: ''; position: absolute; left: 13px; top: 30px; bottom: 0; width: 2px; background: #dde6f2; }
.ac-step--done:not(:last-child)::before { background: #1976d2; }
.ac-step-dot { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: #fff; border: 2px solid #cfd9e7; color: #fff; font-size: 14px; font-weight: 700; }
.ac-step--done .ac-step-dot { background: #1976d2; border-color: #1976d2; }
.ac-step--current .ac-step-dot { border-color: #1976d2; box-shadow: 0 0 0 5px rgba(25, 118, 210, .15); background: #1976d2; }
.ac-step-body { display: grid; gap: 3px; padding-top: 3px; }
.ac-step-body b { font-size: 15.5px; }
.ac-step--next .ac-step-body b { color: #5b6b7d; }
.ac-step-body small { color: #5b6b7d; font-size: 13px; }
.ac-step-body .ac-req { color: #8a6a00; }
.ac-step-body .ac-soon { font-style: italic; }
.ac-step-courses { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ac-step-courses a { font-size: 12.5px; padding: 4px 10px; border-radius: 100px; background: #eef3fa; text-decoration: none; font-weight: 600; color: #34435a; }
.ac-step-courses a.is-ok { background: #e6f6ec; color: #1f8a46; }

.ac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ac-course { position: relative; background: #fff; border-radius: 20px; padding: 22px; box-shadow: 0 2px 14px rgba(8, 20, 40, .05); display: flex; flex-direction: column; gap: 10px; transition: transform .2s, box-shadow .2s; }
.ac-course:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(25, 118, 210, .12); }
.ac-course-link { position: absolute; inset: 0; border-radius: 20px; }
.ac-course .ac-btn { position: relative; align-self: flex-start; margin-top: 4px; }
.ac-course-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ac-course-ic { width: 44px; height: 44px; border-radius: 14px; background: #eef4fd; display: grid; place-items: center; font-size: 22px; }
.ac-course-ic--lg { width: 72px; height: 72px; font-size: 36px; border-radius: 20px; flex-shrink: 0; }
.ac-course h3 { font: 700 18px 'Montserrat', sans-serif; line-height: 1.3; }
.ac-course p { color: #5b6b7d; font-size: 14px; line-height: 1.5; flex: 1; }
.ac-progress { height: 8px; background: #e8eef7; border-radius: 100px; overflow: hidden; }
.ac-progress span { display: block; height: 100%; background: linear-gradient(90deg, #3d9bff, #1976d2); border-radius: 100px; transition: width .4s; }
.ac-progress--lg { height: 10px; margin: 16px 0 8px; max-width: 520px; }
.ac-course-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: #5b6b7d; }
.ac-overdue { color: #c62828; font-weight: 600; }
.ac-course.is-done { opacity: .85; }

/* курс */
.ac-back { display: inline-block; font-size: 14px; color: #1976d2 !important; text-decoration: none; margin-bottom: 18px; font-weight: 600; }
.ac-back:hover { text-decoration: underline; }
.ac-course-head { display: flex; gap: 22px; background: #fff; border-radius: 24px; padding: 28px; box-shadow: 0 2px 14px rgba(8, 20, 40, .05); margin-bottom: 22px; }
.ac-course-head h1 { font: 800 clamp(24px, 3.4vw, 32px)/1.2 'Montserrat', sans-serif; margin: 8px 0; }
.ac-lead { font-size: 17px; color: #34435a; margin-bottom: 8px; }
.ac-course-head p { color: #5b6b7d; line-height: 1.6; }
.ac-module { background: #fff; border-radius: 20px; padding: 18px; box-shadow: 0 2px 14px rgba(8, 20, 40, .05); margin-bottom: 14px; }
.ac-module-head { display: flex; gap: 14px; align-items: center; padding: 4px 6px 12px; }
.ac-module-head h2 { font: 700 17px 'Montserrat', sans-serif; }
.ac-module-head small { color: #5b6b7d; font-size: 13px; }
.ac-module-n { width: 34px; height: 34px; border-radius: 10px; background: #0f1a2c; color: #fff; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.ac-lessons { display: grid; gap: 4px; }
.ac-lesson { display: flex; align-items: center; gap: 12px; padding: 12px 12px; border-radius: 12px; text-decoration: none; transition: background .15s; }
a.ac-lesson[href]:hover { background: #f1f6fd; }
.ac-lesson-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; flex-shrink: 0; background: #e8f1fd; color: #1976d2; }
.ac-lesson--done .ac-lesson-ic { background: #1f8a46; color: #fff; }
.ac-lesson--locked { opacity: .5; cursor: not-allowed; }
.ac-lesson--locked .ac-lesson-ic { background: #eef1f5; }
.ac-lesson-t { flex: 1; font-size: 15px; font-weight: 500; }
.ac-lesson-m { font-size: 12.5px; color: #8a99aa; white-space: nowrap; }

/* урок */
.ac-lesson-page { background: #fff; border-radius: 24px; padding: clamp(20px, 4vw, 40px); box-shadow: 0 2px 14px rgba(8, 20, 40, .05); max-width: 820px; margin: 0 auto; }
.ac-lesson-head { margin-bottom: 20px; }
.ac-lesson-head h1 { font: 800 clamp(24px, 3.6vw, 32px)/1.2 'Montserrat', sans-serif; margin-top: 6px; }
.ac-steps { display: grid; gap: 22px; }
.ac-text { font-size: 16.5px; line-height: 1.75; color: #24324a; }
.ac-text h2, .ac-text h3, .ac-text h4 { font: 700 19px 'Montserrat', sans-serif; color: #0b1424; margin: 18px 0 8px; }
.ac-text h3:first-child { margin-top: 0; }
.ac-text p { margin: 0 0 10px; }
.ac-text ul, .ac-text ol { margin: 6px 0 12px 22px; }
.ac-text li { margin: 4px 0; }
.ac-text strong { color: #0b1424; }
.ac-text a { color: #1976d2 !important; }
.ac-callout { border-radius: 16px; padding: 16px 18px; font-size: 15.5px; line-height: 1.65; background: #eef5ff; border-left: 4px solid #1976d2; }
.ac-callout p { margin: 0 0 6px; } .ac-callout p:last-child { margin: 0; }
.ac-callout--tip { background: #ecf8f0; border-color: #1f8a46; }
.ac-callout--warn { background: #fff6e8; border-color: #e08a00; }
.ac-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.ac-fact { background: linear-gradient(135deg, #0f1a2c, #1a3157); color: #fff; border-radius: 18px; padding: 18px; display: grid; gap: 4px; }
.ac-fact b { font: 800 28px 'Montserrat', sans-serif; color: #7bbcff; }
.ac-fact span { font-size: 13.5px; color: rgba(255, 255, 255, .8); line-height: 1.35; }
.ac-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.ac-mini { border: 1.5px solid #e6edf6; border-radius: 18px; padding: 18px; display: grid; gap: 6px; align-content: start; }
.ac-mini-ic { font-size: 26px; }
.ac-mini b { font-size: 15.5px; }
.ac-mini p { font-size: 14px; color: #5b6b7d; line-height: 1.55; }
.ac-timeline { list-style: none; display: grid; gap: 0; }
.ac-timeline li { display: flex; gap: 16px; position: relative; padding-bottom: 18px; }
.ac-timeline li:not(:last-child)::before { content: ''; position: absolute; left: 39px; top: 34px; bottom: 0; width: 2px; background: #dbe6f4; }
.ac-tl-year { width: 80px; flex-shrink: 0; text-align: center; height: 32px; line-height: 32px; border-radius: 100px; background: #1976d2; color: #fff; font-weight: 700; font-size: 13.5px; }
.ac-timeline b { font-size: 15.5px; }
.ac-timeline p { color: #5b6b7d; font-size: 14.5px; line-height: 1.55; margin-top: 2px; }
.ac-video { margin: 0; }
.ac-video-box { position: relative; padding-top: 56.25%; border-radius: 16px; overflow: hidden; background: #0b1424; }
.ac-video-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ac-video figcaption { font-size: 13.5px; color: #5b6b7d; margin-top: 8px; }

/* вопросы */
.ac-quiz { border: 2px solid #e1e9f4; border-radius: 20px; padding: 20px; background: #fafcff; transition: border-color .2s, background .2s; }
.ac-quiz.is-correct { border-color: #9fd8b3; background: #f3fbf6; }
.ac-quiz.is-wrong { border-color: #f1b8b8; }
.ac-quiz-label { font-size: 12.5px; font-weight: 700; color: #6b3fd1; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 6px; }
.ac-quiz-q, .ac-tq-body { font: 600 17px/1.45 'Inter', sans-serif; margin-bottom: 14px; }
.ac-opts { display: grid; gap: 8px; }
.ac-opt { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1.5px solid #dfe7f2; border-radius: 14px; background: #fff; cursor: pointer; font-size: 15px; line-height: 1.4; transition: border-color .15s, background .15s; }
.ac-opt:hover { border-color: #9cc4ee; }
.ac-opt input { width: 18px; height: 18px; flex-shrink: 0; accent-color: #1976d2; }
.ac-opt:has(input:checked) { border-color: #1976d2; background: #f0f6ff; }
.ac-opt.is-right { border-color: #1f8a46; background: #eaf7ef; }
.ac-order { list-style: none; display: grid; gap: 8px; counter-reset: ord; }
.ac-order li { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border: 1.5px solid #dfe7f2; border-radius: 14px; background: #fff; font-size: 15px; counter-increment: ord; }
.ac-order li::before { content: counter(ord); width: 26px; height: 26px; border-radius: 50%; background: #e8f1fd; color: #1976d2; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.ac-order.is-revealed li { border-color: #1f8a46; }
.ac-order-t { flex: 1; }
.ac-order-btns { display: flex; gap: 4px; }
.ac-order-btns button { width: 36px; height: 36px; border-radius: 10px; border: 0; background: #eef3fa; cursor: pointer; font-size: 16px; }
.ac-order-btns button:hover:not(:disabled) { background: #dce8f8; }
.ac-order-btns button:disabled { opacity: .35; cursor: default; }
.ac-quiz-foot { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.ac-quiz-res { font-size: 14.5px; line-height: 1.5; color: #34435a; flex: 1; min-width: 200px; }

.ac-lesson-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 30px; padding-top: 20px; border-top: 1px solid #edf1f7; flex-wrap: wrap; }
.ac-foot-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }

/* тест */
.ac-attempts { display: grid; gap: 8px; margin: 18px 0 0; box-shadow: none; border: 1.5px solid #e6edf6; }
.ac-attempt-row { display: flex; gap: 14px; font-size: 14px; color: #5b6b7d; flex-wrap: wrap; }
.ac-attempt-row span:last-child { margin-left: auto; font-weight: 700; }
.ac-ok { color: #1f8a46; } .ac-bad { color: #c62828; }
.ac-test-bar { position: sticky; top: 86px; z-index: 5; display: flex; align-items: center; gap: 16px; background: #fff; border-radius: 16px; padding: 12px 18px; box-shadow: 0 4px 18px rgba(8, 20, 40, .08); max-width: 820px; margin: 0 auto 12px; flex-wrap: wrap; }
.ac-test-bar b { flex: 1; font-size: 15px; }
.ac-test-bar span { font-size: 14px; color: #5b6b7d; }
.ac-timer { font-weight: 700; color: #0b1424 !important; font-variant-numeric: tabular-nums; background: #eef3fa; padding: 6px 12px; border-radius: 10px; }
.ac-timer.is-low { background: #fdecec; color: #c62828 !important; }
.ac-dots { display: flex; flex-wrap: wrap; gap: 6px; max-width: 820px; margin: 0 auto 12px; }
.ac-dots button { width: 36px; height: 36px; border-radius: 10px; border: 1.5px solid #dbe4f0; background: #fff; cursor: pointer; font-weight: 600; color: #5b6b7d; }
.ac-dots button.is-done { background: #e8f1fd; border-color: #9cc4ee; color: #1565c0; }
.ac-dots button.is-cur { border-color: #1976d2; box-shadow: 0 0 0 3px rgba(25, 118, 210, .18); color: #0b1424; }
#ac-qs { max-width: 820px; margin: 0 auto; }
.ac-tq { background: #fff; border-radius: 24px; padding: clamp(20px, 4vw, 36px); box-shadow: 0 2px 14px rgba(8, 20, 40, .05); }
#ac-qs + .ac-lesson-foot { max-width: 820px; margin-left: auto; margin-right: auto; border-top: 0; }
.ac-result { text-align: center; }
.ac-result h1 { font: 800 28px 'Montserrat', sans-serif; margin: 14px 0 8px; }
.ac-result > p { color: #3a4a5c; margin-bottom: 16px; }
.ac-result-score { width: 150px; height: 150px; border-radius: 50%; margin: 0 auto; display: grid; place-content: center; background: #fdecec; }
.ac-result.is-pass .ac-result-score { background: #e6f6ec; }
.ac-result-score b { font: 800 40px 'Montserrat', sans-serif; }
.ac-result-score span { font-size: 13.5px; color: #5b6b7d; }
.ac-result .ac-callout { text-align: left; margin: 16px 0; }
.ac-review { display: grid; gap: 10px; text-align: left; margin-top: 18px; }
.ac-review-item { border-radius: 14px; padding: 14px 16px; border: 1.5px solid #e6edf6; }
.ac-review-item.is-bad { border-color: #f3c6c6; background: #fff8f8; }
.ac-review-q { font-weight: 600; font-size: 15px; }
.ac-review-a { font-size: 14px; color: #3a4a5c; margin-top: 6px; line-height: 1.55; }
.ac-review-e { font-size: 13.5px; color: #5b6b7d; margin-top: 4px; }
.ac-celebrate .ac-empty-ic { font-size: 64px; }

@media (max-width: 640px) {
  .ac-app { padding: 88px 14px 60px; }
  .ac-course-head { flex-direction: column; padding: 20px; }
  .ac-grid { grid-template-columns: 1fr; }
  .ac-lesson-page { border-radius: 18px; }
  .ac-lesson-foot { flex-direction: column-reverse; align-items: stretch; }
  .ac-lesson-foot .ac-btn, .ac-foot-right .ac-btn { width: 100%; }
  .ac-foot-right { flex-direction: column-reverse; align-items: stretch; }
  .ac-test-bar { top: 74px; }
  .ac-tl-year { width: 66px; font-size: 12px; }
  .ac-timeline li:not(:last-child)::before { left: 32px; }
}

/* английской версии академии нет — переключатель языка скрываем */
.ac-body .sh-lang, .ac-body .sh-mob .mob-row button { display: none; }
