/* ═══════════════════════════════════════════════════════════════
   Mini App ОГЭ по математике — каркас со стилей бота Макса Кораблева,
   палитра и фон по концепции Данира: белый и холодный светло-голубой
   фон, насыщенно-синие основные кнопки, второстепенные — белые с синей
   обводкой, ненавязчивый математический паттерн на фоне.
   Классы .station-* достались от эмулятора станции КЕГЭ и рисуют бланк
   пробного варианта. Всю палитру держим в токенах :root.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --st-bg:        #f1f6fd;   /* фон страницы */
  --st-surface:   #ffffff;   /* карточки, поля */
  --st-head:      #123a8f;   /* тёмно-синяя шапка */
  --st-text:      #10203a;
  --st-link:      #1d4ed8;
  --st-accent:    #2563eb;   /* главная кнопка */
  --st-accent-dk: #1d4ed8;
  --st-line:      #cfe0f7;
  --st-radius:    14px;

  /* старые имена токенов — на них завязана вся разметка ниже */
  --accent:       #2563eb;
  --accent-soft:  #1d4ed8;
  --accent-deep:  #123a8f;
  --accent-glow:  rgba(37, 99, 235, .18);
  --cyan:         #2563eb;
  --violet:       #6d28d9;
  --ok:           #16a34a;
  --bad:          #dc2626;
  --warn:         #f59e0b;

  --bg:           #f1f6fd;
  --bg-2:         #e4eefb;
  --card:         #ffffff;
  --card-2:       #f5f9ff;
  --line:         #cfe0f7;
  --line-strong:  #9dbdea;

  --text:         #10203a;
  --text-dim:     #33415c;
  --text-mute:    #67748c;

  --radius:       14px;
  --radius-sm:    10px;
  --shadow:       0 2px 10px rgba(18, 58, 143, .07);
  --shadow-accent:0 6px 18px rgba(37, 99, 235, .22);

  --netbar-color: #2563eb;
  --netnote-bg:   #123a8f;
  --netnote-text: #ffffff;

  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  background: var(--bg);
  color: var(--text);
  /* Roboto без внешних запросов: если в системе нет — системный гротеск */
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body {
  min-height: 100vh;
  padding: calc(14px + var(--safe-top)) 14px calc(28px + var(--safe-bottom));
  position: relative;
  overflow-x: hidden;
}

/* ─────────────────────────── фон ───────────────────────────
   Математический паттерн из концепции: параболы, √x, координатные оси,
   треугольники, точки. Лежит прямо на body фоновой картинкой — так он не
   перекрывает контент и не создаёт лишних слоёв. Линии полупрозрачные:
   узор должен читаться, но не мешать тексту.
   SVG инлайном, без внешних запросов: в WebView Telegram они долетают не
   всегда, а фон нужен сразу. */

body {
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%3Cg fill='none' stroke='%232563eb' stroke-opacity='.10' stroke-width='1.6'%3E%3Cpath d='M18 128h96M52 166V70'/%3E%3Cpath d='M22 152q30-78 60 0'/%3E%3Cpath d='M150 36h70M150 36l35 54 35-54'/%3E%3Cpath d='M164 214h74M182 214l20-34 20 34'/%3E%3Ccircle cx='128' cy='90' r='3'/%3E%3Ccircle cx='236' cy='128' r='3'/%3E%3Ccircle cx='96' cy='236' r='3'/%3E%3C/g%3E%3Cg fill='%232563eb' fill-opacity='.10' font-family='Georgia, serif' font-size='26' font-style='italic'%3E%3Ctext x='150' y='128'%3E%E2%88%9Ax%3C/text%3E%3Ctext x='24' y='226'%3Ex%C2%B2%3C/text%3E%3C/g%3E%3C/svg%3E");
  background-size: 260px 260px;
  background-attachment: fixed;
}

.bg-fx { display: none; }
.blob, .blob-1, .blob-2 { display: none; }
.bg-fx .grid { display: none; }

/* ─────────────────────────── экраны ─────────────────────────── */

.screen { display: none; animation: screen-in .22s ease; }
.screen.is-active { display: block; }

@keyframes screen-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hidden { display: none !important; }

/* ─────────────────────────── герой ─────────────────────────── */

.hero {
  text-align: center;
  background: var(--st-head);
  border-radius: var(--st-radius);
  color: #fff;
  padding: 22px 16px 20px;
  margin-bottom: 14px;
}

.hero-logo {
  width: 84px; height: 84px;
  margin: 0 auto 12px;
  display: grid; place-items: center;
  border-radius: var(--st-radius);
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
}
.hero-logo img { width: 60px; height: 60px; display: block; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(0); }
}

.hero-kicker {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: #fff;
  padding: 5px 12px;
  border: none;
  border-radius: var(--st-radius);
  background: rgba(255, 255, 255, .14);
  margin-bottom: 10px;
}

.hero-title {
  font-size: 28px; font-weight: 700; letter-spacing: -.01em; line-height: 1.1;
  color: #fff;
}

.hero-sub {
  margin-top: 8px;
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
  max-width: 330px; margin-inline: auto;
}

/* ─────────────────────────── статы ─────────────────────────── */

.stat-row {
  /* на телефоне — две колонки по две плитки, на широком экране — все четыре в ряд */
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px; margin-bottom: 14px;
}
.stat {
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  padding: 11px 6px;
  text-align: center;
}
.stat b { display: block; font-size: 20px; font-weight: 700; color: var(--st-head); }
.stat span { font-size: 11px; color: var(--text-mute); }

/* ─────────────────────────── кнопки-CTA ─────────────────────────── */

.cta {
  display: flex; align-items: center; gap: 13px; width: 100%;
  text-align: left; text-decoration: none;
  padding: 14px 15px;
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  background: var(--st-surface);
  color: var(--st-text);
  font-family: inherit; font-size: 15px;
  cursor: pointer;
  margin-bottom: 10px;
  transition: transform .12s ease, filter .15s ease;
}
.cta:active { transform: scale(.985); filter: brightness(.96); }

.cta-ico {
  font-size: 24px; line-height: 1;
  flex: 0 0 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: var(--st-radius);
  background: #eef2fa;
}
.cta-body { flex: 1; min-width: 0; }
.cta-body b { display: block; font-size: 15px; font-weight: 700; line-height: 1.25; }
.cta-body i {
  display: block; font-style: normal;
  font-size: 12.5px; color: var(--text-mute); margin-top: 3px;
}
.cta-arrow { font-size: 18px; color: var(--st-link); flex: 0 0 auto; }

/* Основные CTA — насыщенно-синие, как в концепции */
.cta-primary {
  background: var(--st-accent);
  border-color: var(--st-accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.cta-primary .cta-ico { background: rgba(255, 255, 255, .16); }
.cta-primary .cta-body b { color: #fff; }
.cta-primary .cta-body i { color: rgba(255, 255, 255, .8); }
.cta-primary .cta-arrow  { color: rgba(255, 255, 255, .75); }

.cta-accent {
  background: var(--st-head);
  border-color: var(--st-head);
  color: #fff;
}
.cta-accent .cta-ico { background: rgba(255, 255, 255, .14); }
.cta-accent .cta-body i { color: rgba(255, 255, 255, .78); }
.cta-accent .cta-arrow  { color: rgba(255, 255, 255, .7); }

/* Второстепенные — белые с синей обводкой */
.cta-soft {
  background: var(--st-surface);
  border-color: var(--st-accent);
  color: var(--st-head);
}
.cta-soft .cta-ico { background: var(--bg-2); }
.cta-soft .cta-body b { color: var(--st-head); }

.cta-violet {
  background: var(--st-head);
  border-color: var(--st-head);
  color: #fff;
}
.cta-violet .cta-ico { background: rgba(255, 255, 255, .12); }
.cta-violet .cta-body i { color: rgba(255, 255, 255, .72); }
.cta-violet .cta-arrow  { color: rgba(255, 255, 255, .6); }

.cta-dark { background: var(--card-2); }
.cta-dark .cta-ico { background: #fff; border: 1px solid var(--st-line); }

.cta.big { padding: 16px; }

/* На станции ничего не пульсирует */
.pulse { animation: none; }
@keyframes pulse {
  0%, 100% { box-shadow: none; }
  50%      { box-shadow: none; }
}

.ghost {
  display: block; width: 100%;
  background: none; border: none;
  color: var(--st-link);
  font-family: inherit; font-size: 14px;
  padding: 12px; cursor: pointer;
}
.ghost:active { color: var(--st-head); }
.ghost-sm { padding: 8px; font-size: 13px; }

/* ─────────────────────────── плитки ─────────────────────────── */

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }

.tile {
  position: relative;
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  padding: 14px 13px;
  text-align: left;
  color: var(--st-text);
  font-family: inherit;
  cursor: pointer;
  transition: transform .12s ease, border-color .15s ease;
}
.tile:active { transform: scale(.98); border-color: var(--line-strong); }
.tile-ico { display: block; font-size: 22px; margin-bottom: 7px; }
.tile b { display: block; font-size: 14px; font-weight: 700; color: var(--st-head); }
.tile i {
  display: block; font-style: normal;
  font-size: 11.5px; color: var(--text-mute); margin-top: 4px; line-height: 1.35;
}
.tile-sm { padding: 13px; }

.footnote { text-align: center; font-size: 12.5px; color: var(--text-mute); margin-top: 16px; }

.result-chip {
  display: flex; align-items: center; gap: 12px;
  background: #eef2fa;
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  padding: 12px 14px; margin-bottom: 10px;
  font-size: 13.5px;
}
.result-chip b { color: var(--st-head); }

/* ─────────────────────────── топбар ─────────────────────────── */

.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }

.back {
  flex: 0 0 38px; width: 38px; height: 38px;
  border-radius: var(--st-radius);
  background: var(--st-surface); border: 1px solid var(--st-line);
  color: var(--st-link); font-size: 19px;
  cursor: pointer;
}
.back:active { transform: scale(.95); }

.topbar-title { font-size: 18px; font-weight: 700; color: var(--st-head); }

.section-lead { font-size: 13.5px; color: var(--text-dim); margin: 4px 0 12px; }

.block-title {
  font-size: 16px; font-weight: 700;
  margin: 24px 0 10px;
  color: var(--st-head);
}

/* ─────────────────────────── тест ─────────────────────────── */

.progress { flex: 1; display: flex; align-items: center; gap: 10px; }
.progress-bar {
  flex: 1; height: 7px;
  background: #d9e3f5;
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius); overflow: hidden;
}
.progress-bar i {
  display: block; height: 100%; width: 0;
  background: var(--st-accent);
  transition: width .35s ease;
}
#quiz-counter {
  font-size: 12.5px; font-weight: 700;
  color: var(--text-dim); font-variant-numeric: tabular-nums;
}

.quiz-card {
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  padding: 18px 16px;
  animation: card-in .22s ease;
}
.quiz-card.swap { animation: card-in .22s ease; }

@keyframes card-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.quiz-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.pill {
  font-size: 12px; font-weight: 700;
  color: #fff; background: var(--st-head);
  border-radius: var(--st-radius); padding: 3px 9px;
}
.quiz-topic {
  font-size: 12px; font-weight: 600;
  color: var(--text-mute); text-transform: uppercase; letter-spacing: .05em;
}

.retry-box {
  background: #fdf0f0;
  border: 1px solid #e8b9b9;
  border-radius: var(--st-radius);
  padding: 16px;
  margin-top: 14px;
  text-align: center;
}
.retry-box > b { display: block; font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.retry-box > i {
  display: block; font-style: normal;
  font-size: 13px; color: var(--text-dim); margin-bottom: 14px;
}
.retry-box .cta { margin-bottom: 0; }

.dots { display: flex; justify-content: center; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #c3cfe4;
  transition: all .2s ease;
}
.dot.done { background: var(--st-link); }
.dot.now  { background: var(--st-accent); transform: scale(1.5); }

/* ─────────────────────────── условие задачи ─────────────────────────── */

.task-body {
  font-size: 14.5px; line-height: 1.5; color: var(--st-text);
  /* условия приходят готовым HTML с сайта: длинные формулы и коды не должны
     распирать карточку за пределы экрана */
  overflow-wrap: anywhere;
  max-width: 100%;
}
.task-body p { margin-bottom: 10px; }
.task-body p:last-child { margin-bottom: 0; }
.task-body img {
  max-width: 100%; height: auto;
  display: block; margin: 12px 0;
  border-radius: 2px; background: #fff; padding: 4px;
  border: 1px solid var(--st-line);
}
/* таблицу истинности не ужать — пусть скроллится внутри карточки, а не страницей */
.task-body table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 13px;
  white-space: nowrap;
}
.task-body table td, .task-body table th {
  border: 1px solid #b9c4d8;
  padding: 5px 9px;
  text-align: center;
}
.task-body pre, .task-body code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
}
.task-body pre {
  background: #f4f7fd;
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  padding: 10px;
  overflow-x: auto;
  margin: 10px 0;
}
.task-body .tex {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--st-link);
}
/* Формулы из PDF-банка вырезаны картинками: .f стоит в строке текста,
   .fd — отдельной строкой. Рамка и подложка рисунка им не нужны. */
:is(.task-body, .station-condition, .solution) :is(img.f, img.fd) {
  margin: 0; padding: 0; border: 0; border-radius: 0;
  background: transparent; min-height: 0;
  max-width: 100%; height: auto;
}
:is(.task-body, .station-condition, .solution) img.f { display: inline-block; }
:is(.task-body, .station-condition, .solution) img.fd { display: block; margin: 4px auto; }
/* Таблица соответствия: определения длинные — пусть переносятся, а не скроллятся */
:is(.task-body, .station-condition) table.match {
  display: table; width: 100%; white-space: normal;
}
:is(.task-body, .station-condition) table.match :is(td, th) {
  text-align: left; vertical-align: top;
}

.task-card, .quiz-card { overflow: hidden; }

/* ─────────────────────────── поле ответа ─────────────────────────── */

.answer-row { display: flex; gap: 8px; margin-top: 15px; }
.answer-input {
  flex: 1; min-width: 0;
  background: #fff;
  border: 1px solid #9fb0cc;
  border-radius: var(--st-radius);
  padding: 12px 13px;
  color: var(--st-text);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 15px;
}
.answer-input:focus { outline: 2px solid var(--st-head); outline-offset: -1px; }
.answer-input::placeholder { color: #a9b4c8; font-family: inherit; }

.answer-btn {
  flex: 0 0 52px;
  border: none; border-radius: var(--st-radius);
  background: var(--st-accent);
  color: #00312e; font-size: 20px; font-weight: 700;
  cursor: pointer;
}
.answer-btn:active { transform: scale(.96); filter: brightness(.94); }

.verdict { font-size: 13.5px; font-weight: 700; margin-top: 10px; min-height: 0; }
.verdict.ok { color: var(--ok); }
.verdict.bad { color: var(--bad); }
.verdict.shown {
  color: var(--st-head);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  background: #eef2fa;
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius); padding: 10px 12px;
  white-space: pre-wrap; word-break: break-word;
}

/* ─────────────────────────── результат ─────────────────────────── */

.result-hero { text-align: center; margin-bottom: 10px; }

.score-ring { position: relative; width: 150px; height: 150px; margin: 6px auto 16px; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: #d9e3f5; stroke-width: 9; }
.ring-fg {
  fill: none; stroke: var(--st-accent); stroke-width: 9;
  stroke-linecap: butt;
  stroke-dasharray: 327; stroke-dashoffset: 327;
  transition: stroke-dashoffset 1.1s ease;
}
.score-inner { position: absolute; inset: 0; display: grid; place-content: center; }
.score-inner b {
  font-size: 44px; font-weight: 700; line-height: 1;
  color: var(--st-head); font-variant-numeric: tabular-nums;
}
.score-inner span { font-size: 12px; color: var(--text-mute); }

.result-kicker {
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-mute); margin-bottom: 4px;
}
.result-title {
  /* название уровня из концепции: «🚀 ЧЕТВЁРКА НА РАЗГОНЕ» */
  font-size: 22px; font-weight: 800;
  line-height: 1.25; margin-bottom: 16px;
  color: var(--st-head);
}

/* Цвет уровня: зелёный — сильный, оранжевый — средний, красный — самый
   низкий. Раскрашиваем только акценты, фон остаётся спокойным. */
#screen-result[data-level="A"] .result-title,
#screen-result[data-level="B"] .result-title { color: var(--ok); }
#screen-result[data-level="C"] .result-title,
#screen-result[data-level="D"] .result-title { color: #b45309; }
#screen-result[data-level="E"] .result-title { color: var(--bad); }
#screen-result[data-level="A"] .ring-fg,
#screen-result[data-level="B"] .ring-fg { stroke: var(--ok); }
#screen-result[data-level="C"] .ring-fg,
#screen-result[data-level="D"] .ring-fg { stroke: var(--warn); }
#screen-result[data-level="E"] .ring-fg { stroke: var(--bad); }

.ege-card {
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  padding: 15px 16px; margin-bottom: 12px;
}
.ege-label {
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--st-link); margin-bottom: 4px;
}
.ege-value { display: block; font-size: 26px; font-weight: 800; line-height: 1.15; color: var(--st-head); }
.ege-value span { font-size: 34px; }
.ege-value small { font-size: 17px; font-weight: 600; color: var(--text-mute); }
.ege-note { display: block; font-size: 13.5px; color: var(--text-dim); margin-top: 2px; }
.ege-scale {
  height: 6px; border-radius: var(--st-radius);
  background: #d9e3f5;
  margin-top: 12px; overflow: hidden;
}
.ege-scale i {
  display: block; height: 100%; width: 0;
  background: var(--st-accent);
  transition: width 1.1s ease .2s;
}

.tier-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.tier {
  position: relative;
  background: var(--st-surface); border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  padding: 12px 8px 14px;
  overflow: hidden;
}
.tier b { display: block; font-size: 18px; font-weight: 700; color: var(--st-head); }
.tier span { font-size: 11px; color: var(--text-mute); }
.tier i {
  position: absolute; left: 0; bottom: 0; height: 3px;
  background: var(--st-accent);
}

.result-verdict { font-size: 14.5px; color: var(--text-dim); text-align: left; margin-bottom: 12px; }

/* ─────────────────────────── план ─────────────────────────── */

.plan { display: grid; gap: 10px; }

.stage {
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  padding: 15px;
}
.stage-part2 { border-color: var(--line-strong); background: #f4f7fd; }

.stage-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.stage-num {
  flex: 0 0 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: var(--st-radius);
  background: var(--st-head); color: #fff;
  font-size: 13px; font-weight: 700;
}
.stage-head b { font-size: 15px; font-weight: 700; color: var(--st-head); }
.stage-lead { font-size: 13px; color: var(--text-dim); margin-bottom: 10px; }

.topic {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 10px 11px;
  background: #f8faff;
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  margin-top: 8px;
  cursor: pointer;
  transition: transform .12s ease, border-color .15s ease;
}
.topic:active { transform: scale(.99); border-color: var(--line-strong); }
/* Вторая часть (24–27) — только в плане, в тренажёре её нет: карточка не кликается. */
.topic-static { cursor: default; }
.topic-static:active { transform: none; border-color: var(--st-line); }
.topic-num {
  flex: 0 0 auto;
  font-size: 12px; font-weight: 700;
  color: #fff;
  background: var(--st-link);
  border-radius: var(--st-radius); padding: 3px 7px;
  margin-top: 1px;
}
.topic-body { flex: 1; min-width: 0; }
.topic-body b { display: block; font-size: 14px; font-weight: 700; }
.topic-body i {
  display: block; font-style: normal;
  font-size: 12px; color: var(--text-mute); margin-top: 3px; line-height: 1.4;
}
.topic-go { font-size: 15px; color: var(--st-link); }

.weeks { display: grid; gap: 8px; }
.week {
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-left: 4px solid var(--st-accent);
  border-radius: var(--st-radius);
  padding: 12px 14px;
}
.week-num {
  display: block;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--st-accent-dk); margin-bottom: 4px;
}
.week b { display: block; font-size: 14.5px; font-weight: 700; }
.week i {
  display: block; font-style: normal;
  font-size: 12.5px; color: var(--text-mute); margin-top: 4px;
}

.review { display: grid; gap: 8px; }
.review-row {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  padding: 11px 13px;
}
.review-row.bad { border-left: 4px solid #d63b3b; }
.review-mark { font-size: 15px; }
.review-body b { display: block; font-size: 13.5px; font-weight: 700; }
.review-body i {
  display: block; font-style: normal;
  font-size: 12px; color: var(--text-mute); margin-top: 2px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  word-break: break-word;
}

/* ─────────────────────────── тренажёр ─────────────────────────── */

.progress-card {
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  padding: 13px 15px; margin-bottom: 12px;
  font-size: 13px; color: var(--text-dim);
}
.progress-card b { color: var(--st-head); }
.progress-line {
  height: 6px; border-radius: var(--st-radius);
  background: #d9e3f5;
  margin-bottom: 9px; overflow: hidden;
}
.progress-line i {
  display: block; height: 100%;
  background: var(--st-accent);
}

.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.type-card {
  display: flex; flex-direction: column;
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  padding: 13px 12px;
  text-align: left;
  color: var(--st-text);
  font-family: inherit;
  cursor: pointer;
  transition: transform .12s ease, border-color .15s ease;
}
.type-card:active { transform: scale(.98); border-color: var(--line-strong); }
.type-card.locked { opacity: .62; }

/* Разделитель групп номеров в тренажёре: «Развёрнутый ответ» */
.type-sep {
  grid-column: 1 / -1;
  margin: 14px 0 2px;
}
.type-sep b { display: block; font-size: 13px; font-weight: 700; }
.type-sep span { display: block; font-size: 11px; color: var(--text-mute); margin-top: 3px; }

.type-num {
  display: inline-block; align-self: flex-start;
  font-size: 13px; font-weight: 700;
  color: #fff; background: var(--st-head);
  border-radius: var(--st-radius); padding: 2px 8px;
  margin-bottom: 8px;
}
.type-name { flex: 1; font-size: 13px; font-weight: 500; line-height: 1.35; }
.type-foot { display: block; margin-top: 10px; }
.type-count { display: block; font-size: 11px; color: var(--text-mute); margin-bottom: 5px; }
.type-bar {
  display: block; height: 4px; border-radius: var(--st-radius);
  background: #d9e3f5; overflow: hidden;
}
.type-bar i {
  display: block; height: 100%;
  background: var(--st-accent);
}
.type-lock { font-size: 12px; }

/* ─────────────────────────── список задач ─────────────────────────── */

.filters { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; }
.filter {
  flex: 0 0 auto;
  background: var(--st-surface); border: 1px solid var(--st-line);
  border-radius: var(--st-radius); padding: 7px 14px;
  color: var(--st-link);
  font-family: inherit; font-size: 12.5px; font-weight: 700;
  cursor: pointer;
}
.filter.active { background: var(--st-accent); border-color: var(--st-accent); color: #00312e; }

.task-list { display: grid; gap: 10px; }

/* Пока грузятся задачи номера — карточка гаснет и «дышит» */
.type-card.loading { opacity: .55; pointer-events: none; animation: type-load 1s ease-in-out infinite; }
@keyframes type-load { 0%, 100% { opacity: .55; } 50% { opacity: .8; } }

/* Метка конца списка: она же триггер подгрузки следующей пачки задач */
.task-sentinel {
  padding: 16px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-mute);
}

.task-card {
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  padding: 15px;
}
.task-card.solved { border-left: 4px solid var(--st-accent); }

.task-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.task-n { font-size: 12px; font-weight: 700; color: var(--st-head); }
/* Сюжет №1–5 над вопросами варианта */
.task-lead { margin: 18px 0 8px; padding-top: 14px; border-top: 2px solid var(--st-head); }
.task-lead:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.task-src {
  flex: 1;
  font-size: 11px; color: var(--text-mute);
  text-align: right;
}
.task-done { font-size: 13px; }

.task-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.file-link {
  background: #fff;
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  padding: 8px 12px;
  color: var(--st-link);
  font-family: inherit; font-size: 12.5px; font-weight: 700;
  cursor: pointer;
}

/* ─────────────────────────── списки ─────────────────────────── */

.list { display: grid; gap: 8px; }

.item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left; text-decoration: none;
  padding: 13px 14px;
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  color: var(--st-text);
  font-family: inherit;
  cursor: pointer;
  transition: transform .12s ease, border-color .15s ease;
}
.item:active { transform: scale(.99); }
.item.locked { opacity: .62; }

.item-ico {
  flex: 0 0 42px; height: 42px;
  display: grid; place-items: center;
  font-size: 21px;
  border-radius: var(--st-radius);
  background: #eef2fa;
}
.item.locked .item-ico { background: #f1f3f8; }

.item-body { flex: 1; min-width: 0; }
.item-body b { display: block; font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.item-body i {
  display: block; font-style: normal;
  font-size: 12px; color: var(--text-mute); margin-top: 3px;
}
.item-tag {
  display: inline-block;
  font-size: 9.5px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: #fff;
  background: var(--st-link);
  border-radius: var(--st-radius); padding: 2px 6px;
  margin-top: 6px;
}
.item-go { font-size: 17px; color: var(--st-link); }

/* ─────────────────────────── папка / курс / обо мне ─────────────────────────── */

.folder-hero, .course-hero {
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  padding: 22px 18px;
  text-align: center;
  margin-bottom: 20px;
}
.folder-ico { font-size: 42px; line-height: 1; margin-bottom: 12px; }
.folder-hero h2, .course-hero h2 {
  font-size: 20px; font-weight: 700;
  line-height: 1.25; margin-bottom: 12px;
  color: var(--st-head);
}
.folder-hero p, .course-hero p { font-size: 14px; color: var(--text-dim); margin-bottom: 14px; }

.perks { list-style: none; text-align: left; margin-bottom: 16px; }
.perks li { position: relative; padding-left: 26px; margin-bottom: 8px; font-size: 14px; }
.perks li::before {
  content: "✓";
  position: absolute; left: 0; top: 1px;
  width: 18px; height: 18px;
  display: grid; place-items: center;
  border-radius: var(--st-radius);
  background: var(--st-accent); color: #00312e;
  font-size: 11px; font-weight: 700;
}

.ribbon {
  display: inline-block;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  background: var(--st-head); color: #fff;
  padding: 5px 12px; border-radius: var(--st-radius);
  margin-bottom: 14px;
}
.hot { font-size: 13.5px !important; color: var(--st-accent-dk) !important; font-weight: 700; }

.promo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.promo {
  background: var(--st-surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--st-radius);
  padding: 13px 12px;
  text-align: center;
  cursor: pointer;
  transition: transform .12s ease;
}
.promo:active { transform: scale(.97); }
.promo b {
  display: block; font-size: 15px; font-weight: 700;
  color: var(--st-head); letter-spacing: .04em;
  font-family: ui-monospace, "SF Mono", monospace;
}
.promo span { display: block; font-size: 11px; color: var(--text-mute); margin-top: 4px; }

.about-card {
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  padding: 22px 18px; text-align: center;
  margin-bottom: 16px;
}
.about-logo { width: 74px; height: 74px; margin-bottom: 12px; }
.about-card h2 { font-size: 21px; font-weight: 700; margin-bottom: 12px; color: var(--st-head); }
.about-card p { font-size: 14.5px; color: var(--text-dim); white-space: pre-line; text-align: left; }

/* ─────────────────────────── шторка-гейт ─────────────────────────── */

.sheet-wrap {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(30, 50, 90, .55);
  display: none;
  align-items: flex-end;
}
.sheet-wrap.open { display: flex; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  width: 100%;
  background: var(--st-bg);
  border-top: 1px solid var(--st-line);
  border-radius: 8px 8px 0 0;
  padding: 12px 16px calc(22px + var(--safe-bottom));
  text-align: center;
  animation: sheet-up .28s ease;
  max-height: 92vh; overflow-y: auto;
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }

.sheet-grip {
  width: 40px; height: 4px; border-radius: var(--st-radius);
  background: #b7c3da;
  margin: 0 auto 18px;
}
.lock-ico { font-size: 38px; line-height: 1; margin-bottom: 12px; }
@keyframes shake {
  0%, 100% { transform: rotate(0); }
}
.sheet h2 { font-size: 21px; font-weight: 700; margin-bottom: 10px; color: var(--st-head); }
.sheet p { font-size: 14px; color: var(--text-dim); margin-bottom: 18px; }

/* ─────────────────────────── тост ─────────────────────────── */

.toast {
  position: fixed;
  left: 50%; bottom: calc(28px + var(--safe-bottom));
  transform: translate(-50%, 20px);
  z-index: 80;
  background: var(--st-head);
  color: #fff;
  border: none;
  border-radius: var(--st-radius);
  padding: 12px 18px;
  font-size: 13.5px; font-weight: 500;
  box-shadow: 0 4px 14px rgba(30, 50, 90, .3);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  max-width: calc(100vw - 40px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ─────────────────────────── бесплатное занятие ─────────────────────────── */

.lesson-card {
  position: relative;
  margin-bottom: 12px;
  padding: 15px;
  border-radius: var(--st-radius);
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-left: 4px solid var(--st-accent);
}

@keyframes lesson-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lesson-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.lesson-badge {
  font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: #fff;
  background: var(--st-head);
  border: none;
  border-radius: var(--st-radius);
  padding: 5px 11px;
}
.lesson-left {
  flex: 0 0 auto;
  font-size: 12px; font-weight: 700;
  color: var(--text-dim);
}
.lesson-title {
  font-size: 17px; font-weight: 700; line-height: 1.25;
  color: var(--st-head);
}
.lesson-when {
  margin-top: 6px;
  font-size: 13px; font-weight: 700;
  color: var(--st-accent-dk);
}
.lesson-desc {
  margin-top: 8px;
  font-size: 13.5px; line-height: 1.5;
  color: var(--text-dim);
}
.lesson-card .cta { margin-top: 14px; margin-bottom: 0; }
.lesson-card.is-signed { border-left-color: var(--st-line); }

.ghost-sm {
  margin-top: 6px;
  font-size: 12.5px;
  padding: 8px;
  min-height: 0;
}

/* ─────────────────────────── загрузка ─────────────────────────── */

.boot {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-content: center; justify-items: center; gap: 20px;
  background: var(--st-bg);
  transition: opacity .3s ease, visibility .3s ease;
}
body:not(.is-loading) .boot { opacity: 0; visibility: hidden; }

.boot-logo {
  width: 84px; height: 84px;
  display: grid; place-items: center;
  border-radius: var(--st-radius);
  background: var(--st-head);
}
.boot-logo img { width: 52px; height: 52px; }

.boot-bar {
  width: 132px; height: 3px;
  border-radius: var(--st-radius);
  background: #c9d4e8;
  overflow: hidden;
}
.boot-bar i {
  display: block; width: 40%; height: 100%;
  background: var(--st-accent);
  animation: boot-slide 1.1s ease-in-out infinite;
}
@keyframes boot-slide {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(260%); }
}

/* Пустой список во время загрузки — не пустое место, а заготовки строк. */
.list.is-loading:empty {
  display: grid; gap: 10px;
}
.list.is-loading:empty::before,
.list.is-loading:empty::after {
  content: "";
  height: 68px;
  border-radius: var(--st-radius);
  border: 1px solid var(--st-line);
  background: linear-gradient(100deg, #fff 30%, #eef2fa 50%, #fff 70%);
  background-size: 220% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer {
  from { background-position: 120% 0; }
  to   { background-position: -120% 0; }
}

/* ─────────────────────────── доступность ─────────────────────────── */

:focus-visible {
  outline: 2px solid var(--st-head);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Узкие экраны (iPhone SE и подобные): ужимаем крупную типографику. */
@media (max-width: 360px) {
  body { padding-inline: 10px; }
  .hero-title { font-size: 24px; }
  .hero-logo { width: 72px; height: 72px; }
  .hero-logo img { width: 50px; height: 50px; }
  .cta { padding: 12px; gap: 10px; }
  .cta-body b { font-size: 14px; }
  .cta-ico { width: 38px; height: 38px; font-size: 18px; flex-basis: 38px; }
  .lesson-title { font-size: 16px; }
}

@media (min-width: 560px) {
  body { max-width: 520px; margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Станция КЕГЭ — экран варианта (эмулятор kompege.ru).
   Стиль тот же, что и у всего приложения; блок ниже — исходный
   эталон, к которому приведено всё остальное.
   ═══════════════════════════════════════════════════════════════ */

/* ─────────────── витрина перед стартом ─────────────── */

.station-intro {
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  padding: 22px 18px;
  margin-bottom: 16px;
  text-align: center;
  color: var(--st-text);
}
.station-badge {
  display: inline-block;
  background: var(--st-head);
  color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 12px; border-radius: var(--st-radius);
  margin-bottom: 12px;
}
.station-intro h2 { font-size: 21px; line-height: 1.25; color: var(--st-head); }
.station-facts {
  list-style: none; text-align: left;
  margin: 16px 0; display: grid; gap: 9px;
}
.station-facts li {
  font-size: 14px; color: #3c4657;
  padding-left: 22px; position: relative;
}
.station-facts li::before {
  content: "▸"; position: absolute; left: 4px; color: var(--st-accent-dk);
}
.station-facts b { color: var(--st-head); }
.station-note { font-size: 12px; color: #6b7688; margin-top: 10px; }

.btn-station {
  background: var(--st-accent);
  color: #00312e;
  border: none; border-radius: var(--st-radius);
  font-family: inherit; font-size: 14px; font-weight: 700;
  padding: 11px 18px; cursor: pointer;
  transition: filter .15s ease, transform .12s ease;
}
.btn-station:active { transform: scale(.98); filter: brightness(.94); }
.btn-station.big { width: 100%; padding: 15px; font-size: 15.5px; }
.ghost-station {
  background: #eef2fa; color: var(--st-link);
  border: 1px solid var(--st-line);
}

/* ─────────────── сама станция ─────────────── */

.screen.station.is-active {
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column;
  background: var(--st-bg);
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--st-text);
  animation: none;
}

.station-head {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  background: var(--st-head);
  color: #fff;
  padding: calc(10px + var(--safe-top)) 14px 10px;
}
.station-exit {
  background: rgba(255,255,255,.14); border: none; color: #fff;
  width: 30px; height: 30px; border-radius: var(--st-radius);
  font-size: 15px; cursor: pointer;
}
.station-title { flex: 1; font-size: 14px; font-weight: 500; opacity: .9; }
.station-timer {
  font-variant-numeric: tabular-nums;
  font-size: 18px; font-weight: 700; letter-spacing: .02em;
  background: rgba(255,255,255,.12);
  padding: 5px 10px; border-radius: var(--st-radius);
}
.station-timer.warn { background: #ffb400; color: #3a2b00; }
.station-timer.danger { background: #ff3333; color: #fff; animation: tick 1s steps(2) infinite; }
@keyframes tick { 50% { opacity: .55; } }

.station-nav {
  flex: 0 0 auto;
  display: flex; gap: 5px; overflow-x: auto;
  background: #d9e3f5;
  padding: 8px 10px;
  border-bottom: 1px solid var(--st-line);
  scrollbar-width: none;
}
.station-nav::-webkit-scrollbar { display: none; }
.st-num {
  flex: 0 0 auto;
  min-width: 34px; height: 34px;
  border: 1px solid var(--st-line);
  background: #fff; color: var(--st-link);
  border-radius: var(--st-radius);
  font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; padding: 0 6px;
}
.st-num.answered { background: var(--st-accent); border-color: var(--st-accent); color: #00312e; }
.st-num.current { outline: 2px solid var(--st-head); outline-offset: 1px; }

.station-body {
  flex: 1 1 auto; overflow-y: auto;
  padding: 14px;
  -webkit-overflow-scrolling: touch;
}
.station-taskhead {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-bottom: 10px;
}
.station-num { font-size: 17px; font-weight: 700; color: var(--st-head); }
.station-src { font-size: 11.5px; color: #6b7688; text-align: right; }

.station-condition {
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  padding: 14px;
  font-size: 15px; line-height: 1.55;
  color: var(--st-text);
  overflow-x: auto;
}
.station-condition img { max-width: 100%; height: auto; border-radius: 2px; }
.station-condition table { border-collapse: collapse; margin: 8px 0; }
.station-condition td, .station-condition th { border: 1px solid #b9c4d8; padding: 3px 7px; }
.station-condition pre {
  background: #f4f7fd; border: 1px solid var(--st-line);
  padding: 8px; overflow-x: auto; font-size: 13px;
}

.station-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.station-file {
  background: #fff; border: 1px solid var(--st-line); border-radius: var(--st-radius);
  color: var(--st-link); font-family: inherit; font-size: 13px;
  padding: 8px 12px; cursor: pointer;
}

.station-answer { margin-top: 14px; }
.station-answer label {
  display: block; font-size: 12.5px; color: #6b7688; margin-bottom: 6px;
}
.st-input, .st-area {
  width: 100%;
  background: #fff; color: var(--st-text);
  border: 1px solid #9fb0cc; border-radius: var(--st-radius);
  font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: 16px;
  padding: 11px 12px;
}
.st-area { min-height: 110px; resize: vertical; line-height: 1.5; }
.st-parts { display: grid; gap: 8px; }
.st-part { display: flex; align-items: center; gap: 10px; }
.st-part span { flex: 0 0 46px; font-size: 13px; font-weight: 700; color: var(--st-head); }

.station-actions {
  display: flex; gap: 8px; margin-top: 16px;
}
.station-actions .btn-station { flex: 1; }

.station-foot {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--st-surface);
  border-top: 1px solid var(--st-line);
  padding: 10px 14px calc(10px + var(--safe-bottom));
  font-size: 13px; color: #6b7688;
}
.btn-finish {
  background: var(--st-accent-dk); color: #fff;
  border: none; border-radius: var(--st-radius);
  font-family: inherit; font-size: 13.5px; font-weight: 700;
  padding: 10px 16px; cursor: pointer;
}

/* ─────────────── результат варианта ─────────────── */

.score-card {
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  padding: 20px; margin-bottom: 16px; text-align: center;
  color: var(--st-text);
}
.score-main b { display: block; font-size: 46px; font-weight: 800; color: var(--st-head); line-height: 1; }
.score-main span { font-size: 13px; color: #6b7688; }
.score-sub {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--st-line);
  display: grid; gap: 4px; font-size: 13.5px; color: #3c4657;
}
.score-sub b { color: var(--st-head); }

.review-list { display: grid; gap: 8px; }
.review-item {
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-left: 4px solid #ff3333;
  border-radius: var(--st-radius);
  padding: 11px 13px;
  color: var(--st-text);
}
.review-item.ok { border-left-color: var(--st-accent); }
.review-top {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; font-weight: 700; color: var(--st-head);
}
.review-body { margin-top: 6px; font-size: 13px; color: #4a5566; display: grid; gap: 3px; }
.review-body code {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  background: #f1f5fc; padding: 1px 5px; border-radius: 3px;
  white-space: pre-wrap; word-break: break-word;
}

/* ─────────────── индикатор загрузки ─────────────── */

.netbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; z-index: 100;
  background: transparent;
  opacity: 0; transition: opacity .2s ease;
  pointer-events: none;
}
.netbar.on { opacity: 1; }
.netbar i {
  display: block; height: 100%; width: 40%;
  border-radius: 0 3px 3px 0;
  background: var(--netbar-color);
  animation: netbar-run 1.1s ease-in-out infinite;
}
@keyframes netbar-run {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(320%); }
}

.netnote {
  position: fixed; z-index: 100;
  top: calc(10px + var(--safe-top)); left: 50%;
  transform: translate(-50%, -12px);
  background: var(--netnote-bg); color: var(--netnote-text);
  border-radius: var(--st-radius);
  padding: 6px 14px;
  font-size: 12.5px; font-weight: 600;
  box-shadow: 0 4px 14px rgba(30, 50, 90, .3);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  max-width: calc(100vw - 32px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.netnote.on { opacity: 1; transform: translate(-50%, 0); }

/* Пока картинка задачи не пришла, на её месте не пустота, а подложка */
.station-condition img, .task-body img, .quiz-q img {
  background: #eef2fa;
  min-height: 20px;
}

.boot-note {
  font-size: 12.5px;
  color: var(--text-mute);
  text-align: center;
  min-height: 18px;
}

/* Приложение открыли по ссылке, без данных Telegram */
.nosession {
  position: fixed; inset: 0; z-index: 95;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(30, 50, 90, .5);
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.nosession.on { opacity: 1; pointer-events: auto; }
.nosession-card {
  background: var(--st-surface, #fff);
  border: 1px solid var(--st-line, #c9d4e8);
  border-radius: 8px;
  padding: 26px 20px 18px;
  max-width: 380px; text-align: center;
  box-shadow: 0 20px 50px -20px rgba(20, 35, 70, .6);
}
.nosession-ico { font-size: 38px; margin-bottom: 8px; }
.nosession-card h2 { font-size: 19px; color: var(--st-head, #1e325a); }
.nosession-card p {
  margin: 10px 0 18px;
  font-size: 14px; line-height: 1.55; color: #4a5566;
}
.nosession-card .btn-station { width: 100%; }

/* ─────────────── годовой курс на экране результата ─────────────── */

.course-block {
  background: var(--st-surface, #fff);
  border: 1px solid var(--st-line, #c9d4e8);
  border-radius: var(--radius, 8px);
  padding: 20px 16px;
  margin: 18px 0 12px;
  color: var(--st-text, #222);
}
.course-head { text-align: center; }
.course-badge {
  display: inline-block;
  background: #ffb400; color: #3a2b00;
  font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 5px 11px; border-radius: var(--st-radius, 4px);
  margin-bottom: 10px;
}
.course-block h2 { font-size: 20px; line-height: 1.2; color: var(--st-head, #1e325a); }
.course-sub { font-size: 12.5px; color: #6b7688; margin-top: 4px; }

.course-pitch {
  margin: 14px 0;
  font-size: 14.5px; line-height: 1.55;
  background: #eef3fb;
  border-left: 3px solid var(--st-accent, #00c3a2);
  border-radius: 0 var(--st-radius, 4px) var(--st-radius, 4px) 0;
  padding: 11px 13px;
}

.course-perks { list-style: none; display: grid; gap: 7px; margin: 12px 0; }
.course-perks li {
  position: relative; padding-left: 22px;
  font-size: 13.5px; line-height: 1.45; color: #3c4657;
}
.course-perks li::before {
  content: "✓"; position: absolute; left: 2px;
  color: var(--st-accent-dk, #004a46); font-weight: 800;
}
.course-bonus {
  background: rgba(0, 195, 162, .14);
  border: 1px dashed var(--st-accent, #00c3a2);
  border-radius: var(--st-radius, 4px);
  padding: 10px 12px; margin-bottom: 14px;
  font-size: 13.5px; font-weight: 700; color: var(--st-accent-dk, #004a46);
  text-align: center;
}

.course-tracks { display: flex; gap: 8px; margin-bottom: 10px; }
.course-track {
  flex: 1; padding: 10px 8px;
  border: 1px solid var(--st-line, #c9d4e8);
  border-radius: var(--st-radius, 4px);
  background: #fff; cursor: pointer;
  font-family: inherit; text-align: center; color: var(--st-link, #2a5885);
}
.course-track b { display: block; font-size: 14px; }
.course-track i { font-style: normal; font-size: 11.5px; color: #6b7688; }
.course-track.active {
  background: var(--st-head, #1e325a); border-color: var(--st-head, #1e325a); color: #fff;
}
.course-track.active i { color: rgba(255,255,255,.75); }
.course-goal { font-size: 13px; color: #6b7688; margin-bottom: 10px; text-align: center; }

.course-months { display: grid; gap: 6px; margin-bottom: 16px; }
.course-month {
  display: grid; grid-template-columns: 1fr auto;
  gap: 2px 10px;
  border: 1px solid var(--st-line, #c9d4e8);
  border-radius: var(--st-radius, 4px);
  padding: 9px 11px;
  background: #fff;
}
.course-month.accent { background: var(--st-head, #1e325a); border-color: var(--st-head, #1e325a); }
.course-month.accent b, .course-month.accent span, .course-month.accent i { color: #fff; }
.course-month.accent .cm-kim { background: rgba(255,255,255,.18); color: #fff; }
.course-month b { font-size: 13.5px; color: var(--st-head, #1e325a); }
/* Селектор с двумя классами — иначе правило .course-month span ниже
   перебивает по специфичности и уводит плашку на отдельную строку. */
.course-month .cm-kim {
  grid-column: 2; grid-row: 1; justify-self: end;
  font-size: 11px; font-weight: 800;
  background: rgba(30, 50, 90, .09); color: var(--st-head, #1e325a);
  border-radius: 999px; padding: 3px 8px; align-self: center;
}
.course-month span { grid-column: 1 / -1; font-size: 12.5px; color: #3c4657; }
.course-month i {
  grid-column: 1 / -1; font-style: normal;
  font-size: 11.5px; color: var(--st-link, #2a5885); font-weight: 600;
}


/* ───────────────── эфир: статус LIVE и ссылки на трансляцию ───────────────── */

.lesson-left.is-live {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e02b28;
  color: #fff;
  font-size: 11px; font-weight: 800;
  letter-spacing: .1em;
  animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224, 43, 40, .55); }
  50%      { box-shadow: 0 0 0 7px rgba(224, 43, 40, 0); }
}
.lesson-card.is-live { border-left-color: #e02b28; }

.lesson-links { display: grid; gap: 8px; margin-top: 12px; }
.stream-head {
  font-size: 11px; font-weight: 800;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-mute);
}
.stream-link {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.stream-link:active { transform: scale(.99); }
.stream-logo { flex: 0 0 auto; width: 22px; height: 22px; }
.stream-name { flex: 1 1 auto; font-size: 14px; font-weight: 700; }
.stream-go   { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--text-mute); }
.stream-youtube { border-color: rgba(255, 0, 0, .35); }
.stream-vk      { border-color: rgba(0, 119, 255, .35); }
.stream-link.is-locked { opacity: .78; border-style: dashed; }
.stream-link.is-locked .stream-logo { filter: grayscale(1); }
.stream-lock { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--text-mute); }

/* ─────────────────────────── разборы и вторая часть ─────────────────────────── */

/* Задача второй части в тренажёре: поля ответа нет, есть подсказка */
.task-note {
  margin-top: 12px;
  font-size: 12.5px; color: var(--text-mute);
}

/* Бланк варианта: вместо поля ответа у развёрнутых заданий */
.st-manual {
  display: grid; gap: 4px;
  background: #f4f7fd;
  border: 1px dashed var(--line-strong);
  border-radius: var(--st-radius);
  padding: 12px 13px;
  font-size: 13px; color: var(--text-dim);
}
.st-manual b { color: var(--st-head); font-size: 13.5px; }
/* номер второй части в полосе номеров — пунктиром: отвечать в поле не нужно */
.st-num.manual { border-style: dashed; }

.review-item.partial { border-left-color: #ffb400; }
.review-item.manual { border-left-color: var(--line-strong); }
.review-item .solution { margin-top: 6px; }
.review-solution summary {
  cursor: pointer;
  color: var(--st-link); font-weight: 700; font-size: 12.5px;
}

/* Разбор решения — не мельче условия: ради него задачу и открывают */
.solution-title {
  display: block; margin-bottom: 4px;
  font-size: 11px; font-weight: 800;
  letter-spacing: .07em; text-transform: uppercase;
  color: #0e8a63;
}
.solution p { margin-bottom: 8px; }
.solution p:last-child { margin-bottom: 0; }
.solution {
  margin-top: 10px;
  padding: 11px 12px;
  background: #f2fbf8;
  border: 1px solid #bfe8dd;
  border-radius: var(--st-radius);
  font-size: 13.5px; line-height: 1.5; color: var(--st-text);
}
.solution b { color: #0e8a63; }


/* ─────────────── экран результата: номера и нюанс по геометрии ─────────────── */

.result-nums {
  font-size: 13.5px; color: var(--text-dim);
  background: var(--card-2);
  border: 1px solid var(--st-line);
  border-radius: var(--radius-sm);
  padding: 10px 12px; margin-bottom: 12px;
  text-align: left;
}
.result-nums b { color: var(--st-head); }

.nuance {
  text-align: left;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-left: 4px solid var(--warn);
  border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 14px;
}
.nuance > b { display: block; font-size: 15px; color: #9a3412; margin-bottom: 4px; }
.nuance p { font-size: 13.5px; color: var(--text-dim); }
.nuance-go {
  margin-top: 10px; padding: 9px 14px;
  border: none; border-radius: var(--radius-sm);
  background: var(--warn); color: #3a2400;
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.nuance-go:active { transform: scale(.98); }

.result-support {
  font-size: 13.5px; color: var(--text-mute);
  margin-bottom: 14px; text-align: left;
}

/* ─────────────── материалы под уровень ─────────────── */

.level-box {
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-left: 4px solid var(--st-accent);
  border-radius: var(--radius-sm);
  padding: 13px 14px; margin-bottom: 12px;
}
.level-box > b { display: block; font-size: 15px; color: var(--st-head); }
.level-box p { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.level-hint {
  display: block; font-size: 12px; color: var(--text-mute);
  margin-top: 10px; margin-bottom: 6px;
}
.level-nums { display: flex; flex-wrap: wrap; gap: 6px; }
.level-num {
  border: 1px solid var(--st-accent); border-radius: var(--radius-sm);
  background: var(--bg-2); color: var(--st-head);
  font: inherit; font-size: 13px; font-weight: 700;
  padding: 6px 11px; cursor: pointer;
}
.level-num:active { transform: scale(.97); }
.level-box .nuance-go { background: var(--st-accent); color: #fff; }

/* Метка модуля «Геометрия» в тренажёре: по ней видно, что тянет оценку */
.type-geo {
  display: inline-block; margin-left: 6px;
  padding: 1px 6px; border-radius: 6px;
  background: #fff7ed; color: #9a3412;
  border: 1px solid #fed7aa;
  font-size: 10px; font-weight: 700; letter-spacing: .02em;
  vertical-align: middle;
}

/* Общее условие задания (сюжет «Шины», строка «Решите неравенство»):
   вырезка та же, но видно, что это не сам вопрос, а условие к группе. */
.task-body img.lead,
.station-condition img.lead {
  border-left: 3px solid var(--st-accent);
  background: var(--card-2);
  margin-bottom: 6px;
}
