.exam-response {
.student-ui{border:1px solid #c6b5db;border-radius:10px;padding:18px;margin:16px 0 22px;background:#fff}.student-ui h3{margin-top:0}.student-command{margin:12px 0 20px}.student-ui input:not([type=radio]),.student-ui textarea,.student-ui select{font:inherit;font-size:16px;padding:9px;border:1px solid #bfb4cc;border-radius:5px;background:white;color:#292332;max-width:100%;box-sizing:border-box}.student-ui input[type=text],.student-ui textarea{width:100%}.student-ui textarea{min-height:100px;resize:vertical}.answer-field{display:block;margin:12px 0}.answer-field>span{display:block;margin-bottom:5px}.student-ui input[type=radio]{width:19px;height:19px;accent-color:#7144a5}.tf-table td:not(:first-child),.tf-table th:not(:first-child){width:55px;text-align:center}.tf-table label{display:flex;align-items:center;justify-content:center;min-height:36px}.student-ui .inline-answer{display:inline-block!important;width:155px!important;margin:3px 4px!important}.student-ui select.inline-answer{width:auto!important;min-width:65px}.sentence{line-height:2.7}.option-group{border:0;padding:0;margin:14px 0}.option-group legend{font-weight:600}.option-group label{display:flex;gap:10px;align-items:start;margin:8px 0}.option-group input{flex-shrink:0;margin-top:5px}.mode-banner{padding:10px 12px;border-radius:6px;background:#eef4ed;color:#264429;margin:10px 0}.mode-banner.ai,.mode-banner.hybrid{background:#f0ebf8;color:#58377b}.student-ui .answer-table{table-layout:fixed}.student-ui .answer-table input,.student-ui .answer-table select{width:100%;margin:0}.student-ui .answer-table textarea{min-height:95px}.student-ui .answer-table td{vertical-align:top}.ai-inspection{background:#f8f6fb;border:1px solid #e1dae9;padding:14px;border-radius:8px;margin:16px 0}.ai-inspection pre{white-space:pre-wrap;overflow-wrap:anywhere;font:13px/1.55 ui-monospace,monospace;max-height:500px;overflow:auto}.answer-preview{white-space:pre-wrap;overflow-wrap:anywhere;background:white;padding:12px;border:1px solid #ded5e7;border-radius:5px}.muted{font-size:14px;color:#756b7c}.rich-shell{border:1px solid #bfb4cc;border-radius:6px;position:relative}.ribbon{display:flex;align-items:center;flex-wrap:nowrap;height:48px;padding:4px;gap:4px;background:#f4f0f9;border-bottom:1px solid #ded5e7}.ribbon button{white-space:nowrap;font-size:13px;margin:0;padding:5px 8px;min-height:36px}.rich-editor{min-height:130px;padding:12px;font-size:17px;overflow-wrap:anywhere;overflow-x:auto}.rich-editor:empty:before{content:'Wpisz odpowiedź…';color:#8a8194;pointer-events:none}.rich-editor table{table-layout:fixed}.rich-editor td{height:42px}.rich-editor p{min-height:24px;margin:6px 0}.rich-menu{position:absolute;z-index:5;top:46px;left:4px;background:white;border:1px solid #c9bfd4;box-shadow:0 6px 20px #0002;border-radius:7px;padding:6px;max-width:calc(100% - 10px)}.rich-menu button{display:block;margin:2px;width:calc(100% - 4px);text-align:left;font-size:14px}.rich-menu button:disabled{opacity:.45}.rich-menu[hidden]{display:none}dialog{border:1px solid #bfb4cc;border-radius:10px;max-width:calc(100% - 40px);color:#292332}dialog label{display:block;margin:12px 0}dialog input{width:65px;font:inherit;padding:7px}dialog::backdrop{background:#20182c60}.ribbon button[aria-pressed=true]{background:#7144a5;color:white}.answer-table .rich-shell .ribbon{display:none}.answer-table .rich-editor{min-height:90px}.ai-inspection [hidden]{display:none}.local-check{font-size:14px;color:#4c4256}.editor-tip{font-size:13px;color:#756b7c;margin:6px 0}.task>summary small{font-weight:600}button{cursor:pointer}

.completion-sentence{padding:14px;background:#f5f1fa;border-radius:7px;font-size:17px;line-height:1.8;margin:12px 0 18px}

}

.response-demo{max-width:960px;margin:24px auto;padding:16px}.response-demo-item{border:1px solid #c6b5db;border-radius:10px;margin:16px 0;padding:18px}.response-demo-item>summary{cursor:pointer;font-weight:600}.response-source{margin:24px 0;overflow:auto}.response-source img{max-width:100%;height:auto}.response-demo table,.exam-response table{width:100%;border-collapse:collapse}.response-demo td,.response-demo th,.exam-response td,.exam-response th{border:1px solid #c6b5db;padding:8px}.response-demo select{font:inherit;max-width:100%;padding:8px}.exam-response .ribbon{box-sizing:border-box;height:48px;overflow-x:auto}.exam-response [hidden]{display:none!important}.response-table-dialog{border:1px solid #bfb4cc;border-radius:10px;max-width:calc(100% - 40px)}.response-table-dialog label{display:block;margin:12px 0}.response-table-dialog input{width:65px;font:inherit;padding:7px}.response-table-dialog::backdrop{background:#20182c60}.response-inspection{margin:12px 0}.response-demo-item h2{font-size:20px}

.exam-response .student-ui{border:0;padding:0;margin:0;background:transparent}.exam-response .response-source{margin:20px 0}.exam-response .tabela-wybor{table-layout:auto}.exam-response .tabela-wybor td.kod{min-width:48px;white-space:nowrap}.exam-response .tabela-wybor label,.exam-response .opcje label{cursor:pointer}.exam-response .opcje label{display:flex;align-items:baseline;gap:10px}.exam-response .tabela-wybor input{margin-right:6px}.exam-response .response-source .sentence{line-height:2.5}.exam-response .response-source table{min-width:0}

/* Answer tables have their own layout; the site's 3rem P/F columns do not apply. */
.exam-response table:not(.tf-table) th,.exam-response table:not(.tf-table) td{width:auto;text-align:left;vertical-align:top}
.exam-response .answer-table th:first-child{width:26%}
.exam-response .answer-table td{min-width:140px}
.exam-response .rich-editor table{width:100%;table-layout:fixed;margin:12px 0}
.exam-response .rich-editor td{height:48px;min-width:72px;vertical-align:top}
.exam-response .tf-table th:not(:first-child),.exam-response .tf-table td:not(:first-child){width:52px;text-align:center}
.exam-response .student-ui{line-height:1.65}
.exam-response .student-ui label{margin:0;font-weight:400}
.exam-response .standalone-response>h2{font-size:1.1rem;margin:24px 0 12px}
.exam-response .answer-field>span{font-weight:600}
.exam-response .student-command{font-weight:600}
.exam-response .rich-editor[data-placeholder]:empty:before{content:attr(data-placeholder)}
.exam-response .rich-shell{background:var(--color-surface,#fff);border-color:var(--color-border-strong,#bfb4cc);border-radius:10px;overflow:hidden}
.exam-response .ribbon button{border:1px solid var(--color-border,#ded5e7);border-radius:6px;background:var(--color-surface,#fff);color:var(--color-text,#292332)}
.exam-response .ribbon button[aria-pressed=true]{background:var(--color-primary,#7144a5);color:white}
.exam-response .rich-editor:focus{outline:2px solid var(--color-primary,#7144a5);outline-offset:-2px}
.exam-response table{display:table;width:100%}
.exam-response .answer-table{min-width:540px}
.exam-response .answer-table th:first-child,.exam-response .answer-table td:first-child{width:18%;min-width:0}
.exam-toolbar strong [data-exam-position]{font-size:inherit;color:inherit}
.exam-response .response-source .answer-table{min-width:540px}
.exam-player,.exam-question,.exam-response,.exam-response .student-ui,.exam-response .response-source{min-width:0;max-width:100%}
/* Editor visual treatment, based on the approved image concept. */
.exam-response .standalone-response>h2{font-family:inherit;font-size:1.45rem;font-weight:600;color:var(--color-text);margin:24px 0 12px}
.exam-response .rich-shell{position:relative;background:var(--color-surface);border:1px solid var(--color-border);border-radius:8px;overflow:visible;box-shadow:0 3px 12px rgba(35,24,53,.035);transition:border-color .15s,box-shadow .15s}
.exam-response .rich-shell:focus-within{border-color:var(--color-border-strong);box-shadow:0 0 0 3px rgba(111,45,168,.055)}
.exam-response .ribbon{height:56px;padding:8px 12px;gap:4px;border-bottom:1px solid var(--color-border);background:var(--color-surface-soft);border-radius:8px 8px 0 0;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin}
.exam-response .ribbon button{display:inline-flex;align-items:center;justify-content:center;gap:7px;height:36px;min-height:36px;flex-shrink:0;margin:0;padding:6px 9px;border:0;border-radius:5px;background:transparent;color:var(--color-text);box-shadow:none;font-size:15px;font-weight:450;line-height:1;white-space:nowrap}
.exam-response .ribbon button:hover:not(:disabled){background:var(--color-primary-soft);color:var(--color-primary-strong)}
.exam-response .ribbon button:focus-visible,.exam-response .table-picker-cell:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}
.exam-response .ribbon button[aria-pressed=true],.exam-response .ribbon button[aria-expanded=true]{background:var(--color-primary-soft);color:var(--color-primary-strong)}
.exam-response .ribbon button[data-edit=superscript],.exam-response .ribbon button[data-edit=subscript]{display:block;font-family:inherit;font-size:21px;font-style:italic;min-width:34px;padding:5px 8px}
.exam-response .ribbon sup,.exam-response .ribbon sub{font-size:.6em;line-height:0}
.exam-response .ribbon-divider{height:26px;width:1px;flex-shrink:0;background:var(--color-border-strong);margin:0 7px}
.exam-response .table-operations{display:flex;gap:2px;margin-left:auto;padding-left:10px}
.exam-response .table-operations button{width:34px;padding:6px}
.exam-response .ribbon button:disabled{opacity:.3;cursor:default}
.exam-response .rich-editor{min-height:240px;padding:24px 26px;font-family:inherit;font-size:20px;line-height:1.8;color:var(--color-text);overflow-x:auto;border-radius:0 0 8px 8px}
.exam-response .rich-editor:empty:before{font-family:inherit;font-size:16px;color:var(--color-text-muted)}
.exam-response .rich-editor:focus{outline:0}
.exam-response .rich-editor p{margin:8px 0;min-height:28px}
.exam-response .rich-editor table{display:table;width:100%;table-layout:fixed;margin:14px 0;border-collapse:collapse;font-size:19px}
.exam-response .rich-editor td{height:52px;min-width:65px;padding:12px 16px;border:1px solid var(--color-border-strong);vertical-align:top;text-align:left}
.exam-response .rich-editor tr:first-child td{background:var(--color-surface-soft)}
.exam-response .answer-table .rich-editor{min-height:100px;padding:12px;font-size:18px}
.exam-response[data-readonly=true] .rich-editor{min-height:72px}
.exam-response .table-size-picker{position:absolute;top:50px;left:10px;width:234px;max-width:calc(100% - 20px);padding:15px;z-index:50;border:1px solid var(--color-border);border-radius:10px;background:var(--color-surface);color:var(--color-text);box-shadow:var(--shadow-raised,0 10px 30px rgba(35,24,53,.15))}
.exam-response .table-picker-title{font-family:inherit;font-size:14px;font-weight:650;line-height:1.5}
.exam-response .table-picker-size{display:block;font:inherit;font-size:13px;line-height:1.5;color:var(--color-text-muted);margin:3px 0 12px}
.exam-response .table-picker-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
.exam-response .table-picker-cell{display:block;aspect-ratio:1;width:100%;min-width:0;height:auto;min-height:0;margin:0;padding:0;background:var(--color-surface-soft);border:1px solid var(--color-border-strong);border-radius:3px;box-shadow:none;cursor:pointer;touch-action:manipulation}
.exam-response .table-picker-cell.is-selected{background:var(--color-primary-soft);border-color:var(--color-primary);box-shadow:inset 0 0 0 1px var(--color-primary)}
.exam-response .table-picker-hint{margin:10px 0 0;font:inherit;font-size:12px;line-height:1.5;color:var(--color-text-muted)}


/* One editable document in both views: collapsing never replaces its content. */
.exam-response .rich-shell{display:block;min-width:0;max-width:100%;border-color:#dedfe3;box-shadow:none;line-height:1.6}
.exam-response .rich-shell:focus-within{border-color:#999ba3;box-shadow:none}
.exam-response .rich-editor{display:block}
.exam-response .rich-shell.is-compact .rich-editor{box-sizing:border-box;min-height:56px;max-height:120px;overflow-y:auto;padding:14px 52px 14px 16px;font:inherit;font-size:16px;line-height:1.65;border-radius:8px;white-space:pre-wrap}
.exam-response .rich-shell.is-expanded .ribbon{display:flex;padding-right:52px;background:#f8f9fa;border-color:#dedfe3}
.exam-response .rich-shell.is-expanded .rich-editor{min-height:216px}
.exam-response .editor-expander{position:absolute;top:6px;right:6px;display:flex;align-items:center;justify-content:center;width:42px;height:42px;min-height:0;margin:0;padding:10px;border:0;border-radius:6px;background:transparent;color:#777b85;box-shadow:none}
.exam-response .editor-expander:hover{background:var(--color-surface-soft);color:var(--color-text)}
.exam-response .editor-expander:focus-visible{outline:2px solid #999ba3;outline-offset:1px}
.exam-response .editor-expander span{display:flex}
.exam-response .editor-expander .editor-collapse-icon,.exam-response .is-expanded .editor-expand-icon{display:none}
.exam-response .is-expanded .editor-collapse-icon{display:flex}
.exam-response .rich-shell.is-compact .rich-editor table{white-space:normal}
.exam-response[data-readonly=true] .rich-shell .rich-editor{min-height:56px;max-height:none;padding-right:16px}
.exam-response .rich-shell.is-compact .rich-editor{height:auto;max-height:none;white-space:normal;overflow:visible;overflow-wrap:anywhere}
.exam-response input[type=text][data-field]{max-width:100%;min-width:3em;box-sizing:border-box}
.exam-response textarea.inline-free-response{display:block;width:100%;max-width:100%;min-height:3.6em;margin:8px 0 18px;padding:10px 12px;box-sizing:border-box;white-space:pre-wrap;overflow-wrap:anywhere;resize:vertical;font:inherit;line-height:1.6}
.exam-response select.inline-answer{max-width:100%;min-width:3em;box-sizing:border-box}
.exam-response .choice-set{min-width:0;margin:16px 0;padding:0;border:0}
.exam-response .choice-set legend{margin-bottom:12px;font:inherit;font-weight:600}
.exam-response .student-ui label.choice-set-option:has(input[type=checkbox]){display:flex;align-items:flex-start;gap:12px;margin:8px 0;padding:12px;border:1px solid var(--color-border);border-radius:10px;cursor:pointer;line-height:1.6}
.exam-response .choice-set-option:has(input:checked){background:var(--color-primary-soft);border-color:var(--color-primary)}
.exam-response .choice-set-option input{width:20px;height:20px;min-width:20px;margin:3px 0 0;accent-color:var(--color-primary)}
.exam-response .choice-set-status{margin:8px 0;color:var(--color-text-muted);font-size:13px}
.exam-response .choice-set-status:empty{display:none}
.exam-response .choice-set-limit{display:block;font-size:13px;font-weight:400;margin-top:4px;color:var(--color-text-muted)}
.exam-response .choice-set.is-coded{display:grid;grid-template-columns:repeat(auto-fit,minmax(64px,1fr));gap:8px}
.exam-response .choice-set.is-coded>legend,.exam-response .choice-set.is-coded>.choice-set-status{grid-column:1/-1}
.exam-response .student-ui .choice-set.is-coded label.choice-set-option:has(input[type=checkbox]){justify-content:center;align-items:center;gap:8px;margin:0;min-height:44px;padding:8px}
.exam-response .after-response-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:12px;margin:14px 0}
.exam-response .after-response-field{display:grid;align-content:start;gap:6px;min-width:0}
.exam-response .after-response-field select{width:100%;max-width:100%;margin:0!important}
.exam-response .bounded-choice-options{display:grid;gap:8px}
.exam-response .student-ui .bounded-choice-options label:has(input){display:flex;align-items:flex-start;gap:8px;min-height:36px;padding:8px;line-height:1.5;border:1px solid var(--color-border);border-radius:8px}
.exam-response .bounded-choice-options input{flex-shrink:0;width:19px;height:19px;margin:2px 0 0;padding:0;accent-color:var(--color-primary)}
.exam-response .category-placement-table{table-layout:fixed;width:100%;margin:16px 0}
.exam-response .category-placement-table th,.exam-response .category-placement-table td{width:50%;padding:10px;vertical-align:top;overflow-wrap:anywhere}
.exam-response .category-target{width:100%;min-height:44px;padding:6px;border:0;border-radius:6px;background:var(--color-primary-soft);color:var(--color-text);font:inherit;font-weight:600;text-align:left}
.exam-response .category-placement .question-destination{min-height:160px;padding:6px;border-color:var(--color-border-strong);background:var(--color-surface);box-sizing:border-box}
.exam-response .category-placement .question-bank{background:var(--color-primary-soft);border-color:var(--color-border)}
.exam-response .category-placement .question-chip{padding:8px;box-sizing:border-box;border-color:var(--color-border-strong);color:var(--color-text);background:var(--color-surface);font-size:14px}
.exam-response .category-placement .question-chip[aria-pressed=true],.exam-response .category-placement .question-destination:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}
.exam-response .category-placement .question-drop-active{border-color:var(--color-primary);background:var(--color-primary-soft)}
.exam-response .category-placement .question-chip.answer-correct{background:#dcf5e3;border-color:#258147;color:#155b30}
.exam-response .category-placement .question-chip.answer-wrong{background:#ffebe9;border-color:#c33a36;color:#8e211d}
.exam-response .category-placement .question-chip.answer-missing{background:#fff;border:2px dashed #258147;color:#155b30}
.exam-response .category-placement .category-correction{display:flex;flex-direction:column;gap:4px;text-align:left}
.exam-response .category-placement .category-correction small{font-size:11px;font-weight:600}
.exam-response[data-readonly=true] .category-placement .question-hint{display:none}
.exam-response .matching-response{width:100%;table-layout:fixed;border-collapse:collapse;font-size:14px}
.exam-response .matching-response th,.exam-response .matching-response td{width:50%;padding:14px;border:1px solid var(--color-border);vertical-align:top;text-align:left;overflow-wrap:anywhere}
.exam-response .matching-response thead{background:var(--color-primary-soft)}
.exam-response .matching-response tbody th{font-weight:500;line-height:1.55}
.exam-response .matching-response select,.exam-response .matching-response textarea{display:block;width:100%;min-width:0;max-width:100%;box-sizing:border-box;padding:10px;border:1px solid var(--color-border-strong);border-radius:8px;background:var(--color-surface);color:var(--color-text);font:inherit}
.exam-response .matching-reason{display:grid;gap:6px;margin-top:12px;font-size:12px;color:var(--color-text-muted)}
.exam-response .matching-reason textarea{font-size:14px;line-height:1.6;resize:vertical}
@media(prefers-reduced-motion:reduce){.exam-response .rich-shell{transition:none}}

/* Explicit source bindings keep the original table shape; let text determine column widths. */
.exam-response.source-bound-response .answer-table{table-layout:auto}
.exam-response.source-bound-response .answer-table th:first-child,.exam-response.source-bound-response .answer-table td:first-child{width:auto}
.exam-response.source-bound-response .tf-table{table-layout:auto;min-width:0}
.exam-response.source-bound-response .tf-table th,.exam-response.source-bound-response .tf-table td{width:auto;text-align:left}
.exam-response.source-bound-response .tf-table td.response-truth-cell{width:64px;min-width:64px;text-align:center;white-space:nowrap}
.exam-response [data-answer-type="multiple_choice"]{display:grid;gap:.65rem}
.exam-response [data-answer-type="multiple_choice"]>label{display:flex;gap:.5rem;align-items:baseline}
.exam-response .response-set-option{display:inline-flex;align-items:baseline;gap:.4rem;margin:.25rem .85rem .25rem 0}
.exam-response.source-bound-response .tf-table label{display:flex;align-items:center;justify-content:center;gap:6px;min-height:36px}
.exam-response.source-bound-response .tf-table input[type=radio]{width:19px;height:19px;flex-shrink:0;margin:0}

/* Shared answer components keep the same compact columns and choice layout in both flows. */
.question-true-false-table .question-truth-column{width:48px}
.exam-response .question-true-false-table{table-layout:fixed}
.exam-response .question-true-false-table .question-truth-column{width:48px}
.exam-response .question-true-false-table td{padding:4px;text-align:center;vertical-align:middle}
.exam-response .question-true-false-table th[scope=row]{vertical-align:middle}
.exam-response .question-true-false-table label{min-height:48px}
.exam-response .ai-test-options{margin:12px 0}
.exam-response .ai-test-options label{margin:0;font-weight:400}
