/* Упражнения. Тема (ученик/учитель) задаёт переменные, здесь только устройство. */
.ex { color: var(--t); }
.ex-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ex-num { background: var(--skill); color: #fff; font-weight: 600; min-width: 32px; height: 32px; padding: 0 6px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.ex-skill { background: var(--skill-bg); color: var(--skill-ink); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.ex-title { font-size: 20px; margin: 6px 0 2px; color: var(--title); }
.ex-hint { font-size: 15px; color: var(--mut); margin: 0 0 14px; }
/* 18 px — рекомендуемый размер для чтения с экрана; строка в колонке ~770 px выходит ~75 знаков. */
.ex-body { font-size: 18px; line-height: 1.6; }

.skill-grammar   { --skill: #D85A30; --skill-bg: #FAECE7; --skill-ink: #993C1D; }
.skill-vocab     { --skill: #1D9E75; --skill-bg: #E1F5EE; --skill-ink: #085041; }
.skill-reading   { --skill: #378ADD; --skill-bg: #E6F1FB; --skill-ink: #0C447C; }
.skill-listening { --skill: #7F77DD; --skill-bg: #EEEDFE; --skill-ink: #3C3489; }
.skill-writing   { --skill: #BA7517; --skill-bg: #FAEEDA; --skill-ink: #633806; }
.skill-speaking  { --skill: #D4537E; --skill-bg: #FBEAF0; --skill-ink: #72243E; }
.skill-other     { --skill: #888780; --skill-bg: #F1EFE8; --skill-ink: #444441; }

.bnum { color: var(--mut); font-weight: 600; margin-right: 8px; }
.ok { --c: var(--ok); --cb: var(--ok-bg); --ci: var(--ok-ink); }
.no { --c: var(--no); --cb: var(--no-bg); --ci: var(--no-ink); }
.rev { display: inline-block; margin-left: 6px; font-size: 14px; color: var(--ok-ink); background: var(--ok-bg); padding: 0 8px; border-radius: 8px; font-weight: 600; }
.rev.block { display: block; margin: 6px 0 0; width: fit-content; }
.rev::before { content: '✓ '; }
.should { outline: 2px dashed var(--ok); outline-offset: 2px; }

/* Пропуски */
.lines { margin: 0; padding-left: 0; list-style: none; counter-reset: ln; }
.lines li { counter-increment: ln; padding: 6px 0 6px 30px; position: relative; line-height: 2.3; }
.lines li::before { content: counter(ln) '.'; position: absolute; left: 0; color: var(--mut); font-weight: 600; }
.prompt { color: var(--mut); line-height: 1.5; font-size: 16px; }
.gap { font: inherit; font-weight: 600; color: var(--acc-ink); background: var(--gap-bg); border: var(--bw) solid var(--line); border-radius: var(--r-sm); padding: 2px 8px; margin: 0 2px; vertical-align: baseline; max-width: 100%; }
.gap:focus { outline: none; border-color: var(--acc); }
.gap.ok, .gap.no { border-color: var(--c); background: var(--cb); color: var(--ci); }
.gap.no { animation: shake .3s; }
.gap-sel { cursor: pointer; padding-right: 4px; }
.gap-slot { display: inline-block; min-width: 90px; text-align: center; border-style: dashed; cursor: pointer; line-height: 1.6; }
.gap-slot.filled { border-style: solid; }
.gap-slot.ready { border-color: var(--acc); background: var(--acc-bg); }

/* Банк слов и чипы */
.bank { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; margin-bottom: 14px; background: var(--well); border-radius: var(--r); }
.chip { font: inherit; font-size: 16px; font-weight: 600; color: var(--acc-ink); background: var(--card); border: var(--bw) solid var(--chip-line); border-bottom-width: var(--bb); border-radius: var(--r-sm); padding: 6px 14px; cursor: pointer; transition: transform .08s; }
.chip:active:not(:disabled) { transform: translateY(2px); }
.chip.sel { border-color: var(--acc); background: var(--acc-bg); }
.chip.used { opacity: .3; cursor: default; }
.chip.ok, .chip.no { border-color: var(--c); background: var(--cb); color: var(--ci); }
.chip:disabled { cursor: default; }

/* Сопоставление */
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; align-items: stretch; }
.mcol { display: flex; flex-direction: column; gap: 8px; }
.mcell { font: inherit; font-size: 16px; font-weight: 600; text-align: center; color: var(--t); background: var(--card); border: var(--bw) solid var(--chip-line); border-bottom-width: var(--bb); border-radius: var(--r-sm); padding: 10px; cursor: pointer; min-height: 48px; }
.mcell.sel { border-color: var(--acc); background: var(--acc-bg); }
.mcell.paired { background: var(--acc-bg); border-color: var(--acc); color: var(--acc-ink); }
.mcell.paired.ok, .mcell.paired.no { border-color: var(--c); background: var(--cb); color: var(--ci); }

/* Порядок */
.order { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.oitem { display: flex; align-items: center; gap: 10px; background: var(--card); border: var(--bw) solid var(--chip-line); border-bottom-width: var(--bb); border-radius: var(--r-sm); padding: 8px 10px; }
.oitem.ok, .oitem.no { border-color: var(--c); background: var(--cb); }
.oitem.soft.ok, .oitem.soft.no { background: var(--card); }
.onum { font-weight: 700; color: var(--mut); width: 22px; text-align: center; }
.otext { flex: 1; }
.oarrows { display: flex; gap: 4px; }
.arrow { font: inherit; font-size: 18px; width: 38px; height: 38px; border-radius: 10px; border: var(--bw) solid var(--line); background: var(--well); color: var(--acc-ink); cursor: pointer; }
.arrow:disabled { opacity: .3; cursor: default; }

/* Предложение из слов */
.build { display: flex; flex-direction: column; gap: 18px; }
.bline { min-height: 50px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 10px; border-bottom: var(--bw) solid var(--line); }
.bline.ok, .bline.no { border-color: var(--c); background: var(--cb); border-radius: var(--r-sm); }
.bpool { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tile { font: inherit; font-size: 16px; font-weight: 600; color: var(--t); background: var(--card); border: var(--bw) solid var(--chip-line); border-bottom-width: var(--bb); border-radius: var(--r-sm); padding: 5px 12px; cursor: pointer; }
.tile.in { background: var(--acc-bg); border-color: var(--acc); color: var(--acc-ink); }

/* Тест и True/False */
.test, .tf { display: flex; flex-direction: column; gap: 16px; }
.tqq, .tftext { font-weight: 600; margin-bottom: 8px; }
.multi { font-size: 12px; font-weight: 600; color: var(--acc-ink); background: var(--acc-bg); padding: 2px 8px; border-radius: 20px; margin-left: 8px; vertical-align: middle; }
.topts, .tfbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.topt, .tfb { font: inherit; font-size: 16px; font-weight: 600; color: var(--t); background: var(--card); border: var(--bw) solid var(--chip-line); border-bottom-width: var(--bb); border-radius: var(--r-sm); padding: 8px 16px; cursor: pointer; }
.topt.on, .tfb.on { border-color: var(--acc); background: var(--acc-bg); color: var(--acc-ink); }
.topt.on.ok, .topt.on.no, .tfb.on.ok, .tfb.on.no { border-color: var(--c); background: var(--cb); color: var(--ci); }

/* Группы */
.groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.group { border: var(--bw) dashed var(--line); border-radius: var(--r); padding: 10px; min-height: 110px; cursor: pointer; }
.group.ready { border-color: var(--acc); background: var(--acc-bg); }
.gname { font-weight: 700; margin-bottom: 8px; color: var(--title); }
.gitems { display: flex; flex-wrap: wrap; gap: 6px; }

/* Ошибка и выделение */
.fe { display: flex; flex-direction: column; gap: 14px; }
.ferow { padding: 8px 10px; border-radius: var(--r-sm); }
.ferow.ok, .ferow.no { background: var(--cb); }
.word { cursor: pointer; padding: 2px 3px; border-radius: 6px; border-bottom: 2px dotted var(--line); }
.word:hover { background: var(--well); }
.word.picked { background: var(--acc-bg); color: var(--acc-ink); border-bottom-color: var(--acc); font-weight: 600; }
.word.picked.ok, .word.picked.no { background: var(--cb); color: var(--ci); border-bottom-color: var(--c); }
.fefix { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.fearrow { color: var(--mut); font-weight: 600; text-decoration: line-through; }
.hl { line-height: 2.2; margin: 0; }

/* Транскрипт и плеер */
.player { display: flex; align-items: center; gap: 12px; background: var(--well); border-radius: var(--r); padding: 10px 14px; margin-bottom: 12px; }
.pl-btn { font: inherit; font-size: 16px; width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--skill, var(--acc)); color: #fff; cursor: pointer; flex: none; }
.pl-bar { flex: 1; height: 8px; border-radius: 4px; background: var(--line); cursor: pointer; position: relative; }
.pl-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--skill, var(--acc)); }
.pl-time { font-size: 13px; color: var(--mut); min-width: 76px; text-align: right; font-variant-numeric: tabular-nums; }
.pl-speed { font: inherit; font-size: 13px; font-weight: 700; color: var(--mut); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px; cursor: pointer; flex: none; }
.pl-speed.on { color: var(--skill, var(--acc)); border-color: currentColor; }
.transcript { display: flex; flex-direction: column; gap: 2px; }
.tline { padding: 4px 10px; border-radius: var(--r-sm); line-height: 2.3; cursor: pointer; transition: background .2s; }
.tline:hover { background: var(--well); }
.tline.now { background: var(--skill-bg); }
.tstamp { font-size: 12px; color: var(--mut); margin-right: 10px; font-variant-numeric: tabular-nums; }

/* Картинка */
.lpic { position: relative; border-radius: var(--r); overflow: hidden; }
.lpic img { display: block; width: 100%; }
.lpt { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ldot { font: inherit; font-size: 13px; font-weight: 700; width: 28px; height: 28px; border-radius: 50%; border: 3px solid #fff; background: var(--skill); color: #fff; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.ldot.ready { animation: pulse 1s infinite; }
.llab { font-size: 14px; font-weight: 700; background: #fff; color: var(--acc-ink); padding: 1px 8px; border-radius: 8px; white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.llab.ok, .llab.no { background: var(--cb); color: var(--ci); }
.llab.rev { margin: 0; }

/* Открытый ответ и текст */
.open { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; line-height: 1.6; color: var(--t); background: var(--card); border: var(--bw) solid var(--line); border-radius: var(--r); padding: 12px; resize: vertical; }
.open:focus { outline: none; border-color: var(--acc); }
.wcount { font-size: 13px; color: var(--mut); margin-top: 6px; text-align: right; }
.reading h3 { font-size: 22px; margin: 4px 0 10px; color: var(--title); }
.reading p { margin: 0 0 10px; }
.reading b { color: var(--skill-ink); }
.discuss { background: var(--skill-bg); border-radius: var(--r); padding: 12px 16px; margin-top: 14px; }
.dlabel { font-weight: 700; color: var(--skill-ink); font-size: 14px; }
.discuss ul { margin: 6px 0 0; padding-left: 20px; }

/* Подсказки учителю: наведение или нажатие показывает правильный ответ */
.peek [data-key] { position: relative; }
.peek [data-key].peek-on::after, .peek [data-key].pinned::after {
  content: attr(data-key); position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -6px);
  background: #0F6E56; color: #fff; font: 600 13px/1.4 system-ui, sans-serif; font-style: normal; padding: 4px 9px; border-radius: 6px;
  white-space: nowrap; z-index: 30; pointer-events: none; box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.peek .lpt[data-key].peek-on::after, .peek .lpt[data-key].pinned::after { bottom: auto; top: 100%; transform: translate(-50%, 6px); }
.peek .peek-on [data-correct], .peek .pinned [data-correct],
.peek [data-pair].peek-on, .peek [data-pair].pinned {
  outline: 2.5px solid var(--ok); outline-offset: 1px; background: var(--ok-bg) !important; color: var(--ok-ink) !important; border-radius: 6px;
}
.peek [data-peek], .peek [data-key], .peek [data-pair] { cursor: help; }

/* Медиа над заданием */
.ex-media { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.ex-imgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.ex-imgs img, .ex-img { display: block; width: 100%; border-radius: var(--r-sm); }
.ex-imgs img { height: 100%; max-height: 300px; object-fit: cover; }
.ex-imgs.tiles img { max-height: 200px; }
.ex-img { max-height: 420px; object-fit: contain; background: var(--well); }
.ex-media img, .lpic img { cursor: zoom-in; }
.ex-imgs.tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(20, 18, 30, .92); display: flex; flex-direction: column; }
.lb-bar { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; color: #fff; }
.lb-bar button { font: inherit; font-size: 20px; font-weight: 700; width: 40px; height: 40px; border-radius: 10px; border: none; background: rgba(255,255,255,.15); color: #fff; cursor: pointer; }
.lb-bar button:hover { background: rgba(255,255,255,.28); }
.lb-zoom { min-width: 56px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.lb-close { position: absolute; right: 12px; top: 10px; }
.lb-stage { flex: 1; overflow: auto; display: flex; padding: 0 12px 12px; }
.lb-stage img { margin: auto; max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; border-radius: 6px; }
.lb-stage img.zoomed { max-width: none; max-height: none; cursor: zoom-out; margin: 0; }
@media (max-width: 760px) { .ex-imgs.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.track { font-size: 13px; font-weight: 700; color: var(--skill-ink); margin-bottom: 4px; }
.vplayer { background: #000; border-radius: var(--r); overflow: hidden; }
.vplayer video { display: block; width: 100%; max-height: 420px; cursor: pointer; }
.vplayer .player { border-radius: 0; margin: 0; }

/* Обведи нужное */
.circ { white-space: normal; }
.copt { font: inherit; font-style: italic; color: var(--t); background: none; border: var(--bw) solid transparent; border-radius: 20px; padding: 0 8px; cursor: pointer; line-height: 1.7; }
.copt:hover:not(:disabled) { background: var(--well); }
.copt.on { border-color: var(--acc); background: var(--acc-bg); color: var(--acc-ink); font-weight: 700; font-style: normal; }
.copt.on.ok, .copt.on.no { border-color: var(--c); background: var(--cb); color: var(--ci); }
.copt:disabled { cursor: default; }
.slash { color: var(--mut); margin: 0 1px; }

/* Текст: списки и рамки с правилами */
.rlist { margin: 4px 0 12px; padding-left: 24px; }
.rlist li { margin-bottom: 4px; }
.ex u { text-decoration-color: var(--no); text-decoration-style: wavy; text-underline-offset: 3px; }
.prompts textarea.small { margin-top: 6px; min-height: 60px; }

@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }

@media (max-width: 560px) {
  .ex-body { font-size: 17px; }
  .match { gap: 6px; }
  .mcell { font-size: 14px; padding: 8px 6px; }
  .ldot { width: 24px; height: 24px; font-size: 11px; }
  .llab { font-size: 12px; }
}

/* Скрипт аудио/видео */
.script { margin: -4px 0 12px; }
.script-btn { font: inherit; font-size: 13px; font-weight: 700; color: var(--skill-ink, var(--acc-ink)); background: var(--card); border: var(--bw) solid var(--chip-line); border-radius: 10px; padding: 4px 12px; cursor: pointer; }
.script-btn.on { background: var(--skill-bg, var(--acc-bg)); border-color: var(--skill, var(--acc)); }
.script-panel { margin-top: 8px; border: var(--bw) solid var(--line); border-radius: var(--r-sm); background: var(--card); padding: 10px 14px; max-height: 360px; overflow: auto; }
.script-panel[hidden] { display: none; }
.script-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--mut); font-size: 13px; }
.script-head b { margin-right: auto; }
.script-eye { font: inherit; font-size: 12px; border: 1px solid var(--line); background: var(--well); color: var(--no-ink); border-radius: 8px; padding: 2px 8px; cursor: pointer; }
.script-eye.on { color: var(--ok-ink); background: var(--ok-bg); border-color: var(--ok); }
.script-text p { margin: 0 0 8px; line-height: 1.55; }

/* ---------- общий набор оформления ---------- */
/* Палитра: светлый тон (фон, маркер) и насыщенный (шрифт, рамка). course — цвет курса. */
:root {
  --pl-course: color-mix(in srgb, var(--course, #534AB7) 12%, #fff); --ps-course: var(--course, #534AB7);
  --pl-gray: #F1EFE8; --ps-gray: #5F5E5A;   --pl-red: #FCEBEB; --ps-red: #A32D2D;
  --pl-orange: #FBEADF; --ps-orange: #C2541F; --pl-yellow: #FDF3CC; --ps-yellow: #8A6200;
  --pl-green: #EAF3DE; --ps-green: #3B6D11; --pl-teal: #E1F5EE; --ps-teal: #0F6E56;
  --pl-blue: #E6F1FB; --ps-blue: #185FA5;   --pl-purple: #EEEDFE; --ps-purple: #534AB7;
  --mk-course: color-mix(in srgb, var(--course, #534AB7) 28%, #fff);
  --mk-gray: #E4E1D8; --mk-red: #F9CACA; --mk-orange: #FFD6B8; --mk-yellow: #FFE98A; --mk-green: #CDEFB5;
  --mk-teal: #BDEBDB; --mk-blue: #CBE3FB; --mk-purple: #DCD8FA;
}
.fc-course { color: var(--ps-course); } .fc-gray { color: var(--ps-gray); } .fc-red { color: var(--ps-red); } .fc-orange { color: var(--ps-orange); }
.fc-yellow { color: var(--ps-yellow); } .fc-green { color: var(--ps-green); } .fc-teal { color: var(--ps-teal); } .fc-blue { color: var(--ps-blue); } .fc-purple { color: var(--ps-purple); }
[class*="mk-"] { border-radius: 4px; padding: 0 3px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.mk-course { background: var(--mk-course); } .mk-gray { background: var(--mk-gray); } .mk-red { background: var(--mk-red); } .mk-orange { background: var(--mk-orange); }
.mk-yellow { background: var(--mk-yellow); } .mk-green { background: var(--mk-green); } .mk-teal { background: var(--mk-teal); } .mk-blue { background: var(--mk-blue); } .mk-purple { background: var(--mk-purple); }
.fs-small { font-size: .85em; } .fs-big { font-size: 1.2em; } .fs-title { font-size: 1.35em; font-weight: 800; }
/* Цвет заметки, группы, страницы: --nl светлый, --ns насыщенный. */
.nc-course { --nl: var(--pl-course); --ns: var(--ps-course); } .nc-gray { --nl: var(--pl-gray); --ns: var(--ps-gray); }
.nc-red { --nl: var(--pl-red); --ns: var(--ps-red); } .nc-orange { --nl: var(--pl-orange); --ns: var(--ps-orange); }
.nc-yellow { --nl: var(--pl-yellow); --ns: var(--ps-yellow); } .nc-green { --nl: var(--pl-green); --ns: var(--ps-green); }
.nc-teal { --nl: var(--pl-teal); --ns: var(--ps-teal); } .nc-blue { --nl: var(--pl-blue); --ns: var(--ps-blue); }
.nc-purple { --nl: var(--pl-purple); --ns: var(--ps-purple); }
.rh { font-size: 1.05em; font-weight: 800; color: var(--title); margin: 12px 0 6px; }
ul.rlist { padding-left: 1.3em; }
/* Заметка — одна на всё: правило, Tip, bank, Culture… */
.note-box { background: var(--nl); border-radius: 16px; padding: 12px 16px; margin: 10px 0; border-left: 5px solid var(--ns); }
.note-title { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ns); margin-bottom: 4px; }
.note-sub { font-size: .9em; color: var(--ns); margin: -2px 0 6px; font-weight: 600; }
.note-icon { font-size: 1.1em; }
.note-body > p:last-child { margin-bottom: 0; }
.note-box > .note-body > .ex-body { padding: 0; }
/* Страница: письмо, статья, объявление. */
.page { border-radius: 10px; padding: 16px 20px; margin: 10px 0; line-height: 1.55; }
.page.serif { font-family: Georgia, 'Times New Roman', serif; }
.page.bg-paper { background: #F4EFE5; }
.page[class*="bg-"]:not(.bg-paper) { background: var(--nl); }
.page.bg-course { --nl: var(--pl-course); } .page.bg-gray { --nl: var(--pl-gray); } .page.bg-red { --nl: var(--pl-red); } .page.bg-orange { --nl: var(--pl-orange); }
.page.bg-yellow { --nl: var(--pl-yellow); } .page.bg-green { --nl: var(--pl-green); } .page.bg-teal { --nl: var(--pl-teal); } .page.bg-blue { --nl: var(--pl-blue); } .page.bg-purple { --nl: var(--pl-purple); }
.page p { margin: 0 0 8px; }
.page-title { font-weight: 800; font-size: 1.1em; margin-bottom: 8px; font-family: 'Nunito', system-ui, sans-serif; }
/* Картинка: размер, положение, подпись, рамка «окно сайта». */
.fig { margin: 10px 0; }
.fig-img { display: block; width: 100%; border-radius: 10px; cursor: zoom-in; }
.fig.size-s { max-width: 220px; } .fig.size-m { max-width: 420px; } .fig.size-l { max-width: 600px; } .fig.size-full { max-width: none; }
.fig.align-center { margin-left: auto; margin-right: auto; }
.fig.align-left { float: left; margin: 4px 16px 8px 0; } .fig.align-right { float: right; margin: 4px 0 8px 16px; }
.reading::after, .note-body::after, .page::after { content: ''; display: block; clear: both; }
.fig figcaption { font-size: .85em; color: var(--mut); margin-top: 4px; text-align: center; }
.fig.browser { border: 2px solid #C9CDD3; border-radius: 10px; overflow: hidden; background: #fff; }
.fig.browser .fig-img { border-radius: 0; }
.browser-bar { background: var(--ps-course); height: 20px; display: flex; gap: 6px; align-items: center; padding: 0 10px; }
.browser-bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.7); }
@media (max-width: 560px) { .fig.align-left, .fig.align-right { float: none; margin: 10px auto; } }
/* Таблица */
.tbl-wrap { overflow-x: auto; margin: 10px 0; }
.tbl { border-collapse: collapse; min-width: 60%; }
.tbl th, .tbl td { border: 1.5px solid var(--line); padding: 6px 12px; text-align: left; vertical-align: top; }
.tbl th { background: var(--pl-course); color: var(--ps-course); font-weight: 800; }
/* Раскрывашка */
.spoiler { border: 2px dashed var(--line); border-radius: 12px; padding: 6px 12px; margin: 10px 0; }
.spoiler summary { cursor: pointer; font-weight: 800; color: var(--acc-ink); }
.spoiler[open] summary { margin-bottom: 6px; }
/* Две колонки */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 10px 0; }
@media (max-width: 700px) { .cols { grid-template-columns: 1fr; } }
/* Группа заданий */
.grp-box { border: 2.5px solid var(--ns); border-radius: 22px; padding: 22px 12px 12px; position: relative; margin-top: 14px; display: flex; flex-direction: column; gap: 14px; }
.grp-tag { position: absolute; top: -14px; left: 18px; background: var(--ns); color: #fff; font-weight: 800; font-size: 14px; padding: 3px 12px; border-radius: 12px; }

/* Подсказка у пропуска: [[?leave|…]] */
.ghint { color: var(--mut); font-size: .92em; margin: 0 .3em 0 .25em; }

/* Видео по ссылке: YouTube, Rutube, VK */
.vembed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: #000; margin-bottom: 12px; }
.vembed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.fig-video { display: block; width: 100%; max-height: 420px; border-radius: var(--r); background: #000; margin: 8px 0; }

/* Картинка над предложением в задании с пропусками (пары a/b из воркбука и т. п.) */
.line-img { display: block; width: min(100%, 440px); border-radius: var(--r-sm); margin: 4px 0 8px; }

/* Рамка со словами прилипает под шапкой страницы, пока листаешь задание; уходит вместе с концом задания. */
.bank { position: sticky; top: calc(var(--stick-top, 0px) + 6px); z-index: 4; box-shadow: 0 6px 16px -10px rgba(60, 40, 10, .45); }
.ed-preview .bank, .pick-prev .bank { top: 0; }
@media (max-height: 560px) { .bank { position: static; box-shadow: none; } }
