.ms-page { max-width: 1500px; margin: 0 auto; }
.ms-hero { display: flex; gap: 18px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin: 20px 0; }
.ms-hero h1 { margin: 4px 0 8px; }
.ms-hero p { margin: 0; }
.ms-kicker { font-size: 12px; letter-spacing: .08em; color: #21643d; font-weight: 700; }
.ms-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.ms-grid > *, .ms-page label, .ms-builder label { min-width: 0; }
.ms-page label, .ms-builder label, .ms-response > label { display: block; font-weight: 600; margin: 10px 0; }
.ms-page input:not([type=radio]):not([type=checkbox]), .ms-page select, .ms-page textarea,
.ms-builder input, .ms-builder select, .ms-builder textarea, .ms-response textarea, .ms-response input[type=file] { display: block; width: 100%; box-sizing: border-box; margin-top: 6px; }
.ms-notice { padding: 14px 18px; border: 1px solid #bad3ea; border-radius: 10px; background: #eff7ff; color: #23445f; margin-bottom: 18px; }
.ms-card { background: #fff; border: 1px solid #cbd5e1; border-radius: 12px; padding: 20px; margin: 14px 0; min-width: 0; }
.ms-card h2, .ms-card h3 { margin-top: 0; }
.ms-card p { overflow-wrap: anywhere; }
.ms-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.ms-path { font-size: 13px; color: #52687b; margin-bottom: 10px; }
.ms-filters { display: grid; grid-template-columns: minmax(0,2fr) minmax(150px,1fr) auto; gap: 14px; align-items: end; }
.ms-builder { margin: 12px 16px; border: 1px solid #b6d5c2; background: #f6fbf8; border-radius: 10px; }
.ms-builder > summary, .ms-future > summary { padding: 12px 16px; cursor: pointer; font-weight: 700; }
.ms-builder-body { padding: 0 16px 14px; }
.ms-future { margin-top: 14px; border-top: 1px solid #cbd5e1; padding-bottom: 8px; }
.ms-future > :not(summary) { margin-left: 12px; margin-right: 12px; }
.ms-response { margin: 18px 0 0; padding: 18px; border: 1px dashed #97b3c9; border-radius: 10px; background: #f7fafc; }
.ms-response h3 { margin: 0; }
.ms-response fieldset { margin: 12px 0; border: 1px solid #cbd5e1; border-radius: 8px; }
.ms-choice { display: flex !important; align-items: baseline; gap: 10px; font-weight: 400 !important; padding: 6px; }
.ms-choice input { width: auto !important; }
.ms-message { min-height: 1.4em; font-weight: 600; color: #21643d; }
.ms-message.is-error { color: #a32c2c; }
.ms-page .actions, .ms-response .actions { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.ms-page button:disabled, .ms-response button:disabled { opacity: .55; cursor: not-allowed; }
.teacher-point-editor.is-editor-collapsed > .ms-builder { display: none; }
.ms-question { margin: 12px 0; }
.ms-empty { padding: 30px 18px; text-align: center; color: #52687b; }
@media (max-width: 760px) {
 .ms-grid, .ms-filters { grid-template-columns: minmax(0,1fr); }
 .ms-card { padding: 14px; }
 .ms-builder { margin: 10px; }
}

/* Sortowanie listy zadań. */
.ms-filters-sort { grid-template-columns: minmax(200px,2fr) repeat(3,minmax(130px,1fr)) auto; }
@media (max-width: 1150px) { .ms-filters-sort { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 760px) { .ms-filters-sort { grid-template-columns: minmax(0,1fr); } }

/* Lewa nawigacja dotyczy tylko strony Zadania z lekcji. */
.ms-task-layout { display: grid; grid-template-columns: minmax(240px,20%) minmax(0,1fr); gap: 18px; align-items: start; }
.ms-task-sidebar { position: sticky; top: calc(var(--header-offset, 100px) + 12px); max-height: calc(100vh - var(--header-offset, 100px) - 30px); overflow: auto; padding: 16px; border: 1px solid #cbd5e1; border-radius: 12px; background: white; }
.ms-task-sidebar h2 { margin: 0; font-size: 18px; }
.ms-task-content { min-width: 0; }
.ms-task-content > .ms-card:first-child { margin-top: 0; }
.ms-nav-toolbar { margin: 12px 0; }
.ms-nav-level { list-style: none; padding-left: 16px; margin: 4px 0; }
.ms-nav-level-0 { padding-left: 0; }
.ms-nav-level li { margin: 3px 0; }
.ms-nav-level summary { cursor: pointer; padding: 3px 0; }
.ms-nav-level a, .ms-nav-all { color: #294c63; text-decoration: none; overflow-wrap: anywhere; }
.ms-nav-level a { padding: 4px 5px; border-radius: 5px; }
.ms-nav-level a:hover, .ms-nav-all:hover { background: #edf6f0; }
.ms-nav-level a.is-active { background: #deeee4; color: #185d3a; font-weight: 700; }
.ms-nav-all { display: block; padding: 8px; margin: 12px 0; border: 1px solid #cbd5e1; border-radius: 7px; }
.ms-task-layout.is-menu-hidden { grid-template-columns: minmax(0,1fr); }
.ms-task-layout.is-menu-hidden > .ms-task-sidebar { display: none; }
.ms-task-content .ms-filters-sort { grid-template-columns: repeat(2,minmax(0,1fr)); }
@media (max-width: 900px) { .ms-task-layout { grid-template-columns: minmax(0,1fr); } .ms-task-sidebar { position: static; max-height: 45vh; } }
@media (max-width: 550px) { .ms-task-content .ms-filters-sort { grid-template-columns: minmax(0,1fr); } }

.ms-tasks-page { max-width: none; }

.st-answer-setting { padding: 12px; border: 1px solid #bdd4c5; border-radius: 8px; background: #edf7f0; margin-top: 12px; }
.st-answer-setting .check-line { display: flex; gap: 10px; align-items: center; }
.st-answer-setting input[type=checkbox] { width: auto; display: inline-block; margin: 0; }
.st-label { display: block; font-weight: 600; margin: 12px 0; }
.st-file { padding: 8px 0; overflow-wrap: anywhere; }
.st-file .check-line { display: inline-flex; gap: 6px; margin-left: 10px; font-weight: 400; }
.st-feedback { border-left: 4px solid #2a794e; padding: 12px 16px; background: #eef8f1; margin-top: 16px; }
.st-answer-text { white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid #cbd5e1; padding: 16px; border-radius: 8px; background: #f7fafc; }
