/* ЛОГОС.Навигатор: нейтральный стиль; фирменные цвета — переменные ниже (заполнит заказчик, ТЗ 14.8) */
:root {
  --brand: #1f5fbf;
  --brand-dark: #174a96;
  --accent: #f2a900;
  --text: #1d2330;
  --muted: #5b6473;
  --bg: #ffffff;
  --soft: #f3f6fb;
  --line: #d9dee7;
  --error: #b3261e;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--brand); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.brand span { color: var(--brand); }
.top nav { display: flex; align-items: center; gap: 1rem; }
.inline { display: inline; margin: 0; }
main { padding: 1.25rem 1rem 3rem; margin: 0 auto; }
main.narrow { max-width: 34rem; }
main.wide { max-width: 64rem; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: .5rem 0 .75rem; }
h2 { font-size: 1.25rem; margin: 1.5rem 0 .5rem; }
h3 { font-size: 1.05rem; margin: .25rem 0 .5rem; }
.lead { font-size: 1.1rem; color: var(--muted); }
.muted { color: var(--muted); }
.error { color: var(--error); margin: .25rem 0 .75rem; }
.hero { padding: 1.5rem 0 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .6rem 1.25rem; border: 2px solid var(--brand); border-radius: var(--radius); background: var(--brand); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.secondary { background: #fff; color: var(--brand); }
.btn.secondary:hover { background: var(--soft); }
button.link { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; text-decoration: underline; cursor: pointer; min-height: 44px; }
.form { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0; }
.form label { display: flex; flex-direction: column; gap: .25rem; font-weight: 600; }
.form input, .form select { min-height: 48px; padding: .5rem .75rem; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; font-weight: 400; background: #fff; color: var(--text); }
.form input:focus, .form select:focus { outline: 3px solid rgba(31, 95, 191, .3); border-color: var(--brand); }
.form label.check { flex-direction: row; align-items: flex-start; gap: .6rem; font-weight: 400; }
.form label.check input { min-height: auto; width: 1.4rem; height: 1.4rem; margin-top: .15rem; flex: none; }
.form .btn { margin-top: .5rem; }
input.code { font-size: 1.6rem; letter-spacing: .3em; text-align: center; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin: 1rem 0; }
.card { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.card h2 { margin-top: 0; }
.card.soon { background: #fff; }
.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; background: var(--accent); color: #2b2100; font-size: .8rem; font-weight: 700; }
.legal { max-width: 42rem; }
.foot { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
@media (min-width: 48rem) { h1 { font-size: 2rem; } }

/* --- этап 2: кабинет, класс, ученик, тест ------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; margin: .5rem 0 1rem; }
table.grid { border-collapse: collapse; width: 100%; font-size: .95rem; }
table.grid th, table.grid td { border-bottom: 1px solid var(--line); padding: .5rem .6rem; text-align: left; vertical-align: top; }
table.grid th { background: var(--soft); font-weight: 600; }
.st-done { color: #1d6b32; }
.st-started { color: #8a5a00; }
.badge.warn { background: #ffe1d6; color: #7a2400; }
.card.notice { background: #eef6ee; border-color: #b9dcbf; margin: 1rem 0; }
.qr-row { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: flex-start; }
img.qr { width: 200px; height: 200px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.copy { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0; }
.copy input { flex: 1 1 16rem; min-height: 44px; padding: .4rem .6rem; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; background: #fff; }
.counters { display: flex; flex-wrap: wrap; gap: .75rem; margin: .5rem 0; }
.counter { padding: .5rem .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.counter b { font-size: 1.3rem; }
.counter span { display: block; color: var(--muted); font-size: .9rem; }
details.missing { margin: .5rem 0; }
details.missing summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
details.missing textarea { display: block; width: 100%; max-width: 30rem; margin: .5rem 0; font: inherit; padding: .4rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.inline-form select, .inline-form input { min-height: 44px; padding: .3rem .5rem; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; }
fieldset.sub { border: 1px dashed var(--line); border-radius: var(--radius); padding: .5rem .8rem; display: flex; flex-direction: column; gap: .5rem; }
fieldset.sub[hidden] { display: none; }
.code-big { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; font-size: 1.4em; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
ul.tests { list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-direction: column; gap: .75rem; }
li.test { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); }
li.test div { display: flex; flex-direction: column; }
.done-mark { font-size: 1.5rem; color: #1d6b32; }
.card.result { background: #fff; margin: 1rem 0; }
.card.parent { background: #fff8e6; border-color: #f0d38a; margin: 1rem 0; }
progress.progress { width: 100%; height: .5rem; appearance: none; border: 0; border-radius: 999px; background: var(--soft); overflow: hidden; }
progress.progress::-webkit-progress-bar { background: var(--soft); }
progress.progress::-webkit-progress-value { background: var(--brand); }
progress.progress::-moz-progress-bar { background: var(--brand); }
.test-title { margin: .4rem 0 1rem; }
.transition { padding: .6rem .8rem; background: #eef6ee; border-radius: var(--radius); }
fieldset.question { border: 0; padding: 0; margin: 0 0 1.5rem; }
fieldset.question.has-error { padding: .5rem; border-left: 4px solid var(--error); }
.q-text { font-size: 1.15rem; font-weight: 600; margin-bottom: .6rem; padding: 0; }
.q-text img { max-width: 100%; height: auto; display: block; margin: .5rem 0; }
.options { display: flex; flex-direction: column; gap: .5rem; }
label.option { display: flex; gap: .7rem; align-items: flex-start; min-height: 48px; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; background: #fff; }
label.option:has(input:checked) { border-color: var(--brand); background: #eaf1fc; }
label.option input { width: 1.3rem; height: 1.3rem; margin-top: .15rem; flex: none; }
label.option.dk, label.option.exclusive { border-style: dashed; }
label.option img { max-width: 100%; height: auto; }
.hint { display: block; color: var(--muted); font-size: .88rem; margin-top: .2rem; }
.scale { display: flex; gap: .4rem; }
.scale-btn { flex: 1; }
.scale-btn input { position: absolute; opacity: 0; }
.scale-btn span { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid var(--line); border-radius: var(--radius); font-weight: 600; cursor: pointer; }
.scale-btn input:checked + span { background: var(--brand); color: #fff; border-color: var(--brand); }
.scale-btn input:focus-visible + span { outline: 3px solid rgba(31, 95, 191, .4); }
.scale-ends { display: flex; justify-content: space-between; font-size: .85rem; margin: .25rem 0 0; }
label.rank { display: flex; gap: .6rem; align-items: center; margin: .4rem 0; }
label.rank select { min-height: 44px; min-width: 4rem; font: inherit; border: 1px solid var(--line); border-radius: var(--radius); }
fieldset.question textarea, input.answer { width: 100%; min-height: 48px; padding: .5rem .7rem; font: inherit; border: 1px solid var(--line); border-radius: var(--radius); }
.answer-label { display: flex; flex-direction: column; gap: .25rem; font-weight: 600; }
.test-nav { display: flex; gap: .75rem; justify-content: space-between; margin-top: 1rem; }
.test-nav .btn:last-child { flex: 1; }
.skip { display: block; margin: .75rem auto 0; }
/* лист A4 для печати */
body.sheet { background: #fff; }
.sheet-page { max-width: 42rem; margin: 0 auto; padding: 1rem; text-align: center; }
.sheet-brand { font-size: 1.3rem; }
img.qr-print { width: 360px; height: 360px; margin: 1rem auto; display: block; }
ol.steps { text-align: left; max-width: 30rem; margin: 1rem auto; font-size: 1.1rem; }
.no-print { padding: 1rem; text-align: center; }
@media print { .no-print { display: none; } body { font-size: 14pt; } @page { size: A4; margin: 15mm; } }
/* разметка заданий КИМ — как в онлайн-КИМ (services/mkt_kim/templates/take.html) */
.q-text.kim { font-weight: 400; font-size: 1.05rem; line-height: 1.6; }
.q-text.kim p { margin: .4rem 0; }
.figs { display: flex; flex-wrap: wrap; gap: 16px; } .figs figure { margin: 0; text-align: center; } .figs img { max-height: 220px; }
table.kt { border-collapse: collapse; margin: 8px 0; } table.kt td, table.kt th { border: 1px solid #888; padding: 4px 10px; text-align: center; }
.fr { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 2px; }
.fr > span:first-child { border-bottom: 1px solid currentColor; padding: 0 2px; }
.sys { display: inline-flex; flex-direction: column; border-left: 2px solid currentColor; border-radius: 8px 0 0 8px; padding-left: 8px; margin-left: 1em; }
.row3 { display: flex; flex-wrap: wrap; gap: 24px; }
ul.abc { list-style: none; padding-left: 0; }
.cap { margin-bottom: 0; font-weight: 600; }
label.option .fr, label.option img { vertical-align: middle; }
