/* Панель учителя. */
body { min-height: 100vh; }
.layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.spacer { flex: 1; }
.strong { font-weight: 600; }
.right { text-align: right; }
.wrap { flex-wrap: wrap; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.row-end { display: flex; justify-content: flex-end; gap: 4px; margin: -4px 0 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 14px; }
.warntext { color: var(--bad); }

/* боковая навигация */
.nav { background: var(--ink); color: #c9d0dc; display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 650; font-size: 18px; padding: 4px 10px 22px; }
.brand-mark { width: 24px; height: 24px; border-radius: 50%; border: 3px solid #7d93ff; position: relative; flex: none; }
.brand-mark::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: #7d93ff; }
.nav nav { display: flex; flex-direction: column; gap: 2px; }
.nav nav a { display: flex; align-items: center; gap: 10px; color: #c9d0dc; text-decoration: none; padding: 10px 12px; border-radius: var(--r-md); font-weight: 500; }
.nav nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav nav a.active { background: var(--accent); color: #fff; }
.ico { width: 18px; height: 18px; display: inline-grid; place-items: center; font-style: normal; flex: none; }
.ico::before { content: ''; display: block; }
.ico-home::before { width: 14px; height: 14px; border: 2px solid currentColor; border-radius: 4px; box-shadow: inset 0 -6px 0 -4px currentColor; }
.ico-tests::before { width: 12px; height: 15px; border: 2px solid currentColor; border-radius: 2px; background: linear-gradient(currentColor, currentColor) 2px 3px / 5px 2px no-repeat, linear-gradient(currentColor, currentColor) 2px 7px / 5px 2px no-repeat; }
.ico-exams::before { width: 15px; height: 15px; border: 2px solid currentColor; border-radius: 50%; background: linear-gradient(currentColor, currentColor) 5px 2px / 2px 5px no-repeat, linear-gradient(currentColor, currentColor) 5px 5px / 4px 2px no-repeat; }
.ico-groups::before { width: 16px; height: 12px; border-radius: 8px 8px 2px 2px; border: 2px solid currentColor; border-bottom-width: 3px; }
.ico-teachers::before { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; box-shadow: 0 0 0 2px var(--ink), 0 0 0 3.5px currentColor; transform: scale(0.75); }
.me { border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 14px 10px 0; }
.me-name { color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .muted { color: #8d97a8; }
.me-actions { display: flex; gap: 2px; margin-top: 8px; flex-wrap: wrap; margin-left: -8px; }
.me-actions .btn { color: #c9d0dc; }
.me-actions .btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.content { padding: 28px 36px 80px; max-width: 1320px; width: 100%; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.pagehead h1 { margin-bottom: 4px; }
.pagehead p { margin: 0; max-width: 62ch; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input[type=search] { max-width: 340px; }
.toolbar select { width: auto; }
.back { display: inline-block; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 10px; }
.back:hover { color: var(--accent); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; margin-bottom: 18px; }
.narrow-card { max-width: 880px; }
.empty { border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); padding: 40px 24px; text-align: center; color: var(--muted); }
.empty p { max-width: 52ch; margin: 0 auto 14px; }
.empty .actions { justify-content: center; }
.small-empty { padding: 24px; }
.callout { border-radius: var(--r-md); padding: 12px 16px; margin-bottom: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.callout.warn { background: var(--warn-soft); }

/* вкладки и сегменты */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs button { font: 500 14.5px var(--font); color: var(--muted); background: none; border: 0; border-bottom: 2.5px solid transparent; padding: 10px 14px; cursor: pointer; display: flex; gap: 8px; align-items: center; white-space: nowrap; margin-bottom: -1px; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.tabs .count { background: var(--sunken); border-radius: 999px; padding: 0 7px; font-size: 12px; }
.seg { display: inline-flex; background: var(--sunken); border-radius: var(--r-md); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { font: 500 13.5px var(--font); border: 0; background: none; padding: 7px 12px; border-radius: 7px; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(24, 32, 47, 0.12); }

/* переключатели */
.switch { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { flex: none; width: 38px; height: 22px; border-radius: 11px; background: var(--line-strong); position: relative; margin-top: 1px; transition: background 0.15s; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.15s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.switch-text { display: flex; flex-direction: column; gap: 2px; }
.switch-text > span { font-weight: 500; }
.switch-text small { color: var(--muted); font-size: 13px; }
.switch.disabled { opacity: 0.45; }

/* меню действий */
.menu { position: relative; display: inline-block; }
.menu-list { display: none; position: absolute; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); min-width: 220px; padding: 4px; z-index: 200; }
.menu-list.open { display: block; }
.menu-item { display: block; width: 100%; text-align: left; font: 400 14px var(--font); background: none; border: 0; padding: 9px 12px; border-radius: 7px; cursor: pointer; color: var(--ink); }
.menu-item:hover { background: var(--sunken); }
.menu-item.danger { color: var(--bad); }

/* таблицы */
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.table th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 10px 14px; background: #f8f9fb; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #f8f9fb; }
.table tr.row-bad td { background: var(--bad-soft); }
.table tr.inactive td { opacity: 0.55; }
.scroll-x { overflow-x: auto; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }

/* вход */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--ink); }
.login-card { background: var(--surface); border-radius: var(--r-lg); padding: 34px 32px 24px; width: min(400px, 100%); position: relative; }
.login-card .logo { color: var(--ink); padding: 0 0 22px; }
.login-card .brand-mark { border-color: var(--accent); }
.login-card .brand-mark::after { background: var(--accent); }
.login-card h1 { font-size: 24px; }
.login-card .lang-switch { margin-top: 10px; }

/* обзор */
.home-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.home-head h1 { font-size: 30px; margin-bottom: 4px; }
.home-head p { margin: 0; }
.home-live { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-bottom: 20px; }
.live-card { display: block; background: var(--accent); color: #fff; text-decoration: none; border-radius: var(--r-lg); padding: 20px 22px; }
.live-card:hover { background: var(--accent-deep); }
.live-card .muted { color: rgba(255, 255, 255, 0.75); }
.live-card .pill.ok { background: rgba(255, 255, 255, 0.18); color: #fff; }
.live-card h2 { margin: 12px 0 2px; font-size: 22px; }
.lc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 14px; }
.lc-stats div { display: flex; flex-direction: column; }
.lc-stats b { font-size: 26px; font-weight: 650; }
.lc-stats span { font-size: 12.5px; opacity: 0.8; }
.lc-stats .bad b { color: #ffd0d5; }
.lc-go { font-size: 14px; font-weight: 600; }
.home-cols { display: grid; grid-template-columns: 1fr 1fr 300px; gap: 18px; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li a { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); flex-wrap: wrap; }
.plain-list li:last-child a { border-bottom: 0; }
.plain-list .when { color: var(--accent-deep); font-size: 13.5px; min-width: 110px; }
.count-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.count-grid a { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--sunken); border-radius: var(--r-md); padding: 12px 14px; }
.count-grid b { font-size: 24px; font-weight: 650; }
.count-grid span { font-size: 13px; color: var(--muted); }
.onboard ol { margin: 0; padding-left: 20px; line-height: 1.9; }

/* библиотека тестов */
.test-list { display: flex; flex-direction: column; gap: 10px; }
.test-row { display: flex; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; cursor: pointer; }
.test-row:hover { border-color: var(--line-strong); }
.test-main { flex: 1; min-width: 0; }
.test-title { font-weight: 600; font-size: 16.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.clamp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: min(70ch, 100%); }
.test-meta { display: flex; gap: 6px 14px; align-items: center; flex-wrap: wrap; font-size: 13.5px; margin-top: 6px; color: var(--ink-2); }
.test-actions { display: flex; gap: 6px; align-items: center; }

/* конструктор */
.editor-head { position: sticky; top: 0; z-index: 30; background: var(--paper); padding: 4px 0 12px; margin-bottom: 4px; }
.title-input { font-size: 24px !important; font-weight: 650 !important; border-color: transparent !important; background: transparent !important; padding: 4px 8px !important; margin-left: -8px; }
.title-input:hover { border-color: var(--line) !important; }
.title-input:focus { background: var(--surface) !important; border-color: var(--accent) !important; }
.meta-row { margin: 6px 0 10px; }
.meta-row textarea { min-height: 40px; }
.editor-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.save-hint.dirty { color: var(--warn); font-weight: 500; }
.q-summary { display: flex; gap: 18px; font-size: 14px; color: var(--ink-2); margin-bottom: 10px; }
.q-list { display: flex; flex-direction: column; gap: 10px; }
.q-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.q-card.open { border-color: var(--line-strong); box-shadow: var(--shadow); }
.q-head { display: flex; gap: 10px; align-items: center; padding: 12px 14px; cursor: pointer; }
.q-n { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13.5px; flex: none; font-variant-numeric: tabular-nums; }
.q-type { font-size: 12.5px; font-weight: 600; color: var(--accent-deep); white-space: nowrap; }
.q-preview { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.q-tools { display: flex; gap: 4px; }
.q-tools .icon.danger:hover { background: var(--bad-soft); color: var(--bad); }
.q-body { display: none; padding: 4px 18px 18px 54px; border-top: 1px solid var(--line); }
.q-card.open .q-body { display: block; padding-top: 16px; }
.q-row { display: grid; grid-template-columns: 220px 100px 1fr; gap: 0 14px; }
.q-text { font-size: 15.5px !important; }
.img-box { display: flex; gap: 8px; align-items: center; margin: -6px 0 14px; flex-wrap: wrap; }
.img-box img { max-height: 120px; max-width: 260px; border-radius: var(--r-sm); border: 1px solid var(--line); }
.type-ed { background: #f8f9fb; border-radius: var(--r-md); padding: 14px; margin-bottom: 12px; }
.opt-rows { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.opt-row { display: flex; gap: 8px; align-items: center; }
.opt-row input[type=radio], .opt-row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--ok); flex: none; }
.opt-row.right input[type=text], .opt-row.right input:not([type]) { border-color: var(--ok); background: var(--ok-soft); }
.opt-row .letter { width: 18px; font-weight: 600; color: var(--muted); text-align: center; flex: none; }
.opt-row.pair input { flex: 1; }
.add { align-self: flex-start; }
.expl summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 4px 0; }
.add-bar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 16px; padding: 14px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); }
.set-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; margin-bottom: 16px; max-width: 880px; }
.set-block h3 { font-size: 17px; margin-bottom: 14px; }
.settings .switches { display: flex; flex-direction: column; margin: 8px 0; }
.field.inline { flex-direction: row; align-items: center; gap: 10px; margin: 0 0 6px 50px; flex-wrap: wrap; }
.field.inline input { width: 90px; }
.pd { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 14px; margin: 4px 0 8px; }
.pd summary { cursor: pointer; }
.pd .set-block { border: 0; padding: 12px 0 0; margin: 0; }
.group-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.gpick { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 8px 12px; cursor: pointer; }
.gpick input { accent-color: var(--accent); width: 16px; height: 16px; }
.gpick:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.mono-area { font: 13.5px/1.55 var(--mono) !important; }
.import-grid { display: grid; grid-template-columns: 1fr 300px; gap: 18px; }
.import-help ul { padding-left: 18px; margin: 0 0 12px; }
.import-help li { margin: 4px 0; }
.import-preview { margin-top: 12px; max-height: 220px; overflow: auto; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.ip-row { display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; }
.dialog.preview { width: min(860px, 100%); background: var(--paper); }
.pv-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; position: sticky; top: -24px; background: var(--paper); padding: 8px 0 12px; z-index: 2; }
.pv-q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; margin-bottom: 12px; }
.pv-head { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.pv-status { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.qtext { font-size: 17px; margin-bottom: 14px; }

/* экзамен */
.exam-head { margin-bottom: 8px; }
.exam-top { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; }
.exam-title h1 { margin-bottom: 8px; }
.exam-sub { display: flex; gap: 8px 14px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.linkbox { display: flex; gap: 8px; margin-top: 14px; max-width: 560px; }
.linkbox input { font-size: 14px; color: var(--accent-deep); }
.pinbox { background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 14px 22px; text-align: center; min-width: 150px; }
.pinbox small { display: block; font-size: 12.5px; opacity: 0.7; }
.pinbox b { font-size: 38px; font-weight: 700; letter-spacing: 0.06em; line-height: 1.15; }
.exam-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 16px 0 6px; }
.statbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 16px; display: flex; flex-direction: column; }
.stat b { font-size: 26px; font-weight: 650; line-height: 1.15; }
.stat span { font-size: 13px; color: var(--muted); }
.stat.bad { background: var(--bad-soft); border-color: transparent; }
.stat.bad b { color: var(--bad); }
.stat.warn { background: var(--warn-soft); border-color: transparent; }
.stat.warn b { color: var(--warn); }
.live-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }

/* плитки студентов — главный акцент мониторинга */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 10px; }
.tile { text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 12px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; position: relative; min-height: 132px; }
.tile:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.tile.locked { background: var(--bad-soft); border-color: var(--bad); box-shadow: inset 4px 0 0 var(--bad); }
.tile.done { background: #f8f9fb; }
.tile.absent { opacity: 0.6; }
.tile-top { display: flex; gap: 8px; align-items: center; }
.tile-name { font-weight: 600; line-height: 1.25; flex: 1; min-width: 0; }
.tile-cam { width: 44px; height: 33px; object-fit: cover; border-radius: 4px; flex: none; transform: scaleX(-1); }
.tile-id { margin-top: -4px; }
.tprog { height: 5px; background: var(--sunken); border-radius: 3px; overflow: hidden; }
.tprog i { display: block; height: 100%; background: var(--accent); }
.tile.done .tprog i { background: var(--ink-2); }
.tile-foot { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: auto; }
.tile-actions:empty { display: none; }
.feed-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; position: sticky; top: 16px; }
.feed-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.feed-head h3 { margin: 0; }
.feed-head select { width: auto; font-size: 13px; min-height: 32px; padding: 4px 8px; }
.feed { display: flex; flex-direction: column; max-height: 62vh; overflow: auto; }
.ev { display: flex; gap: 10px; text-align: left; font: 400 13.5px/1.4 var(--font); color: var(--ink); background: none; border: 0; border-left: 3px solid transparent; padding: 7px 8px; cursor: pointer; border-radius: 0 6px 6px 0; }
.ev:hover { background: var(--sunken); }
.ev time { color: var(--muted); flex: none; font-size: 12.5px; }
.ev.s2 { border-left-color: var(--bad); }
.ev.s1 { border-left-color: var(--warn); }
div.ev { cursor: default; }

/* результаты */
.results-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 18px; }
.histo { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; height: 170px; align-items: end; padding-top: 6px; }
.hcol { display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; gap: 4px; }
.hcol i { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.hcol i.below { background: var(--line-strong); }
.hn { font-size: 12px; font-weight: 600; }
.hl { font-size: 11px; color: var(--muted); }
.qstats { display: flex; flex-direction: column; gap: 6px; }
.qs-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 120px 44px; gap: 10px; align-items: center; font-size: 13.5px; }
.qs-n { font-weight: 600; color: var(--muted); }
.qs-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qs-bar { height: 8px; background: var(--sunken); border-radius: 4px; overflow: hidden; }
.qs-bar i { display: block; height: 100%; background: var(--ok); }
.qs-v { text-align: right; font-weight: 600; }
.table.heat td.hm { text-align: center; font-size: 12.5px; padding: 6px 4px; min-width: 34px; font-variant-numeric: tabular-nums; }
.table.heat th.hq { text-align: center; padding: 10px 4px; }
.hm.correct { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.hm.partial { background: var(--warn-soft); color: var(--warn); }
.hm.wrong { background: var(--bad-soft); color: var(--bad); }
.hm.pending { background: var(--warn-soft); }
.hm.empty, .hm.none { color: var(--line-strong); }

/* боковая карточка */
.drawer-back { position: fixed; inset: 0; background: rgba(24, 32, 47, 0.35); z-index: 900; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--paper); z-index: 901; overflow: auto; padding: 22px 24px 40px; box-shadow: -10px 0 40px rgba(24, 32, 47, 0.2); }
.drawer.wide { width: min(760px, 100%); }
.drawer section { margin-top: 22px; }
.drawer-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.drawer-head h2 { margin-bottom: 2px; font-size: 22px; }
.facts-row { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 14px; }
.facts-row > div { padding: 10px 12px; display: flex; flex-direction: column; }
.facts-row > div + div { border-left: 1px solid var(--line); }
.facts-row small { font-size: 12px; color: var(--muted); }
.score-line { display: flex; gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 18px; margin-top: 14px; }
.big-score { font-size: 38px; font-weight: 700; line-height: 1; }
.big-score small { font-size: 18px; color: var(--muted); font-weight: 500; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.shot { position: relative; display: block; border-radius: var(--r-sm); overflow: hidden; background: var(--ink); }
.shot img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transform: scaleX(-1); }
.shot span { position: absolute; left: 4px; bottom: 4px; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 11px; padding: 1px 5px; border-radius: 4px; }
.ans { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line-strong); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 8px; }
.ans.correct { border-left-color: var(--ok); }
.ans.partial, .ans.pending { border-left-color: var(--warn); }
.ans.wrong, .ans.empty { border-left-color: var(--bad); }
.ans.pending { box-shadow: 0 0 0 2px var(--warn-soft); }
.ans-head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.ans-given, .ans-correct { font-size: 14px; margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.essay-ans { background: #f8f9fb; border-radius: var(--r-sm); padding: 10px 12px; margin-top: 4px; white-space: pre-wrap; }
.ans-tools { display: flex; gap: 6px; align-items: flex-end; margin-top: 10px; flex-wrap: wrap; }
.ans-tools .mini { display: flex; flex-direction: column; gap: 2px; }
.ans-tools input { width: 90px; min-height: 32px; padding: 4px 8px; }
.small-img { max-height: 160px; }
.confirm-text { font-size: 16px; margin: 4px 0 8px; }

@media (max-width: 1100px) {
  .home-cols { grid-template-columns: 1fr 1fr; }
  .live-grid { grid-template-columns: 1fr; }
  .feed-box { position: static; }
  .results-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .nav nav { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  .toolbar input[type=search] { max-width: none; }
  .nav { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px; gap: 6px; }
  .nav .logo { padding: 4px 8px; }
  .nav nav { flex-direction: row; flex-wrap: wrap; }
  .nav nav a { padding: 8px 10px; }
  .nav .spacer { display: none; }
  .me { border: 0; padding: 0; width: 100%; display: flex; gap: 10px; align-items: center; }
  .me .muted { display: none; }
  .me-actions { margin: 0; }
  .content { padding: 18px 14px 60px; }
  .home-cols, .grid2, .grid3, .import-grid { grid-template-columns: 1fr; }
  .q-row { grid-template-columns: 1fr 100px; }
  .q-row .field:last-child { grid-column: 1 / -1; }
  .q-body { padding-left: 16px; }
  .exam-top { flex-direction: column; }
  .test-row { flex-direction: column; align-items: stretch; }
  .facts-row { grid-template-columns: 1fr 1fr; }
}
.pinbox.teacher b { font-size: 18px; letter-spacing: 0; display: block; margin-top: 4px; }
