:root {
  --navy: #1f3a68;
  --navy-2: #2c4f8a;
  --accent: #e8a33d;
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #1c2433;
  --muted: #5d6b82;
  --line: #dde3ec;
  --ok: #2e7d4f;
  --err: #b3261e;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 16px;
}
header.top {
  background: var(--navy);
  color: #fff;
  padding: 14px 20px;
}
header.top .inner { max-width: 820px; margin: 0 auto; display: flex; align-items: center; gap: 12px; justify-content: space-between; }
header.top h1 { font-size: 18px; margin: 0; font-weight: 600; }
header.top .brand { font-size: 13px; opacity: .8; letter-spacing: .04em; text-transform: uppercase; }
main { max-width: 820px; margin: 0 auto; padding: 20px 16px 60px; }
.wide main, main.wide { max-width: 1100px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(20, 30, 60, .04);
}
h2 { color: var(--navy); font-size: 22px; margin: 0 0 8px; }
h3 { color: var(--navy); font-size: 17px; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); font-size: 14px; }
.pre { white-space: pre-wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--navy); background: var(--navy); color: #fff;
  padding: 10px 18px; border-radius: 8px; font-size: 15px; font-weight: 600;
  cursor: pointer; text-decoration: none; font-family: inherit;
}
.btn:hover { background: var(--navy-2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.secondary { background: #fff; color: var(--navy); }
.btn.secondary:hover { background: #eef2f8; }
.btn.danger { background: #fff; color: var(--err); border-color: var(--err); }
.btn.small { padding: 5px 10px; font-size: 13px; font-weight: 500; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }

/* Pytania */
.q { padding: 18px 0; border-top: 1px solid var(--line); }
.q:first-of-type { border-top: 0; padding-top: 4px; }
.q-text { font-weight: 600; margin-bottom: 4px; }
.q-text .req { color: var(--err); margin-left: 3px; }
.q-help { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.q.invalid .q-text { color: var(--err); }
.q .err-msg { color: var(--err); font-size: 13px; margin-top: 6px; display: none; }
.q.invalid .err-msg { display: block; }
.opts { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.opt {
  display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: #fff;
}
.opt:hover { border-color: var(--navy-2); }
.opt input { margin-top: 4px; accent-color: var(--navy); }
.opt.checked { border-color: var(--navy); background: #eef2f8; }
.scale { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 6px; margin-top: 8px; }
.scale .opt { flex-direction: column; align-items: center; text-align: center; font-size: 13px; padding: 10px 6px; }
.scale .opt input { margin: 0 0 4px; }
.scale .opt.na { background: #fafbfc; }
@media (max-width: 640px) {
  .scale { grid-template-columns: 1fr; }
  .scale .opt { flex-direction: row; text-align: left; font-size: 15px; }
  .scale .opt input { margin: 4px 0 0; }
}
textarea, input[type=text], input[type=password], input[type=email], select {
  width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--text);
}
textarea { min-height: 110px; resize: vertical; }
textarea:focus, input:focus, select:focus { outline: 2px solid #b9c8e3; border-color: var(--navy-2); }

.progress { height: 6px; background: #e3e8f0; border-radius: 99px; overflow: hidden; margin: 4px 0 16px; }
.progress > div { height: 100%; background: var(--accent); transition: width .3s; }
.nav { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.save-state { font-size: 13px; color: var(--muted); }
.save-state.ok { color: var(--ok); }
.save-state.err { color: var(--err); }
.notice { border-left: 4px solid var(--accent); background: #fff8ec; padding: 10px 14px; border-radius: 6px; font-size: 14px; margin-bottom: 14px; }
.center { text-align: center; }
.big-icon { font-size: 44px; line-height: 1; margin-bottom: 10px; color: var(--ok); }
.banner { background: var(--accent); color: #1c2433; text-align: center; font-size: 14px; padding: 6px; font-weight: 600; }
.spin { display: inline-block; width: 22px; height: 22px; border: 3px solid #c9d3e3; border-top-color: var(--navy); border-radius: 50%; animation: s 1s linear infinite; }
@keyframes s { to { transform: rotate(360deg); } }

/* Admin */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tabs button {
  background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px;
  font: inherit; font-weight: 600; color: var(--muted); cursor: pointer;
}
.tabs button.active { color: var(--navy); border-bottom-color: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.stat b { display: block; font-size: 24px; color: var(--navy); }
.stat span { font-size: 13px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
.table-wrap { overflow-x: auto; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.pill.nowa { background: #eef1f6; color: #4a5870; }
.pill.w_trakcie { background: #fff3dc; color: #8a5a00; }
.pill.wyslana { background: #e2f3e8; color: var(--ok); }
.qedit { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 10px; background: #fff; }
.qedit.sekcja { background: #f1f5fb; border-color: #c9d6ea; }
.qedit .head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.qedit .num { font-weight: 700; color: var(--navy); min-width: 28px; }
.qedit select { width: auto; }
.qedit label.inline { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; margin-right: 14px; }
.qedit .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
@media (max-width: 700px) { .qedit .grid2 { grid-template-columns: 1fr; } }
.field { margin-bottom: 12px; }
.field > label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 38%) 1fr 90px; gap: 10px; align-items: center; font-size: 14px; margin: 4px 0; }
.bar { height: 16px; background: #e8edf5; border-radius: 4px; overflow: hidden; }
.bar > div { height: 100%; background: var(--navy-2); }
.bar-row.na .bar > div { background: #9aa6b8; }
.bar-row .val { text-align: right; color: var(--muted); white-space: nowrap; }
.mean { font-size: 14px; margin-top: 6px; }
.open-list { max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.open-list div { padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 14px; white-space: pre-wrap; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #1c2433; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14px;
  opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 10;
}
.toast.show { opacity: 1; }
.hidden { display: none !important; }

/* Nowe typy pytań */
.opt.dim { opacity: .55; }
.opt .other-in { display: block; margin-top: 8px; width: 100%; }
.opt > span { flex: 1; }
.opt.rank { align-items: center; }
.opt.rank input { position: absolute; opacity: 0; pointer-events: none; }
.rank-no {
  flex: 0 0 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px; color: #fff;
}
.opt.rank.checked .rank-no { background: var(--navy); border-color: var(--navy); }
.mrow { padding: 10px 0; border-top: 1px dashed var(--line); }
.mrow:first-of-type { border-top: 0; }
.mrow-text { font-size: 15px; margin-bottom: 6px; }
.scale.num .opt { padding: 8px 2px; font-size: 14px; font-weight: 600; }
@media (max-width: 640px) {
  .scale.num { grid-template-columns: repeat(5, 1fr); }
  .scale.num .opt { flex-direction: column; align-items: center; text-align: center; }
  .scale.num .opt input { margin: 0 0 4px; }
}
.qedit .mini { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; margin-right: 14px; }
.qedit .mini input { width: 70px; padding: 5px 8px; }
.qedit .mini select { padding: 5px 8px; }

@media print {
  header.top, .tabs, .no-print, .btn { display: none !important; }
  body { background: #fff; }
  .card { break-inside: avoid; box-shadow: none; }
}
.opt { position: relative; }

/* ---- v3: strona respondenta ---- */
fieldset.q { border: 0; margin: 0; padding: 18px 0; min-width: 0; border-top: 1px solid var(--line); }
fieldset.q:first-of-type { border-top: 0; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 50; border-radius: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.chip { background: #eef2f8; color: #2c4f8a; border-radius: 99px; padding: 4px 12px; font-size: 13.5px; }
.intro p { margin: 0 0 10px; }
.intro ul { margin: 0 0 12px; padding-left: 22px; }
.intro li { margin-bottom: 6px; }
.intro-h { font-size: 15px; color: var(--navy); margin: 18px 0 8px; text-transform: none; }
.ok-notice { border-left-color: var(--ok); background: #e9f6ee; }
.warn-notice { border-left-color: var(--err); background: #fdecea; }
.btn.big { padding: 12px 24px; font-size: 16px; }
.btn.secondary { background: #fff; color: var(--navy); }
.progress-wrap { display: flex; justify-content: space-between; margin-bottom: 4px; }
.small { font-size: 13.5px; }
.center-nav { justify-content: center; }
.review { list-style: none; padding: 0; margin: 16px 0; }
.review li { margin-bottom: 8px; }
.linkish { width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; font: inherit; color: inherit; }
.linkish:hover { border-color: var(--navy-2); background: #f7f9fd; }
.rev.miss .linkish { border-color: #f0b8b3; background: #fff8f7; }
.rev-t { font-weight: 600; }
.err-text { color: var(--err); }
.ok-text { color: var(--ok); }
.msg-text p { margin: 0 0 10px; }
.opt:focus-within { outline: 3px solid #9fbbe6; outline-offset: 1px; }
.btn:focus-visible, .linkish:focus-visible, textarea:focus-visible { outline: 3px solid #9fbbe6; outline-offset: 2px; }
.q .count { text-align: right; margin-top: 4px; }
mark { background: #fff1b8; }

/* ---- v4: tryb testowy, blok informacyjny, nowe typy pytań ---- */
.banner.test-banner { background: #7c3aed; color: #fff; }
.chip.test-chip { background: #7c3aed; color: #fff; font-weight: 700; }
.test-notice input { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; box-sizing: border-box; }
.q.info { border-top: 1px solid var(--line); padding: 18px 0; }
.info-block { background: #f3f6fb; border-left: 4px solid #3b6fb6; border-radius: 8px; padding: 12px 16px; }
.info-block .info-title { font-weight: 600; margin-bottom: 4px; }
.info-block p { margin: .4em 0; }
.q .soft-msg { display: none; color: #8a5a00; background: #fff6e0; border-radius: 6px; padding: 6px 10px; font-size: 13px; margin-top: 8px; }
.q.soft .soft-msg { display: block; }
.scale-ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 4px; gap: 12px; }
.scale-ends span:last-child { text-align: right; }
.num-wrap { display: flex; align-items: center; gap: 8px; }
.num-in { width: 160px; max-width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.num-wrap .unit { color: var(--muted); }
input.short-in, select.dd { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; box-sizing: border-box; background: #fff; }
select.dd + .other-in { margin-top: 8px; }
.anon-note { font-size: 14px; }
.num-wrap input.num-in { width: 180px; flex: none; }

/* =====================================================================
   v5: wygląd „Panel z krokami” (nowoczesny, lekki)
   ===================================================================== */
:root { --navy: #1f3a68; --navy-2: #2c4f8a; --accent: #f2a93b; --text: #121a2b; --muted: #667085; --line: #e6e9ef; --rail-w: 320px; }
body { font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif; background: #fff; letter-spacing: -.003em; }
h2 { color: var(--text); letter-spacing: -.02em; line-height: 1.25; }
.btn { border-radius: 10px; padding: 11px 22px; transition: background .15s, box-shadow .15s, transform .05s; }
.btn:not(.secondary):not(.danger) { box-shadow: 0 6px 16px rgba(31,58,104,.22); }
.btn:active { transform: translateY(1px); }
.btn.big { padding: 13px 28px; font-size: 16px; }
.btn.secondary { border-color: #d0d5dd; color: var(--text); background: #fff; box-shadow: none; }
.chip { background: #f2f4f7; color: #344054; padding: 5px 12px; }
.notice { border-left-color: var(--accent); background: #fffaf1; border-radius: 10px; }
.notice.ok-notice { border-left-color: var(--ok); background: #effaf3; }

/* kontrolki */
.opt { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; gap: 12px; transition: background .15s, border-color .15s; }
.opt:hover { border-color: #c3cad6; background: #fcfcfd; }
.opt.checked { border-color: var(--navy); background: #f4f7fc; }
.opts .opt.checked::after { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 4px; border-radius: 10px 0 0 10px; background: var(--accent); }
.opt:focus-within { outline: 3px solid rgba(44,79,138,.22); outline-offset: 1px; }
.opt input[type=radio], .opt input[type=checkbox] { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 2px 0 0; border: 2px solid #6b7385; background: #fff; cursor: pointer; transition: all .15s; }
.opt input[type=radio] { border-radius: 50%; }
.opt input[type=checkbox] { border-radius: 6px; }
.opt input[type=radio]:checked { border-color: var(--navy); background: var(--navy); box-shadow: inset 0 0 0 4px #fff; }
.opt input[type=checkbox]:checked { border-color: var(--navy); background: var(--navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.scale { gap: 6px; }
.scale .opt { padding: 12px 4px; }
.scale.num .opt input { position: absolute; opacity: 0; }
.scale.num .opt.checked { background: var(--navy); color: #fff; border-color: var(--navy); }
.scale .opt.na { background: #f9fafb; }
.scale.num .opt.na.checked { background: #475467; border-color: #475467; }
.mrow { border-top: 1px solid #f0f2f5; padding: 14px 0; }
.opt.rank.checked .rank-no { background: var(--navy); }
fieldset.q, .q.info { border-top: 1px solid var(--line); padding: 26px 0; }
fieldset.q:first-of-type { border-top: 0; }
.q-text { font-size: 18px; font-weight: 650; line-height: 1.4; }
.q.invalid { background: linear-gradient(90deg, rgba(179,38,30,.05), transparent 60%); border-radius: 8px; }
.nav { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.progress { height: 5px; background: #eef0f4; }
.progress > div { background: linear-gradient(90deg, var(--navy), var(--accent)); }
.info-block { background: #f5f7fb; border-left-color: var(--navy); }

/* panel z krokami */
.rail, .mobbar { display: none; }
body.with-rail header.top { display: none; }
body.with-rail .rail { display: flex; position: fixed; left: 0; top: 0; bottom: 0; width: var(--rail-w); z-index: 4;
  background: linear-gradient(180deg, #1b3461 0%, #1f3a68 55%, #264b86 100%); color: #fff; padding: 32px 26px; flex-direction: column; gap: 22px; overflow-y: auto; }
body.with-rail main { max-width: none; margin-left: var(--rail-w); padding: 44px clamp(24px, 6vw, 96px) 80px; }
body.with-rail main > * { max-width: 720px; }
body.with-rail .banner { margin-left: var(--rail-w); }
body.with-rail .card { border: 0; box-shadow: none; padding: 0; background: transparent; }
body.with-rail .card.center { padding-top: 40px; }
body.with-rail h2 { font-size: 28px; }
body.with-rail .progress { display: none; }
.rail .logo { font-weight: 700; letter-spacing: .04em; font-size: 12.5px; display: flex; align-items: center; gap: 8px; opacity: .95; }
.rail .logo b { background: var(--accent); color: #1b3461; padding: 4px 8px; border-radius: 7px; letter-spacing: .02em; }
.rail .r-title { font-size: 21px; line-height: 1.3; margin: 0; font-weight: 700; letter-spacing: -.01em; color: #fff; }
.rail .ring { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.rail .ring span { opacity: .85; } .rail .ring b { font-size: 17px; opacity: 1; }
.rail ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.rail li button { all: unset; box-sizing: border-box; width: 100%; display: flex; gap: 12px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; font-size: 14px; line-height: 1.4; color: #fff; opacity: .78; cursor: default; }
.rail li button:focus-visible { outline: 2px solid var(--accent); }
.rail li .d { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); display: grid; place-content: center; font-size: 11px; font-weight: 700; margin-top: -1px; }
.rail li.done button { opacity: .88; } .rail li.done .d { background: rgba(255,255,255,.92); color: #1f3a68; border-color: transparent; }
.rail li.done.nav-ok button { cursor: pointer; } .rail li.done.nav-ok button:hover { background: rgba(255,255,255,.08); }
.rail li.cur button { opacity: 1; background: rgba(255,255,255,.12); font-weight: 600; } .rail li.cur .d { background: var(--accent); border-color: var(--accent); color: #1b3461; }
.rail .foot { margin-top: auto; font-size: 12.5px; opacity: .75; line-height: 1.5; }
.rail .foot a { color: #fff; }
@media (max-width: 960px) {
  body.with-rail .rail { display: none; }
  body.with-rail main { margin-left: 0; padding: 20px 18px 70px; }
  body.with-rail .banner { margin-left: 0; }
  body.with-rail .mobbar { display: block; position: sticky; top: 0; z-index: 5; background: #1f3a68; color: #fff; padding: 12px 18px 14px; }
  .mobbar .t { font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; gap: 10px; }
  .mobbar .t span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobbar .dots { display: flex; gap: 4px; margin-top: 10px; }
  .mobbar .dots i { flex: 1; height: 4px; border-radius: 3px; background: rgba(255,255,255,.25); }
  .mobbar .dots i.on { background: var(--accent); }
  body.with-rail h2 { font-size: 23px; }
  .q-text { font-size: 17px; }
}
@media print { .rail, .mobbar { display: none !important; } body.with-rail main { margin-left: 0; } }

/* ---- v7: dostępność (WCAG 2.2 AA) ---- */
::placeholder { color: #6b7280; opacity: 1; }
.foot { max-width: 820px; margin: 0 auto; padding: 0 16px 28px; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); }
body.with-rail .foot { margin-left: var(--rail-w); max-width: none; padding: 0 clamp(24px, 6vw, 96px) 28px; }
.foot a { color: var(--navy); }
.a11y { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.a11y button { font: inherit; font-size: 13px; border: 1px solid #b8c0cc; background: #fff; color: var(--text); border-radius: 8px; padding: 5px 10px; min-height: 32px; min-width: 36px; cursor: pointer; }
.a11y button[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.a11y button:focus-visible, .foot a:focus-visible, .btn:focus-visible, .rail button:focus-visible { outline: 3px solid #e69f00; outline-offset: 2px; }
body.fs1 #app { zoom: 1.15; } body.fs2 #app { zoom: 1.3; }
@media (max-width: 960px) { body.with-rail .foot { margin-left: 0; padding: 0 18px 24px; } }
fieldset.q, .q-text, .opt, input, textarea, select, button { scroll-margin-top: 96px; scroll-margin-bottom: 24px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
/* wysoki kontrast */
body.hc { --navy: #000; --navy-2: #000; --text: #000; --muted: #1a1a1a; --line: #000; --accent: #ffd400; background: #fff; color: #000; }
body.hc .card, body.hc .opt, body.hc .notice, body.hc .info-block, body.hc .chip { background: #fff !important; border: 2px solid #000 !important; color: #000 !important; }
body.hc .opt.checked { background: #ffd400 !important; }
body.hc .scale.num .opt.checked { background: #000 !important; color: #fff !important; }
body.hc .opts .opt.checked::after { background: #000; }
body.hc .btn { background: #000 !important; color: #fff !important; border: 2px solid #000 !important; box-shadow: none !important; }
body.hc .btn.secondary { background: #fff !important; color: #000 !important; }
body.hc .rail, body.hc .mobbar { background: #000 !important; }
body.hc .rail li button { opacity: 1; } body.hc .rail li.cur button { background: #333; }
body.hc a { color: #000; text-decoration: underline; }
body.hc .q-help, body.hc .muted, body.hc .rp-note { color: #000 !important; }
body.hc .opt input[type=radio], body.hc .opt input[type=checkbox] { border-color: #000; }
body.hc *:focus-visible { outline: 4px solid #000 !important; box-shadow: 0 0 0 7px #ffd400 !important; }
body.hc .err-msg { color: #b00000; font-weight: 700; }

/* MaxDiff (najważniejsze / najmniej ważne) */
.md-set { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 12px; margin: 12px 0; }
.md-set.done { border-color: #b9c7de; }
.md-cap { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.md-ok { color: var(--ok); font-weight: 700; }
.md-grid { display: grid; grid-template-columns: minmax(64px, auto) 1fr minmax(64px, auto); gap: 6px 8px; align-items: stretch; }
.md-h { font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; align-self: end; line-height: 1.25; }
.md-c { display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; min-height: 44px; }
.md-c input { width: 22px; height: 22px; margin: 0; cursor: pointer; accent-color: var(--navy); }
.md-c.b.checked { background: #e6f2ea; border-color: var(--ok); }
.md-c.w.checked { background: #fbe9e7; border-color: var(--err); }
.md-c:focus-within { outline: 3px solid var(--accent); outline-offset: 1px; }
.md-item { display: flex; align-items: center; padding: 8px 10px; border-radius: 8px; background: #f7f9fc; font-size: 15px; }
.md-item.is-b { font-weight: 600; }
.md-item.is-w { color: var(--muted); }
@media (max-width: 480px) { .md-grid { grid-template-columns: 52px 1fr 52px; } .md-h { font-size: 11px; } .md-item { font-size: 14px; } }
body.hc .md-c, body.hc .md-item { border: 2px solid #000 !important; background: #fff !important; color: #000 !important; }
body.hc .md-c.checked { background: #ffd400 !important; }
/* MaxDiff – zestaw po zestawie */
.md-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 10px 0 4px; }
.md-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.md-dot { width: 26px; height: 8px; border-radius: 4px; border: 0; padding: 0; background: var(--line); cursor: pointer; }
.md-dot.done { background: var(--ok); }
.md-dot.cur { background: var(--navy); outline: 2px solid var(--accent); outline-offset: 2px; }
.md-dot:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.md-step { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; }
.md-step .btn.sm { padding: 8px 12px; font-size: 14px; }
.md-step .btn[disabled] { opacity: .45; cursor: default; }
.md-cap:focus { outline: none; }
body.hc .md-dot { background: #fff; border: 2px solid #000; } body.hc .md-dot.done { background: #000; } body.hc .md-dot.cur { background: #ffd400; }
.md-grid { grid-template-columns: minmax(84px, 24%) 1fr minmax(84px, 24%); }
.md-h { overflow-wrap: anywhere; hyphens: auto; }
@media (max-width: 480px) { .md-grid { grid-template-columns: minmax(78px, 25%) 1fr minmax(78px, 25%); gap: 6px; } }
