:root {
  --bg: #0b1020;
  --bg-soft: #11172e;
  --card: #161d38;
  --card-hover: #1b2344;
  --border: #263056;
  --text: #e8ecf8;
  --muted: #93a0c4;
  --accent: #6c8cff;
  --accent-strong: #4f6ef7;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- шапка ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
  /* без переноса ссылки наезжают на логотип уже на 375px */
  flex-wrap: wrap; gap: 10px;
}
.logo { font-weight: 800; font-size: 20px; color: var(--text); letter-spacing: -0.02em; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; row-gap: 8px; }
.nav-links a { color: var(--muted); font-size: 15px; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 10px;
  font-size: 15px; font-weight: 600; cursor: pointer; border: none;
  transition: all .15s ease; text-decoration: none !important;
}
.btn-primary { background: var(--accent-strong); color: #fff; }
.btn-primary:hover { background: var(--accent); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-lg { padding: 16px 36px; font-size: 17px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- герой ---------- */
.hero { text-align: center; padding: 90px 0 70px; }
.hero .eyebrow {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  background: rgba(108,140,255,.12); color: var(--accent);
  font-size: 13px; font-weight: 600; margin-bottom: 24px; letter-spacing: .04em;
}
.hero h1 {
  font-size: clamp(34px, 5.5vw, 58px); font-weight: 800; letter-spacing: -0.03em;
  line-height: 1.12; margin-bottom: 22px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.sub {
  font-size: 19px; color: var(--muted); max-width: 680px; margin: 0 auto 36px;
}
.hero .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .note { margin-top: 16px; font-size: 14px; color: var(--muted); }

/* ---------- секции ---------- */
.section { padding: 70px 0; }
.section h2 {
  font-size: clamp(26px, 3.5vw, 38px); font-weight: 800; letter-spacing: -0.02em;
  text-align: center; margin-bottom: 14px;
}
.section .section-sub { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 48px; font-size: 17px; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
}
.card h3 { font-size: 18px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; }
.card .icon { font-size: 28px; margin-bottom: 14px; display: block; }

/* ---------- шаги ---------- */
.step { display: flex; gap: 18px; align-items: flex-start; }
.step-num {
  flex: 0 0 40px; height: 40px; border-radius: 50%;
  background: rgba(108,140,255,.15); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px;
}

/* ---------- программа ---------- */
.syllabus { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 10px; }
@media (max-width: 560px) { .syllabus { grid-template-columns: 1fr; } }
.syl-item {
  display: flex; gap: 14px; align-items: center;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 16px; font-size: 14.5px;
}
.syl-num { color: var(--accent); font-weight: 700; min-width: 26px; }
.syl-item .free-tag {
  margin-left: auto; font-size: 11px; font-weight: 700; color: var(--green);
  background: rgba(52,211,153,.12); padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.syl-item .soon-tag {
  margin-left: auto; font-size: 11px; font-weight: 700; color: var(--muted);
  background: rgba(147,160,196,.12); padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.syl-item .pro-tag {
  margin-left: auto; font-size: 11px; font-weight: 700; color: var(--amber);
  background: rgba(251,191,36,.1); padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}

/* ---------- прайсинг ---------- */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; max-width: 760px; margin: 0 auto; }
.price-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 34px; text-align: center;
}
.price-card.featured { border-color: var(--accent); box-shadow: 0 0 40px rgba(108,140,255,.15); }
.price-card .plan { font-size: 14px; font-weight: 700; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.price-card .price { font-size: 46px; font-weight: 800; margin: 14px 0 4px; }
.price-card .price small { font-size: 16px; color: var(--muted); font-weight: 500; }
.price-card ul { list-style: none; margin: 22px 0 28px; text-align: left; }
.price-card li { padding: 7px 0; color: var(--muted); font-size: 15px; }
.price-card li::before { content: "✓  "; color: var(--green); font-weight: 700; }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 18px 22px; margin-bottom: 12px;
}
.faq summary { cursor: pointer; font-weight: 600; font-size: 16px; }
.faq details p { margin-top: 12px; color: var(--muted); font-size: 15px; }

.footer {
  border-top: 1px solid var(--border); padding: 34px 0; margin-top: 40px;
  text-align: center; color: var(--muted); font-size: 14px;
}

/* ================= приложение ================= */

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.app-header {
  border-bottom: 1px solid var(--border); background: var(--bg-soft);
  position: sticky; top: 0; z-index: 10;
}
.app-header .container { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.app-user { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--muted); }
.badge {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
}
.badge-pro { color: var(--amber); background: rgba(251,191,36,.12); }
.badge-free { color: var(--muted); background: rgba(147,160,196,.12); }

.app-main { flex: 1; padding: 36px 0 80px; }

/* auth */
.auth-box {
  max-width: 420px; margin: 60px auto; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 36px;
}
.auth-box h2 { margin-bottom: 6px; font-size: 24px; }
.auth-box .hint { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 24px; }
.auth-tabs button {
  flex: 1; padding: 10px; border-radius: 8px; border: 1px solid var(--border);
  background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; font-size: 14px;
}
.auth-tabs button.active { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.field input {
  width: 100%; padding: 12px 14px; border-radius: 8px; font-size: 15px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.field input:focus { outline: none; border-color: var(--accent); }
.form-error { color: var(--red); font-size: 14px; margin-bottom: 12px; min-height: 20px; }

/* dashboard */
.progress-panel {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 28px; margin-bottom: 30px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.progress-panel .info { flex: 1; min-width: 220px; }
.progress-bar { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.progress-bar > div { height: 100%; background: linear-gradient(90deg, var(--accent-strong), var(--green)); border-radius: 999px; transition: width .4s ease; }

.module-list { display: grid; gap: 14px; }
.module-card {
  display: flex; gap: 18px; align-items: center;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px; cursor: pointer;
  transition: all .15s ease;
}
.module-card:hover { background: var(--card-hover); border-color: var(--accent); }
.module-card.locked { opacity: .55; }
.module-card.locked:hover { border-color: var(--amber); }
.module-status {
  flex: 0 0 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  background: var(--bg);
}
.module-card .m-title { font-weight: 700; font-size: 16px; }
.module-card .m-sub { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.module-meta { margin-left: auto; text-align: right; font-size: 12px; color: var(--muted); white-space: nowrap; }

/* module view */
.module-view { max-width: 780px; margin: 0 auto; }
.back-link { display: inline-block; margin-bottom: 20px; color: var(--muted); font-size: 14px; cursor: pointer; }
.back-link:hover { color: var(--text); }

.md-content { font-size: 16px; }
.md-content h1 { font-size: 30px; margin: 10px 0 18px; letter-spacing: -0.02em; line-height: 1.2; }
.md-content h2 { font-size: 23px; margin: 36px 0 14px; }
.md-content h3 { font-size: 18px; margin: 26px 0 10px; }
.md-content p, .md-content ul, .md-content ol { margin-bottom: 14px; color: #cdd6ee; }
.md-content ul, .md-content ol { padding-left: 24px; }
.md-content li { margin-bottom: 6px; }
.md-content blockquote {
  border-left: 3px solid var(--accent); background: var(--bg-soft);
  padding: 12px 18px; border-radius: 0 8px 8px 0; margin-bottom: 14px; color: var(--muted);
}
.md-content code {
  background: #0d1330; border: 1px solid var(--border); border-radius: 5px;
  padding: 1.5px 6px; font-size: 13.5px; font-family: "SF Mono", ui-monospace, Menlo, monospace; color: #a5c0ff;
}
.md-content pre {
  background: #0d1330; border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 18px; overflow-x: auto; margin-bottom: 16px;
}
.md-content pre code { background: none; border: none; padding: 0; color: #c7d4f5; font-size: 13.5px; line-height: 1.55; }
.md-content table { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 14.5px; display: block; overflow-x: auto; }
.md-content th, .md-content td { border: 1px solid var(--border); padding: 9px 13px; text-align: left; }
.md-content th { background: var(--bg-soft); }
.md-content details {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 18px; margin-bottom: 16px;
}
.md-content summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.md-content hr { border: none; border-top: 1px solid var(--border); margin: 30px 0; }

/* quiz */
.quiz-box {
  margin-top: 50px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px;
}
.quiz-box h2 { font-size: 22px; margin-bottom: 6px; }
.quiz-box .quiz-sub { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.quiz-q { margin-bottom: 26px; }
.quiz-q .q-text { font-weight: 600; margin-bottom: 12px; font-size: 15.5px; }
.quiz-opt {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 14px; border: 1px solid var(--border); border-radius: 9px;
  margin-bottom: 8px; cursor: pointer; font-size: 14.5px; color: #cdd6ee;
  transition: border-color .12s;
}
.quiz-opt:hover { border-color: var(--accent); }
.quiz-opt input { margin-top: 3px; accent-color: var(--accent-strong); }
.quiz-opt.correct { border-color: var(--green); background: rgba(52,211,153,.08); }
.quiz-opt.wrong { border-color: var(--red); background: rgba(248,113,113,.08); }
.quiz-explanation {
  font-size: 13.5px; color: var(--muted); background: var(--bg-soft);
  border-radius: 8px; padding: 10px 14px; margin-top: 8px;
}
.quiz-result {
  padding: 18px 22px; border-radius: 10px; margin-top: 10px; font-weight: 600;
}
.quiz-result.pass { background: rgba(52,211,153,.1); color: var(--green); }
.quiz-result.fail { background: rgba(248,113,113,.1); color: var(--red); }

/* paywall */
.paywall {
  max-width: 560px; margin: 40px auto; text-align: center;
  background: var(--card); border: 1px solid var(--amber); border-radius: var(--radius); padding: 44px 36px;
}
.paywall .lock { font-size: 44px; margin-bottom: 16px; }
.paywall h2 { margin-bottom: 10px; }
.paywall p { color: var(--muted); margin-bottom: 24px; }
.paywall .price-line { font-size: 30px; font-weight: 800; margin-bottom: 20px; }
.paywall .price-line small { font-size: 15px; color: var(--muted); font-weight: 500; }

/* certificate */
.certificate {
  max-width: 720px; margin: 30px auto; background: #fdfbf5; color: #1a1a2e;
  border-radius: 8px; padding: 60px 56px; text-align: center;
  border: 10px double #b39237;
}
.certificate .c-title { font-size: 13px; letter-spacing: .35em; text-transform: uppercase; color: #b39237; font-weight: 700; }
.certificate h1 { font-size: 34px; margin: 18px 0 8px; letter-spacing: -0.01em; }
.certificate .c-name { font-size: 30px; font-weight: 800; margin: 26px 0 8px; color: #14143c; }
.certificate .c-text { font-size: 15px; color: #44445c; max-width: 480px; margin: 0 auto 26px; line-height: 1.6; }
.certificate .c-meta { display: flex; justify-content: space-between; margin-top: 44px; font-size: 12.5px; color: #77778c; }
@media print {
  body * { visibility: hidden; }
  .certificate, .certificate * { visibility: visible; }
  .certificate { position: absolute; left: 0; top: 0; width: 100%; border-color: #b39237; }
}

/* ================= админка ================= */
.admin-shell { max-width: 1080px; margin: 0 auto; padding: 40px 24px 80px; }
.admin-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 10px; }
.admin-header h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 28px; }
.admin-stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.admin-stat .n { font-size: 28px; font-weight: 800; }
.admin-stat .l { font-size: 13px; color: var(--muted); margin-top: 4px; }
.admin-table-wrap { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th {
  text-align: left; padding: 12px 16px; background: var(--bg-soft); color: var(--muted);
  font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--card-hover); }
.admin-empty { padding: 40px; text-align: center; color: var(--muted); }
.admin-search { width: 100%; max-width: 320px; padding: 10px 14px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 14px; margin-bottom: 16px; }
.admin-search:focus { outline: none; border-color: var(--accent); }

/* переключатель языка */
.lang-switch {
  display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.lang-switch button {
  padding: 6px 12px; border: none; background: transparent; color: var(--muted);
  font-size: 12.5px; font-weight: 700; cursor: pointer; letter-spacing: .03em;
}
.lang-switch button + button { border-left: 1px solid var(--border); }
.lang-switch button.active { background: var(--accent-strong); color: #fff; }
.lang-switch button:not(.active):hover { color: var(--text); }

/* section tabs */
.section-tabs { display: flex; flex-wrap: wrap; gap: 10px; row-gap: 8px; margin-bottom: 26px; }
.section-tabs button {
  padding: 10px 22px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); color: var(--muted); font-weight: 700; font-size: 14.5px; cursor: pointer;
  transition: all .12s;
}
.section-tabs button:hover { border-color: var(--accent); color: var(--text); }
.section-tabs button.active { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }

/* interview */
.track-card:hover { border-color: var(--accent); background: var(--card-hover); }
.track-card.locked { opacity: .6; }
.advice {
  border-left: 3px solid var(--amber); background: rgba(251,191,36,.06);
  padding: 14px 18px; border-radius: 0 10px 10px 0; color: #d8dced; font-size: 14.5px;
}
.iq-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 26px; margin-bottom: 16px;
}
.iq-q { font-weight: 600; font-size: 15.5px; margin-bottom: 14px; line-height: 1.5; }
.iq-num {
  display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 8px;
}
.iq-a {
  margin-top: 14px; padding: 16px 18px; border-radius: 10px;
  background: var(--bg-soft); border: 1px solid var(--border);
  color: #cdd6ee; font-size: 14.5px; line-height: 1.65;
}

/* визуализации в модулях */
.md-content figure.viz {
  margin: 22px 0; padding: 18px 16px 12px;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px;
}
.md-content figure.viz svg { width: 100%; height: auto; display: block; }
.md-content figure.viz figcaption {
  margin-top: 10px; font-size: 13px; color: var(--muted); text-align: center; line-height: 1.5;
}

/* ================= промо-ролик ================= */
.promo-player {
  position: relative; max-width: 860px; margin: 0 auto;
  aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden;
  background: radial-gradient(120% 140% at 20% 0%, #131a36 0%, var(--bg-soft) 55%, #0d1330 100%);
  border: 1px solid var(--border); box-shadow: 0 20px 60px rgba(0,0,0,.45);
  user-select: none;
}
.promo-stage { position: absolute; inset: 0 0 46px 0; cursor: pointer; }
.promo-scene { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 4% 6% 42px; }
.promo-caption {
  position: absolute; left: 0; right: 0; bottom: 46px; text-align: center;
  padding: 8px 16px; font-size: clamp(12px, 1.8vw, 15px); color: #cdd6ee;
  background: linear-gradient(transparent, rgba(11,16,32,.85));
  pointer-events: none;
}
.promo-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 46px;
  display: flex; align-items: center; gap: 14px; padding: 0 16px;
  background: rgba(11,16,32,.9); border-top: 1px solid var(--border);
}
.promo-track { flex: 1; height: 6px; border-radius: 999px; background: var(--bg); overflow: hidden; cursor: pointer; }
.promo-progress { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-strong), var(--green)); border-radius: 999px; }
.promo-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.promo-mute {
  border: 1px solid var(--border); background: transparent; border-radius: 8px;
  padding: 4px 9px; font-size: 14px; cursor: pointer; line-height: 1;
  transition: border-color .12s;
}
.promo-mute:hover { border-color: var(--accent); }
.promo-overlay {
  position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center;
  background: rgba(11,16,32,.55); backdrop-filter: blur(3px); cursor: pointer;
  transition: opacity .25s ease;
}
.promo-overlay.hidden { opacity: 0; pointer-events: none; }
.promo-overlay-btn {
  padding: 16px 34px; border-radius: 999px; border: none; cursor: pointer;
  background: var(--accent-strong); color: #fff; font-size: clamp(15px, 2.2vw, 19px); font-weight: 700;
  box-shadow: 0 10px 40px rgba(79,110,247,.5); animation: promoPulse 2.2s ease-in-out infinite;
}
@keyframes promoPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }


/* Пауза должна оставлять кадр читаемым: анимации замирают, ничего не затемняется. */
.promo-stage.frozen * { animation-play-state: paused !important; }
/* Раскрытая сцена: переход по главам на паузе показывает всё сразу. */
.promo-scene.revealed * { animation: none !important; opacity: 1 !important; transform: none !important; }
.promo-scene.revealed .sc-cert-row { display: none; }

.promo-paused-chip {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 4;
  padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: rgba(11,16,32,.82); border: 1px solid var(--border); color: var(--muted);
  pointer-events: none;
}
.promo-nav {
  flex: none; border: 1px solid var(--border); background: transparent; color: var(--muted);
  border-radius: 8px; padding: 4px 9px; font-size: 13px; line-height: 1; cursor: pointer;
  transition: border-color .12s, color .12s;
}
.promo-nav:hover { border-color: var(--accent); color: var(--text); }

.promo-chapters {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px;
  max-width: 860px; margin: 12px auto 0;
}
.promo-chapters-lbl { color: var(--muted); font-size: 12px; margin-right: 4px; }
.promo-chapter {
  width: 26px; height: 26px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--border); background: var(--card);
  color: var(--muted); font-size: 12px; font-weight: 700; transition: all .12s;
}
.promo-chapter:hover { border-color: var(--accent); color: var(--text); }
.promo-chapter.current { border-color: var(--accent); background: var(--accent); color: #fff; }

/* появление элементов сцен */
@keyframes scIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes scPop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }

/* сцены 1 и 6: крупные строки */
.sc-hook { text-align: center; }
.sc-hook-line {
  font-size: clamp(20px, 4.2vw, 40px); font-weight: 800; letter-spacing: -0.02em;
  line-height: 1.25; opacity: 0; animation: scIn .7s ease forwards;
}
.sc-hook-line:nth-child(2) { color: var(--accent); }
.sc-hook-line:nth-child(3) { font-size: clamp(15px, 2.6vw, 24px); color: var(--muted); font-weight: 600; margin-top: 14px; }
/* сцена 6: вторая строка — обещание результата, поэтому зелёная, а не акцентная */
.sc-out .sc-hook-line:nth-child(2) { color: var(--green); margin-top: 16px; }

/* общая колонка для сцен-треков (2, 3, 4) */
.sc-track { width: min(620px, 94%); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.sc-task {
  width: 100%; padding: 9px 14px; border-radius: 10px; text-align: center;
  background: var(--card); border: 1px solid var(--border); color: #dde3f5;
  font-size: clamp(11.5px, 1.8vw, 14px); font-weight: 600; line-height: 1.4;
  opacity: 0; animation: scIn .5s ease forwards;
}
.sc-task.accent { border-color: var(--accent); }
.sc-result {
  width: 100%; padding: 10px 14px; border-radius: 9px; text-align: center;
  background: rgba(52,211,153,.12); border: 1px solid var(--green); color: #a7e6cd;
  font-size: clamp(11.5px, 1.8vw, 14px); font-weight: 600; line-height: 1.4;
  opacity: 0; animation: scPop .5s ease forwards;
}

/* сцена 3: лог работы агента — видно, как гейт останавливает вызов */
.sc-log { display: flex; flex-direction: column; gap: 7px; width: 100%; }
.sc-log-row {
  display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap;
  padding: 9px 12px; border-radius: 9px;
  background: var(--card); border: 1px solid var(--border);
  font-size: clamp(10.5px, 1.6vw, 13px);
  opacity: 0; animation: scIn .45s ease forwards;
}
.sc-log-row.ok { border-left: 3px solid var(--green); }
.sc-log-row.block { border-left: 3px solid var(--red); background: rgba(248,113,113,.08); }
.sc-log-mark { flex: none; font-size: 12px; }
.sc-log-row.ok .sc-log-mark { color: var(--green); }
.sc-log-row.block .sc-log-mark { color: var(--red); }
.sc-log-call { font-family: "SF Mono", ui-monospace, Menlo, monospace; color: #c7d4f5; }
.sc-log-res { color: var(--muted); }
.sc-log-row.block .sc-log-res { color: #f8a5a5; font-weight: 600; }

/* сцена 4: панель экзамена — таймер идёт, балл растёт, полосы заполняются */
.sc-exam-head { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 10px; }
.sc-exam-q { font-size: clamp(11px, 1.7vw, 13.5px); color: var(--muted); }
.sc-exam-q b { color: var(--text); }
.sc-exam-clock {
  font-variant-numeric: tabular-nums; font-weight: 700; font-size: clamp(12px, 1.9vw, 15px);
  padding: 4px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--card);
}
.sc-exam-dots { display: flex; flex-wrap: wrap; gap: 3px; width: 100%; }
.sc-exam-dots i { width: 9px; height: 9px; border-radius: 2px; background: var(--bg); border: 1px solid var(--border); }
.sc-exam-dots i.done { background: var(--green); border-color: var(--green); }
.sc-exam-score { display: flex; align-items: baseline; gap: 10px; }
.sc-exam-score-num {
  font-size: clamp(24px, 4.4vw, 40px); font-weight: 800; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; color: var(--amber);
}
.sc-exam-score-num.pass { color: var(--green); }
.sc-exam-score-lbl { color: var(--muted); font-size: clamp(10.5px, 1.6vw, 13px); }
.sc-exam-domains { display: flex; flex-direction: column; gap: 5px; width: 100%; }
.sc-exam-row { display: flex; align-items: center; gap: 9px; }
.sc-exam-dname { flex: 1 1 140px; font-size: clamp(10px, 1.5vw, 12.5px); color: #dde3f5; }
.sc-exam-dbar { flex: 2 1 120px; height: 8px; border-radius: 5px; background: rgba(147,160,196,.16); overflow: hidden; }
.sc-exam-dbar i { display: block; height: 100%; width: 0; background: var(--green); border-radius: 5px; }
.sc-exam-dbar i.weak { background: var(--red); }
.sc-exam-dnum { flex: none; width: 40px; text-align: right; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* сцена 2: задача и код */
.sc-code { width: min(600px, 94%); background: #0d1330; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; font-family: "SF Mono", ui-monospace, Menlo, monospace; }
.sc-code-head { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.sc-code-head .dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.r { background: #f87171; } .dot.y { background: #fbbf24; } .dot.g { background: #34d399; }
.sc-code-title { margin-left: 8px; font-size: 12px; color: var(--muted); font-family: var(--font); }
.sc-code-line {
  padding: 6px 14px; font-size: clamp(11px, 1.7vw, 13.5px); color: #c7d4f5; white-space: pre;
  opacity: 0; animation: scIn .4s ease forwards;
}
.sc-code-line .ln { color: #3d4a7a; margin-right: 14px; }

/* сцена 5: интервью */
.sc-iv { width: min(560px, 92%); }
.sc-iv-q, .sc-iv-think, .sc-iv-a {
  border-radius: 12px; padding: 14px 18px; margin-bottom: 12px;
  font-size: clamp(12.5px, 2vw, 15.5px); opacity: 0; animation: scIn .5s ease forwards;
}
.sc-iv-q { background: var(--card); border: 1px solid var(--accent); font-weight: 700; }
.sc-iv-think { background: transparent; color: var(--muted); border: 1px dashed var(--border); }
.sc-iv-a { background: rgba(52,211,153,.1); border: 1px solid #34d399; color: #cfeee0; }
.sc-iv-note {
  text-align: center; color: var(--muted); font-size: clamp(11.5px, 1.8vw, 14px); font-weight: 600;
  opacity: 0; animation: scIn .5s ease forwards;
}

/* сцена 7: сертификаты + CTA */
.sc-cert { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
/* Уход всей группы — одной анимацией на контейнере: карточки тогда отвечают
   только за своё появление, и порядок их задержек ни с чем не пересекается. */
.sc-cert-row {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; width: 100%; padding: 0 4%;
  animation: scCertOut .7s ease forwards 4s;
}
.sc-cert-card {
  flex: 0 1 auto; max-width: 210px; opacity: 0;
  background: #fdfbf5; color: #1a1a2e; border: 4px double #b39237; border-radius: 8px;
  padding: 14px 16px; text-align: center;
  animation: scPop .55s ease forwards;
}
@keyframes scCertOut { to { opacity: 0; transform: scale(.85) translateY(-16px); } }
.sc-cert-eyebrow { font-size: clamp(8px, 1.2vw, 11px); letter-spacing: .3em; color: #b39237; font-weight: 700; }
.sc-cert-track { font-size: clamp(11px, 1.8vw, 15px); color: #1a1a2e; font-weight: 700; margin-top: 8px; }
.sc-final { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; opacity: 0; animation: scIn .8s ease forwards; text-align: center; padding: 0 6%; }
.sc-final-title { font-size: clamp(20px, 3.6vw, 34px); font-weight: 800; letter-spacing: -0.02em; }
.sc-final-sub { color: var(--muted); font-size: clamp(12px, 2vw, 16px); }
.sc-final-cta { animation: promoPulse 2s ease-in-out infinite; }

/* На узком экране 16:9 даёт сцену всего ~163px высотой — в неё не помещается
   ни одна многострочная сцена. Отдаём плееру больше высоты вместо обрезки текста. */
@media (max-width: 640px) {
  .promo-player { aspect-ratio: 4 / 3; min-height: 340px; }
  /* На узком экране уплотняем сцены: иначе текст заходит под подпись. */
  .promo-scene { padding: 10px 12px 40px; }
  .sc-track { gap: 8px; }
  .sc-task, .sc-result { padding: 7px 10px; line-height: 1.3; }
  /* заголовок редактора с «светофором» — украшение; на мобильном отдаём его высоту тексту */
  .sc-code-head { display: none; }
  .sc-code-line { padding: 4px 12px; }
  .sc-insight { margin: 8px 12px 12px; padding: 8px 12px; }
  .sc-arch { gap: 6px; }
  .sc-arch-tile { min-width: 104px; padding: 8px 9px; }
  .sc-agents { gap: 5px 6px; }
  .sc-agent-node { padding: 6px 10px; }
  .sc-iv-intro { margin-bottom: 9px; }
  .sc-iv-q, .sc-iv-think, .sc-iv-a { padding: 9px 12px; margin-bottom: 8px; }
  .sc-cert-row { gap: 8px; }
  .sc-cert-card { padding: 10px 12px; }
  .sc-final { gap: 8px; }
  .sc-log { gap: 5px; }
  .sc-log-row { padding: 6px 9px; gap: 5px; line-height: 1.25; }
  .sc-exam-head { gap: 6px; }
  .sc-exam-score-num { font-size: clamp(20px, 4vw, 30px); }
  .sc-exam-dots i { width: 7px; height: 7px; }
  .sc-exam-domains { gap: 3px; }
  .sc-exam-dname { flex-basis: 96px; }
  .promo-chapter { width: 23px; height: 23px; font-size: 11px; }
}

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--card); border: 1px solid var(--accent); color: var(--text);
  padding: 12px 22px; border-radius: 10px; font-size: 14px; z-index: 100;
  box-shadow: 0 8px 30px rgba(0,0,0,.4);
}

/* ---------- маркетинговая панель ---------- */
.mk-tabs { display: flex; gap: 8px; margin: 18px 0 22px; flex-wrap: wrap; }
.mk-tabs button {
  background: var(--card); color: var(--muted); border: 1px solid var(--border);
  padding: 9px 18px; border-radius: 10px; cursor: pointer; font-size: 14px;
}
.mk-tabs button.active { color: var(--text); border-color: var(--accent); background: var(--card-hover); }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.mk-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.mk-card-media { position: relative; background: var(--bg-soft); }
.mk-card-media img { width: 100%; display: block; aspect-ratio: 1; object-fit: cover; }
.mk-reel {
  position: absolute; top: 10px; right: 10px; background: rgba(11,16,32,.85);
  border: 1px solid var(--border); padding: 3px 10px; border-radius: 8px; font-size: 12px;
}
.mk-card-body { padding: 14px; }
.mk-card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.mk-rubric { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.mk-badges { margin-left: auto; display: flex; gap: 4px; }
.mk-net { font-size: 13px; opacity: .35; }
.mk-net.ok { opacity: 1; }
.mk-date { color: var(--muted); font-size: 13px; }
.mk-text { color: var(--muted); font-size: 13px; line-height: 1.5; margin-bottom: 10px; white-space: pre-line; }
.mk-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mk-actions .btn { padding: 8px 14px; font-size: 13px; }
.mk-panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.mk-panel h2 { font-size: 18px; margin-bottom: 12px; }
.mk-form label { display: block; margin: 10px 0 4px; font-size: 14px; color: var(--muted); }
.mk-form input[type="text"], .mk-form input[type="password"], .mk-form input[type="number"],
.mk-form input[type="date"], .mk-form select, .mk-form textarea {
  width: 100%; background: var(--bg-soft); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 12px; font-size: 14px; font-family: inherit;
}
.mk-form input[type="checkbox"] { width: auto; margin-right: 8px; }
.mk-row { display: flex; gap: 14px; }
.mk-row label { flex: 1; }
.mk-muted { color: var(--muted); font-size: 13px; margin: 8px 0; }
.mk-muted code { background: var(--bg-soft); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.mk-editor { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 6px; }
.mk-net-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mk-net-head h2 { margin-bottom: 0; }
.mk-job {
  background: var(--card); border: 1px solid var(--accent); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 16px;
}
.mk-job pre { color: var(--muted); font-size: 12px; margin-top: 8px; white-space: pre-wrap; max-height: 130px; overflow: auto; }
.mk-spin { display: inline-block; animation: mkspin 1.6s linear infinite; }
@keyframes mkspin { to { transform: rotate(360deg); } }
.mk-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--card); border: 1px solid var(--green); color: var(--text);
  padding: 12px 22px; border-radius: 10px; font-size: 14px; z-index: 100;
}
.mk-toast.err { border-color: var(--red); }

/* ---------------------------------------------------------- пробный экзамен */
.exam-bar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.exam-progress { color: var(--muted); font-size: 14px; }
.exam-clock {
  font-variant-numeric: tabular-nums; font-weight: 700; font-size: 16px;
  padding: 6px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card);
}
.exam-clock.urgent { color: #f87171; border-color: #f87171; }

.exam-grid {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px;
}
.exam-dot {
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border); background: var(--card);
  color: var(--muted); font-size: 12px; font-weight: 700;
  transition: all .12s;
}
.exam-dot.done { border-color: #34d399; color: #34d399; }
.exam-dot.current { border-color: var(--accent); color: #fff; background: var(--accent); }

.exam-scenario {
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 18px; background: var(--card);
}
.exam-scenario b { font-size: 14.5px; }
.exam-scenario p { color: var(--muted); font-size: 13.5px; margin: 6px 0 0; line-height: 1.55; }

.exam-question { margin-bottom: 20px; }
.exam-meta { color: var(--muted); font-size: 12.5px; margin-bottom: 8px; }
.exam-question h3 { font-size: 17px; line-height: 1.5; margin: 0 0 16px; }
.exam-options { display: flex; flex-direction: column; gap: 10px; }
.exam-option {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
  background: var(--card); font-size: 14.5px; line-height: 1.5; transition: all .12s;
}
.exam-option:hover { border-color: var(--accent); }
.exam-option.chosen { border-color: var(--accent); background: rgba(108, 140, 255, .10); }
.exam-option input { margin-top: 3px; flex: none; }

.exam-nav { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.exam-nav .btn-primary { margin-left: auto; }

.exam-result {
  border: 1px solid var(--border); border-radius: 14px; padding: 26px;
  text-align: center; background: var(--card);
}
.exam-result.pass { border-color: #34d399; }
.exam-result.fail { border-color: #fbbf24; }
.exam-verdict { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.exam-result.pass .exam-verdict { color: #34d399; }
.exam-result.fail .exam-verdict { color: #fbbf24; }
.exam-score { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.exam-raw { color: var(--muted); font-size: 14px; margin-top: 6px; }

.exam-domains { display: flex; flex-direction: column; gap: 8px; }
.exam-domain-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.exam-domain-name { flex: 1 1 200px; font-size: 13.5px; }
.exam-domain-bar {
  flex: 2 1 180px; height: 10px; border-radius: 6px;
  background: rgba(147, 160, 196, .16); overflow: hidden;
}
.exam-domain-bar > div { height: 100%; background: #34d399; border-radius: 6px; }
.exam-domain-bar > div.weak { background: #f87171; }
.exam-domain-num { flex: none; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.exam-domain-num span { color: var(--muted); font-weight: 400; }
.exam-domain-hint { color: var(--muted); font-size: 12.5px; margin: -2px 0 6px; }

.exam-review { display: flex; flex-direction: column; gap: 12px; }
.exam-review-item {
  border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; background: var(--card);
}
.exam-review-item.ok { border-left: 3px solid #34d399; }
.exam-review-item.bad { border-left: 3px solid #f87171; }
.exam-review-q { font-size: 14.5px; font-weight: 600; line-height: 1.5; margin-bottom: 10px; }
.exam-review-item ul { list-style: none; padding: 0; margin: 0 0 10px; }
.exam-review-item li {
  font-size: 13.5px; line-height: 1.5; color: var(--muted); padding: 3px 0;
}
.exam-review-item li.right { color: #34d399; }
.exam-review-item li.wrong { color: #f87171; }
.exam-review-note { color: var(--muted); font-size: 13px; line-height: 1.55; }

@media (max-width: 640px) {
  .exam-dot { width: 26px; height: 26px; font-size: 11px; }
  .exam-nav .btn-primary { margin-left: 0; width: 100%; }
}

/* колонки треков в админке */
.trk-done { color: #34d399; font-weight: 700; }
.exam-badge {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 6px;
  font-size: 11px; font-weight: 700; border: 1px solid #fbbf24; color: #fbbf24;
}
.exam-badge.ok { border-color: #34d399; color: #34d399; }

/* витрина платной части на публичной странице урока
   (класс .paywall уже занят в приложении и центрирует содержимое) */
.lesson-paywall { border: 1px solid var(--accent); }
.lesson-paywall h3 { font-size: 19px; margin-bottom: 12px; }
.lesson-paywall ul { padding-left: 22px; margin: 0; color: var(--muted); font-size: 15px; }
.lesson-paywall li { margin-bottom: 6px; }
