/* ПҚС с экрана — вид как у бумажной книжки EduCon: белый лист, шрифт с
   засечками, шапка предмета с шестиугольником и пунктиром, «A) …» под
   условием, внизу тёмная полоса «БАЙҚАУ СЫНАҒЫ · стр · НҰСҚА – 7810».
   Обложка — оранжевая полоса «ПӘНДІК ҚАЙТАЛАУ СЫНАҒЫ», как на книжке. */
:root { --pk-orange: #e8612c; --pk-dark: #3a3330; --pk-paper: #ffffff; --pk-ink: #111; --pk-line: #d8d4d0; }

/* Пока идёт ПҚС, остальное на странице не нужно. */
body.pks-writing .et > .page-head, body.pks-focus #report { display: none; }
.et:has(#report.et-writing) #pksRoot { display: none; }

/* Снимок экрана: пока зажаты ⌘/Win+Shift — задания не видно (lib/screen-guard.js). */
html.dq-shot-hide .pk-sheet, html.dq-shot-hide .mt-test-page { filter: blur(18px); opacity: .15; }
@media print { #pksRoot, #report { display: none !important; } }

/* ── список ── */
.pk { margin-bottom: 20px; }
.pk-cap { margin: 0 0 10px; font-size: 13px; color: var(--ink-2, #5a655f); }
.pk-cap b { color: var(--pk-orange); letter-spacing: .02em; }
.pk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.pk-card {
  display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 14px;
  border-radius: 16px; background: var(--surface, #fff);
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .05), 0 1px 3px rgba(0, 0, 0, .05);
}
.pk-card-main { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.pk-card-main > b { font-size: 16px; letter-spacing: -.01em; }
.pk-card-main > small { font-size: 12px; color: var(--ink-2, #5a655f); }
.pk-state { padding: 2px 8px; border-radius: 999px; background: var(--surface-2, #f1f3f2); }
.pk-state.is-open { background: rgba(44, 157, 98, .14); color: var(--green-dark, #1e7043); }
.pk-muted { margin: 6px 0 0; font-size: 12px; color: var(--ink-3, #93a29a); }
.et-btn.pk-mini { margin-top: 8px; padding: 8px 14px; font-size: 14px; }
.et-btn:disabled { opacity: .45; cursor: not-allowed; }
.pk-done { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.pk-done span { font-size: 13px; color: var(--ink-2, #5a655f); }
.pk-done b { font-size: 20px; }
.pk-done b i { font-style: normal; font-size: 14px; color: var(--ink-3, #93a29a); }

/* Обложка книжки в миниатюре. */
.pk-cover {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  min-height: 128px; border-radius: 8px; background: #f7f5f3;
  box-shadow: inset 0 0 0 1px #e6e1dc; font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
}
.pk-cover span {
  padding: 8px 6px 7px; background: var(--pk-orange); border-bottom: 4px solid var(--pk-dark);
  color: #fff; font-size: 10px; line-height: 1.15; font-weight: 900; text-align: center; letter-spacing: .02em;
}
.pk-cover b {
  align-self: center; margin-top: 10px; min-width: 44px; padding: 4px 8px; background: var(--pk-dark);
  box-shadow: 4px -4px 0 var(--pk-orange); color: #fff; font-size: 24px; line-height: 1; text-align: center;
}
.pk-cover i { margin-top: auto; padding: 6px; font-style: normal; font-size: 10px; font-weight: 900; color: var(--pk-orange); text-align: center; }
.pk-cover.is-ru span { background: #2b2b2b; border-bottom-color: #2ea35a; }
.pk-cover.is-ru b { box-shadow: 4px -4px 0 #2ea35a; }
.pk-cover.is-ru i { color: #1f8a49; }
.pk-cover--big.is-ru b { box-shadow: 8px -8px 0 #2ea35a; }
.pk-cover--big { max-width: 300px; min-height: 260px; margin: 14px auto 18px; }
.pk-cover--big span { padding: 18px 12px 14px; font-size: 20px; border-bottom-width: 7px; }
.pk-cover--big b { margin-top: 28px; padding: 10px 18px 0; font-size: 44px; box-shadow: 8px -8px 0 var(--pk-orange); }
.pk-cover--big em { align-self: center; padding: 0 18px 8px; background: var(--pk-dark); font-style: normal; font-size: 20px; font-weight: 900; color: #fff; }
.pk-cover--big i { font-size: 16px; padding: 14px; }

/* ── выбор профиля ── */
.pk-setup {
  max-width: 720px; margin: 0 auto 20px; padding: 20px;
  border-radius: 20px; background: var(--surface, #fff);
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .05), 0 1px 3px rgba(0, 0, 0, .05);
}
.pk-setup h3 { margin: 6px 0 0; font-size: 20px; letter-spacing: -.02em; }
.pk-setup > .et-btn:last-child { width: 100%; }
.pk-pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 14px; }
.pk-pair {
  display: grid; grid-template-columns: 18px 1fr; column-gap: 10px; align-items: center; text-align: left;
  padding: 10px 12px; border: 1.5px solid var(--line, #e2e8e4); border-radius: 12px;
  background: var(--surface, #fff); font: inherit; font-size: 14px; color: inherit; cursor: pointer;
}
.pk-pair i { grid-row: span 2; width: 16px; height: 16px; border: 2px solid #b9c2bd; border-radius: 50%; }
.pk-pair span + span { color: var(--ink-2, #5a655f); }
.pk-pair.is-on { border-color: var(--pk-orange); background: #fff4ee; }
.pk-pair.is-on i { border-color: var(--pk-orange); background: radial-gradient(circle, var(--pk-orange) 45%, transparent 50%); }
.pk-plan { display: grid; gap: 4px; margin-top: 16px; padding: 12px; border-radius: 12px; background: var(--surface-2, #f1f3f2); }
.pk-plan > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.pk-plan b { font-weight: 600; white-space: nowrap; }
.pk-plan em { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 8px; background: #ffe2d4; color: #a3401a; }
.pk-plan-sum { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line, #e2e8e4); }

/* ── вкладки предметов ── */
.pk-tabs {
  position: sticky; top: calc(54px + env(safe-area-inset-top)); z-index: 70;
  display: flex; gap: 6px; overflow-x: auto; margin: 0 0 12px; padding: 8px 2px;
  background: var(--bg, #f4f6f5); scrollbar-width: none;
}
.pk-tabs::-webkit-scrollbar { display: none; }
.pk-tabs--static { position: static; }
.pk-tabs button {
  flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 8px 14px; border: 1.5px solid var(--line, #e2e8e4); border-radius: 12px;
  background: var(--surface, #fff); font: inherit; font-size: 14px; font-weight: 600; color: inherit; cursor: pointer;
}
.pk-tabs button small { font-size: 12px; font-weight: 500; color: var(--ink-3, #93a29a); font-variant-numeric: tabular-nums; }
.pk-tabs button.is-on { border-color: var(--pk-dark); background: var(--pk-dark); color: #fff; }
.pk-tabs button.is-on small { color: #f0c9b6; }

/* ── лист книжки ── */
.pk-sheet { max-width: 860px; margin: 0 auto; }
.pk-paper {
  padding: 28px 34px 24px; background: var(--pk-paper); color: var(--pk-ink);
  box-shadow: 0 0 0 1px #e8e6e3, 0 6px 22px -12px rgba(0, 0, 0, .25);
  font-family: "Times New Roman", Times, "Liberation Serif", serif; font-size: 16px; line-height: 1.45;
}
.pk-subj { display: flex; align-items: center; gap: 12px; padding-bottom: 8px; border-bottom: 2px dashed #222; }
.pk-subj h2 { margin: 0; font-family: Arial, "Helvetica Neue", sans-serif; font-size: 20px; font-weight: 800; letter-spacing: .01em; }
.pk-hex {
  flex: none; width: 34px; height: 34px; background: #111;
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
  -webkit-mask: radial-gradient(circle, transparent 7px, #000 7.5px); mask: radial-gradient(circle, transparent 7px, #000 7.5px);
}
.pk-grid { display: flex; flex-wrap: wrap; gap: 4px; margin: 14px 0 6px; font-family: Arial, sans-serif; }
.pk-grid button {
  width: 30px; height: 28px; padding: 0; border: 1px solid #c9c5c1; border-radius: 4px;
  background: #fff; font-size: 12px; color: #444; cursor: pointer; font-variant-numeric: tabular-nums;
}
.pk-grid button.is-on { border-color: var(--pk-dark); background: var(--pk-dark); color: #fff; }
.pk-grid button.is-cur { outline: 2px solid var(--pk-orange); outline-offset: 1px; }
.pk-instr {
  margin: 18px 0 10px; padding: 6px 10px; border-left: 3px solid var(--pk-orange);
  font-style: italic; font-size: 15px; color: #333;
}
.pk-passage { margin: 10px 0 14px; text-indent: 1.5em; text-align: justify; white-space: pre-wrap; }
.pk-q { margin: 0 0 18px; break-inside: avoid; scroll-margin-top: 130px; }
.pk-q-t { display: grid; grid-template-columns: 34px 1fr; align-items: baseline; }
.pk-q-t > b { font-weight: 700; }
.pk-q-t > div { white-space: pre-wrap; }
.pk-hint { font-size: 13px; color: #8a5a3c; }
.pk-q-expr { margin: 4px 0 0 34px; }
.pk-q-fig { margin: 6px 0 0 34px; }
.pk-q-fig svg, .pk-o svg { max-width: 100%; height: auto; }
.pk-opts { display: grid; gap: 2px; margin: 6px 0 0 34px; }
.pk-mgrp { margin: 8px 0 2px; font-style: italic; }
.pk-optgrp { display: grid; gap: 2px; }
.pk-optgrp.is-row { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px 12px; }
.pk-mgrp b { font-style: normal; }
.pk-o {
  display: grid; grid-template-columns: 30px 1fr; align-items: baseline; gap: 6px;
  margin: 0 -8px; padding: 5px 8px; border: 0; border-radius: 8px;
  background: transparent; font: inherit; text-align: left; color: inherit; cursor: pointer;
}
button.pk-o:hover { background: #f6f3f0; }
/* Буква — кружок бланка: отмеченный закрашен. Несколько ответов — квадратик. */
.pk-o > i {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border: 1.5px solid #555; border-radius: 50%; font-family: Arial, sans-serif; font-style: normal; font-size: 12px; font-weight: 700;
}
.pk-o.is-multi > i { border-radius: 4px; }
.pk-o.is-on { background: #fff1e9; }
.pk-o.is-on > i { border-color: var(--pk-dark); background: var(--pk-dark); color: #fff; }
.pk-o > span { min-width: 0; }
/* Разбор. */
.pk-o.is-right { background: rgba(44, 157, 98, .13); }
.pk-o.is-right > i { border-color: #1e7043; }
.pk-o.is-on.is-right > i { background: #1e7043; }
.pk-o.is-wrong { background: rgba(192, 57, 43, .1); }
.pk-o.is-on.is-wrong > i { border-color: #c0392b; background: #c0392b; }
div.pk-o { cursor: default; }
.pk-rv { margin: 6px 0 0 34px; font-family: Arial, sans-serif; font-size: 13px; font-weight: 600; }
.pk-rv.is-ok { color: #1e7043; }
.pk-rv.is-half { color: #a36a00; }
.pk-rv.is-bad { color: #c0392b; }
.pk-rv.is-skip { color: #777; }
.pk-q.rv-ok > .pk-q-t > b { color: #1e7043; }
.pk-q.rv-bad > .pk-q-t > b { color: #c0392b; }
.pk-end { margin: 26px 0 4px; font-weight: 700; text-align: center; text-transform: uppercase; }
.pk-nav { display: flex; justify-content: space-between; gap: 10px; margin: 14px 0; }
.pk-nav .et-btn { margin: 0; }
.pk-nav { align-items: center; }
.pk-pos { font-family: Arial, sans-serif; font-size: 14px; color: var(--ink-2, #5a655f); font-variant-numeric: tabular-nums; }
.pk-paper { min-height: 360px; }
.pk-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 6px 0 28px;
  padding: 9px 18px; background: linear-gradient(100deg, #6f6a66, #3a3532 70%);
  clip-path: polygon(1.5% 0, 100% 0, 98.5% 100%, 0 100%);
  font-family: Arial, sans-serif; font-size: 13px; font-weight: 800; letter-spacing: .03em; color: #fff;
}
.pk-result-cap { font-size: 14px; color: var(--ink-2, #5a655f); }
.pk-result { position: relative; }
.pk-back { position: absolute; left: 16px; top: 12px; margin: 0 !important; }
.pk-tag { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 8px; background: #ffe2d4; color: #a3401a; }
.pk-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 120; transform: translate(-50%, 20px); opacity: 0;
  padding: 10px 16px; border-radius: 12px; background: #222; color: #fff; font-size: 14px;
  transition: opacity .2s, transform .2s; pointer-events: none;
}
.pk-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.pk-sheet, .pk-paper { -webkit-user-select: none; user-select: none; }

@media (max-width: 860px) {
  .pk-paper { padding: 18px 14px; font-size: 16px; }
  .pk-q-t { grid-template-columns: 28px 1fr; }
  .pk-opts, .pk-q-fig, .pk-q-expr, .pk-rv { margin-left: 28px; }
  .pk-opts { margin-left: 4px; }
  .pk-subj h2 { font-size: 16px; }
  .pk-card { grid-template-columns: 84px 1fr; }
  .pk-back { position: static; }
}

/* Полоса вкладок прокручивается сама и не должна раздвигать страницу. */
#pksRoot, .pk-sheet, .pk-paper { min-width: 0; max-width: 100%; }
.pk-tabs { max-width: 100%; }
.et:has(#pksRoot) { min-width: 0; }

/* Карта ответов после сдачи: номер задания, цвет — сколько баллов получено. */
.pk-map { display: grid; gap: 14px; margin-top: 4px; }
.pk-map-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 14px; }
.pk-map-h span { font-weight: 700; font-variant-numeric: tabular-nums; }
.pk-map-h i { font-style: normal; font-weight: 500; color: var(--ink-3, #93a29a); }
.pk-map-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 4px; }
.pk-map-g span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 36px;
  border-radius: 8px; font-size: 13px; font-variant-numeric: tabular-nums; line-height: 1.1;
}
.pk-map-g small { font-size: 10px; opacity: .8; }
.pk-map .is-ok { background: rgba(44, 157, 98, .16); color: #1e7043; }
.pk-map .is-half { background: rgba(216, 160, 40, .2); color: #8a5a00; }
.pk-map .is-bad { background: rgba(192, 57, 43, .13); color: #b03224; }
.pk-map .is-skip { background: rgba(0, 0, 0, .05); color: #8a8a8a; }
.pk-map-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; font-size: 12px; color: var(--ink-2, #5a655f); }
.pk-map-legend span { display: inline-block; width: 12px; height: 12px; margin-right: -6px; border-radius: 4px; vertical-align: middle; }
.pk-map-g b { font-weight: 600; font-size: 13px; }

/* Выбор наверху: ПҚС / ППТ или недельный экзамен — видна одна часть. */
.et-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 560px; margin: 0 0 16px; }
.et-sections button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 16px;
  border: 1.5px solid var(--line, #e2e8e4); border-radius: 16px; background: var(--surface, #fff);
  font: inherit; text-align: left; color: inherit; cursor: pointer;
}
.et-sections button b { font-size: 16px; }
.et-sections button small { font-size: 12px; color: var(--ink-2, #5a655f); }
.et-sections button.is-on { border-color: var(--pk-dark); background: var(--pk-dark); color: #fff; }
.et-sections button.is-on small { color: #e6d6cc; }
body.et-sec-pks #report:not(.et-writing) { display: none; }
body.et-sec-weekly:not(.pks-focus) #pksRoot { display: none; }
body.pks-focus #etSections, .et:has(#report.et-writing) #etSections { display: none; }

/* Карточка серии: одинаковая высота, кнопка внизу, срок одной строкой. */
.pk-card { align-items: stretch; }
.pk-card-main > small { line-height: 1.4; }
.pk-card-main .et-btn.pk-mini { margin-top: auto; }
.pk-card-main .pk-muted { margin-top: auto; }
.pk-until { margin-top: 6px; font-size: 12px; color: var(--ink-2, #5a655f); white-space: nowrap; }
.pk-until b { font-weight: 600; color: var(--green-dark, #1e7043); }

/* Окно перед стартом: «экзамен под наблюдением». Глаз осматривает окно,
   сканер бежит сверху вниз, щит с галочкой, правила появляются по очереди. */
.pk-proctor {
  position: fixed; inset: 0; z-index: 130; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(20, 16, 14, .45); opacity: 0; transition: opacity .2s;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.pk-proctor.is-on { opacity: 1; }
.pk-proctor-card {
  width: 100%; max-width: 440px; padding: 20px 20px 16px; border-radius: 20px; background: var(--surface, #fff);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .45); transform: translateY(16px) scale(.97); transition: transform .3s cubic-bezier(.2, .9, .3, 1.2);
}
.pk-proctor.is-on .pk-proctor-card { transform: none; }
.pk-proctor-art { margin: -4px auto 4px; max-width: 260px; }
.pk-proctor-art svg { display: block; width: 100%; height: auto; overflow: visible; }
.pp-win { fill: #faf8f6; stroke: #3a3330; stroke-width: 2.5; }
.pp-bar { stroke: #3a3330; stroke-width: 2; }
.pp-dot { fill: #e8612c; }
.pp-dot + .pp-dot { fill: #f2b33d; }
.pp-dot + .pp-dot + .pp-dot { fill: #2ea35a; }
.pp-line { fill: #e9e3de; }
.pp-scan { fill: #e8612c; opacity: .55; animation: pp-scan 2.2s ease-in-out infinite; }
.pp-lid { fill: #fff; stroke: #3a3330; stroke-width: 3; transform-origin: 110px 64px; animation: pp-blink 3.6s infinite; }
.pp-pupil { fill: #3a3330; animation: pp-look 3.6s ease-in-out infinite; }
.pp-glint { fill: #fff; }
.pp-shield path:first-child { fill: #2ea35a; }
.pp-shield { transform-origin: 182px 66px; animation: pp-pop .5s .4s both cubic-bezier(.2, .9, .3, 1.4), pp-pulse 2.4s 1s ease-in-out infinite; }
.pp-tick { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 20; stroke-dashoffset: 20; animation: pp-draw .4s .8s forwards; }
@keyframes pp-scan { 0% { transform: translateY(0); } 50% { transform: translateY(78px); } 100% { transform: translateY(0); } }
@keyframes pp-blink { 0%, 44%, 50%, 100% { transform: scaleY(1); } 47% { transform: scaleY(.08); } }
@keyframes pp-look { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-16px); } 40% { transform: translateX(-16px); }
  60% { transform: translateX(16px); } 80% { transform: translateX(16px); } }
@keyframes pp-pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes pp-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes pp-draw { to { stroke-dashoffset: 0; } }
.pk-proctor-t { display: block; font-size: 20px; letter-spacing: -.02em; text-align: center; }
.pk-proctor-sub { margin: 4px 0 12px; font-size: 14px; color: var(--ink-2, #5a655f); text-align: center; }
.pk-proctor-rules { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pk-proctor-rules li {
  display: grid; grid-template-columns: 32px 1fr; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 12px; background: var(--surface-2, #f1f3f2); font-size: 14px; line-height: 1.35;
  opacity: 0; transform: translateX(-10px); animation: pp-in .35s calc(.5s + var(--i) * .15s) forwards;
}
.pk-proctor-rules i { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; background: #fff1e9; }
.pk-proctor-rules svg { width: 20px; height: 20px; fill: none; stroke: #e8612c; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@keyframes pp-in { to { opacity: 1; transform: none; } }
.pk-proctor-act { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin-top: 16px; }
.pk-proctor-act .et-btn { margin: 0; }
@media (prefers-reduced-motion: reduce) {
  .pk-proctor *, .pk-proctor-card { animation: none !important; transition: none !important; }
  .pk-proctor-rules li { opacity: 1; transform: none; }
  .pp-tick { stroke-dashoffset: 0; }
}

/* ── инструменты экзамена: кнопки в панели и окна (lib/exam-tools.js) ── */
.pk-tools { display: flex; gap: 6px; margin-left: auto; }
.pk-tools + .et-btn { margin-left: 0 !important; }
.pk-tools button {
  display: flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid var(--line, #e2e8e4); border-radius: 12px;
  background: var(--surface, #fff); font: inherit; font-size: 13px; font-weight: 600; color: inherit; cursor: pointer;
}
.pk-tools svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 1100px) { .pk-tools span { display: none; } .pk-tools button { padding: 7px 8px; } }

.xt-win {
  position: fixed; z-index: 110; right: 20px; top: 76px; display: flex; flex-direction: column;
  max-height: calc(100vh - 96px); border-radius: 16px; background: var(--surface, #fff);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .08), 0 24px 48px -16px rgba(0, 0, 0, .35);
}
.xt-win--calc { width: 300px; }
.xt-win--mendeleev, .xt-win--solubility { left: 20px; right: 20px; margin: 0 auto; max-width: 1180px; }
.xt-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line, #e2e8e4); cursor: move; user-select: none; }
.xt-head b { flex: 1; font-size: 15px; }
.xt-x { width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .06); font-size: 20px; line-height: 1; cursor: pointer; color: inherit; }
.xt-body { overflow: auto; padding: 12px; }

.xt-calc { display: grid; gap: 10px; }
.xt-screen { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding: 10px 12px; border-radius: 12px; background: #1d1a18; color: #fff; min-height: 72px; }
.xt-screen small { min-height: 16px; font-size: 12px; color: #b8aea8; }
.xt-screen b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 32px; font-weight: 600; font-variant-numeric: tabular-nums; }
.xt-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.xt-keys button { height: 48px; border: 0; border-radius: 12px; background: #f1eeeb; font: inherit; font-size: 20px; font-weight: 600; color: inherit; cursor: pointer; }
.xt-keys button:active { transform: scale(.96); }
.xt-keys .is-op { background: #ffe4d6; color: #a3401a; }
.xt-keys .is-fn { background: #e6e2de; font-size: 16px; }
.xt-keys .is-eq { grid-row: span 2; background: #e8612c; color: #fff; height: auto; }

.xt-pt-wrap { overflow-x: auto; }
.xt-pt { position: relative; display: grid; grid-template-columns: repeat(18, minmax(52px, 1fr)); grid-auto-rows: auto; gap: 3px; min-width: 980px; }
.xt-gh { text-align: center; font-size: 11px; font-weight: 600; color: var(--ink-3, #93a29a); }
.xt-el {
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 56px; padding: 3px 2px;
  border: 1px solid rgba(0, 0, 0, .08); border-radius: 4px; font: inherit; color: #1d1a18; cursor: pointer; line-height: 1.05;
}
.xt-el i { align-self: flex-start; font-style: normal; font-size: 10px; color: #6b625c; }
.xt-el b { font-size: 16px; }
.xt-el small { font-size: 10px; color: #5d5550; }
.xt-s { background: #fde0e3; } .xt-p { background: #fdf1c7; } .xt-d { background: #dbe9fb; } .xt-f { background: #dcf3e2; }
.xt-el.is-on { outline: 2px solid #e8612c; outline-offset: 1px; }
.xt-gap { height: 8px; }
.xt-flab { align-self: center; font-size: 12px; color: var(--ink-2, #5a655f); }
.xt-detail { display: none; align-items: center; gap: 14px; padding: 8px 14px; border-radius: 12px; background: #fff7f2; border: 1px solid #f5c9b3; }
.xt-detail.is-on { display: flex; }
.xt-detail > b { font-size: 44px; color: #e8612c; }
.xt-detail span { font-size: 13px; line-height: 1.5; color: #4a423d; }
.xt-detail strong { display: block; font-size: 20px; color: #1d1a18; }
.xt-note { margin: 8px 0 0; font-size: 12px; color: var(--ink-3, #93a29a); }

.xt-sol-wrap { overflow-x: auto; }
.xt-sol { border-collapse: collapse; font-size: 13px; min-width: 900px; }
.xt-sol th, .xt-sol td { padding: 5px 4px; border: 1px solid #e3ded9; text-align: center; }
.xt-sol thead th { position: sticky; top: 0; background: #3a3330; color: #fff; font-weight: 600; white-space: nowrap; }
.xt-sol tbody th { background: #f4f1ee; white-space: nowrap; text-align: left; position: sticky; left: 0; }
.xt-sol td { font-weight: 700; min-width: 32px; }
.xt-r { background: #dcf3e2; color: #1e7043; } .xt-m { background: #fdf1c7; color: #8a5a00; }
.xt-n { background: #fde0e3; color: #b03224; } .xt-no { background: #eee; color: #888; } .xt-q { background: #fff; color: #aaa; }
.xt-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 10px 0 0; font-size: 12px; color: var(--ink-2, #5a655f); }
.xt-legend span { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-right: -8px; border-radius: 4px; font-weight: 700; }

@media (max-width: 700px) {
  .xt-win, .xt-win--calc { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 75vh; }
}
@media (max-width: 700px) {
  .pk-bar { gap: 6px; padding-left: 10px; padding-right: 10px; }
  .pk-bar .et-count { display: none; }
  .pk-bar .et-time { font-size: 20px; }
  .pk-bar .et-warns { white-space: nowrap; }
  .pk-tools { gap: 4px; }
  .pk-tools button { padding: 6px; border-radius: 8px; }
  .pk-bar .et-btn { padding: 8px 10px; font-size: 13px; }
}

.pk-o > span, .pk-q-t > div, .pk-passage, .pk-mgrp { overflow-wrap: anywhere; }

/* Язык теста перед началом (21.11.2026). */
.pk-lang { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 12px 0 2px; font-size: 13px; }
.pk-lang span { color: var(--ink-3); margin-right: 4px; }
.pk-lang-b { font: inherit; font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.pk-lang-b.is-on { background: var(--green-soft); border-color: var(--green); color: var(--green-dark); }
.pk-lang-b:disabled { opacity: .6; cursor: default; }

/* Английский по сертификату (english_certificates.sql) */
.pk-cert { margin: -4px 0 6px; padding: 0 2px; font-size: 12px; color: var(--ink-3, #8a8f98); text-align: left; }
.pk-cert-note { color: var(--ink-2, #5b616b); }

/* БС — синяя обложка, как у EduCon (ПҚС — оранжевая). */
.pk-cover.is-bs span { background: #1f6fbf; border-bottom-color: #123a63; }
.pk-cover.is-bs b { background: #123a63; box-shadow: 4px -4px 0 #4ea3ef; }
.pk-cover.is-bs i { color: #1f6fbf; }
.pk-cover--big.is-bs b { box-shadow: 8px -8px 0 #4ea3ef; }
.pk-cover--big.is-bs em { background: #123a63; }
