:root{
  --test-primary:#155eef;
  --test-accent:#06b6d4;
  --test-dark:#071b5f;
  --test-text:#334155;
  --test-muted:#64748b;
  --test-border:#dbeafe;
  --test-green:#16a34a;
}

.unified-lesson-test .unified-test-header{
  position:sticky!important;
  top:0!important;
  z-index:1000!important;
  width:100%!important;
  max-width:none!important;
  min-height:72px!important;
  margin:0 0 24px!important;
  padding:12px max(18px,calc((100vw - 1440px)/2))!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:20px!important;
  background:rgba(255,255,255,.92)!important;
  border:0!important;
  border-bottom:1px solid rgba(219,234,254,.95)!important;
  border-radius:0!important;
  box-shadow:0 12px 30px rgba(15,23,42,.09)!important;
  backdrop-filter:blur(14px);
}

.unified-test-header .unified-test-brand{
  display:inline-flex!important;
  align-items:center!important;
  gap:12px!important;
  color:var(--test-dark)!important;
  font:800 22px/1.2 Inter,Arial,sans-serif!important;
  letter-spacing:-.04em!important;
  text-decoration:none!important;
}

.unified-test-header .unified-test-brand-mark{
  display:inline-grid!important;
  place-items:center!important;
  flex:0 0 42px!important;
  width:42px!important;
  height:42px!important;
  border-radius:12px!important;
  overflow:hidden!important;
  background:#155eef!important;
  color:transparent!important;
  font-size:0!important;
  font-style:normal!important;
  line-height:1!important;
  box-shadow:none!important;
}

.unified-test-header .unified-test-brand-mark::after{
  content:"M"!important;
  display:grid!important;
  place-items:center!important;
  width:100%!important;
  height:100%!important;
  color:#fff!important;
  font:900 25px/1 Inter,Arial,sans-serif!important;
  letter-spacing:0!important;
  transform:none!important;
}

.unified-test-header .unified-test-back{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:190px!important;
  min-height:46px!important;
  padding:12px 18px!important;
  border:1px solid var(--test-border)!important;
  border-radius:999px!important;
  background:#fff!important;
  color:var(--test-primary)!important;
  font:800 16px/1.2 Inter,Arial,sans-serif!important;
  text-decoration:none!important;
  box-shadow:0 10px 24px rgba(15,23,42,.06)!important;
  transition:transform .2s,box-shadow .2s!important;
}

.unified-test-header .unified-test-back:hover{
  transform:translateY(-2px)!important;
  box-shadow:0 14px 28px rgba(15,23,42,.11)!important;
}

.unified-test-header .unified-test-header-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:14px!important;
  min-width:0!important;
}

.unified-test-header .course-level-switch{
  display:inline-flex!important;
  align-items:center!important;
  gap:4px!important;
  padding:6px!important;
  border:2px solid #bfdbfe!important;
  border-radius:20px!important;
  background:#eaf2ff!important;
  box-shadow:0 8px 20px rgba(21,94,239,.08)!important;
}

.unified-test-header .course-level-switch__option{
  width:auto!important;
  min-width:142px!important;
  min-height:48px!important;
  margin:0!important;
  padding:11px 18px!important;
  border:0!important;
  border-radius:15px!important;
  background:transparent!important;
  color:#52627e!important;
  box-shadow:none!important;
  font:900 16px/1.2 Inter,Arial,sans-serif!important;
  white-space:nowrap!important;
  cursor:pointer!important;
}

.unified-test-header .course-level-switch__option.is-active{
  background:#fff!important;
  color:var(--test-primary)!important;
  box-shadow:0 8px 18px rgba(15,23,42,.08)!important;
}

.unified-test-header .course-level-switch__option:focus-visible{
  outline:3px solid rgba(6,182,212,.38)!important;
  outline-offset:2px!important;
}

.unified-test-header .course-level-switch__select,
.unified-test-header .unified-test-back__icon{
  display:none;
}

.unified-test-header .unified-test-back__icon{
  width:22px;
  height:22px;
  fill:none;
  stroke:currentColor;
  stroke-width:2.4;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.unified-lesson-test .answers{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:12px!important;
  margin-top:18px!important;
}

.unified-lesson-test .answer{
  width:100%!important;
  min-height:56px!important;
  margin:0!important;
  padding:15px 17px!important;
  display:flex!important;
  align-items:flex-start!important;
  gap:12px!important;
  border:2px solid #e2e8f0!important;
  border-radius:16px!important;
  background:#fff!important;
  color:var(--test-text)!important;
  font:700 16px/1.5 Inter,Arial,sans-serif!important;
  text-align:left!important;
  cursor:pointer!important;
  box-shadow:none!important;
  transition:border-color .18s,background .18s,transform .18s!important;
}

.unified-lesson-test .answer:hover:not(:disabled){
  border-color:#60a5fa!important;
  background:#eff6ff!important;
  transform:translateY(-1px)!important;
}

.unified-lesson-test .answer.selected,
.unified-lesson-test .answer[aria-pressed="true"],
.unified-lesson-test .answer:has(input:checked){
  border-color:var(--test-primary)!important;
  background:#eff6ff!important;
}

.unified-lesson-test .answer.correct{
  border-color:#22c55e!important;
  background:#f0fdf4!important;
  color:#166534!important;
}

.unified-lesson-test .answer.wrong{
  border-color:#ef4444!important;
  background:#fef2f2!important;
  color:#991b1b!important;
}

.unified-lesson-test .feedback .plain-feedback-label{
  display:block!important;
  margin-bottom:6px!important;
  color:var(--test-dark)!important;
  font-weight:900!important;
}

.unified-lesson-test .test-instruction > strong:first-child{
  display:block!important;
  margin-bottom:8px!important;
}

.unified-lesson-test .answer input{
  flex:0 0 auto!important;
  width:20px!important;
  height:20px!important;
  margin:2px 0 0!important;
  accent-color:var(--test-primary)!important;
}

.unified-lesson-test .unified-result-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  justify-content:center!important;
  gap:12px!important;
  margin-top:24px!important;
}

.unified-lesson-test .unified-result-action{
  min-width:230px!important;
  min-height:58px!important;
  padding:15px 24px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:18px!important;
  font:900 17px/1.2 Inter,Arial,sans-serif!important;
  text-align:center!important;
  text-decoration:none!important;
  transition:transform .2s,box-shadow .2s!important;
}

.unified-lesson-test .unified-result-action.is-green{
  border:0!important;
  background:linear-gradient(135deg,#22c55e,var(--test-green))!important;
  color:#fff!important;
  box-shadow:0 15px 28px rgba(34,197,94,.24)!important;
}

.unified-lesson-test .unified-result-action.is-secondary{
  border:1px solid var(--test-border)!important;
  background:#fff!important;
  color:var(--test-primary)!important;
  box-shadow:0 12px 24px rgba(21,94,239,.09)!important;
}

.unified-lesson-test .unified-result-action:hover{
  transform:translateY(-2px)!important;
}

.adaptive-section-test{
  padding-bottom:70px!important;
}

.adaptive-section-test .hero{
  text-align:left!important;
}

.adaptive-section-test .hero h1{
  margin:14px 0 12px!important;
}

.adaptive-section-test .hero p{
  max-width:780px!important;
  margin:0!important;
  color:var(--test-muted)!important;
  font-size:1.06rem!important;
}

.adaptive-section-test .adaptive-test-scope{
  display:block!important;
  margin:0 0 28px!important;
  padding:20px 22px!important;
  border:1px solid #bae6fd!important;
  border-radius:20px!important;
  background:#f0f9ff!important;
  color:#0c4a6e!important;
  box-shadow:0 10px 24px rgba(15,23,42,.04)!important;
}

.adaptive-section-test .adaptive-test-scope__heading{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:16px!important;
  margin-bottom:7px!important;
}

.adaptive-section-test .adaptive-test-scope strong{
  color:#075985!important;
  font-size:17px!important;
  font-weight:900!important;
}

.adaptive-section-test .adaptive-scope-pill{
  display:inline-flex!important;
  align-items:center!important;
  min-height:34px!important;
  padding:6px 12px!important;
  border:1px solid #bfdbfe!important;
  border-radius:999px!important;
  background:#fff!important;
  color:var(--test-primary)!important;
  font-size:13px!important;
  font-weight:900!important;
  white-space:nowrap!important;
}

.adaptive-section-test .adaptive-test-scope p{
  margin:0!important;
  line-height:1.65!important;
}

.adaptive-section-test .adaptive-test-scope .adaptive-scope-detail{
  margin-top:6px!important;
  color:#075985!important;
  font-weight:800!important;
}

.adaptive-section-test .question-header{
  display:flex!important;
  align-items:flex-start!important;
  gap:14px!important;
}

.adaptive-section-test .question-header>div{
  min-width:0!important;
  flex:1 1 auto!important;
}

.adaptive-section-test .question-text{
  margin:4px 0 0!important;
  color:var(--test-dark)!important;
  font-size:1.18rem!important;
  font-weight:800!important;
  line-height:1.45!important;
}

.adaptive-section-test .adaptive-question-table{
  max-width:760px!important;
  margin:20px auto 4px!important;
}

.adaptive-section-test .task-table-wrap{
  overflow-x:auto!important;
  border:1px solid var(--test-border)!important;
  border-radius:20px!important;
  background:#fff!important;
  box-shadow:0 12px 28px rgba(15,62,140,.08)!important;
}

.adaptive-section-test .task-data-table{
  display:table!important;
  width:100%!important;
  min-width:440px!important;
  border-collapse:collapse!important;
  table-layout:fixed!important;
  color:var(--test-text)!important;
  font-size:1rem!important;
  line-height:1.4!important;
  text-align:center!important;
}

.adaptive-section-test .task-data-table thead{
  display:table-header-group!important;
}

.adaptive-section-test .task-data-table tbody{
  display:table-row-group!important;
}

.adaptive-section-test .task-data-table tr{
  display:table-row!important;
}

.adaptive-section-test .task-data-table th,
.adaptive-section-test .task-data-table td{
  display:table-cell!important;
}

.adaptive-section-test .task-data-table caption{
  padding:15px 18px!important;
  border-bottom:1px solid var(--test-border)!important;
  background:#eff6ff!important;
  color:var(--test-dark)!important;
  font-weight:900!important;
  text-align:left!important;
}

.adaptive-section-test .task-data-table th,
.adaptive-section-test .task-data-table td{
  min-width:76px!important;
  padding:14px 16px!important;
  border-right:1px solid var(--test-border)!important;
  border-bottom:1px solid var(--test-border)!important;
}

.adaptive-section-test .task-data-table th{
  background:#f8fbff!important;
  color:#1d4ed8!important;
  font-weight:900!important;
}

.adaptive-section-test .task-data-table tbody th{
  background:#eff6ff!important;
  color:var(--test-dark)!important;
}

.adaptive-section-test .task-data-table th:last-child,
.adaptive-section-test .task-data-table td:last-child{
  border-right:0!important;
}

.adaptive-section-test .task-data-table tbody tr:last-child td{
  border-bottom:0!important;
}

.adaptive-section-test .question-topic,
.adaptive-section-test .adaptive-level-tag{
  display:inline-flex!important;
  margin:0 8px 8px 0!important;
  padding:6px 10px!important;
  border-radius:999px!important;
  background:#eff6ff!important;
  color:#1d4ed8!important;
  font-size:13px!important;
  font-weight:900!important;
}

.adaptive-section-test .adaptive-level-tag{
  background:#f3e8ff!important;
  color:#7e22ce!important;
}

.adaptive-section-test .answer{
  position:relative!important;
  font-weight:400!important;
}

.adaptive-section-test .answer::before{
  content:""!important;
  flex:0 0 20px!important;
  width:20px!important;
  height:20px!important;
  margin-top:2px!important;
  border:2px solid #94a3b8!important;
  border-radius:50%!important;
  background:#fff!important;
  box-shadow:inset 0 0 0 4px #fff!important;
}

.adaptive-section-test .answer.selected::before{
  border-color:var(--test-primary)!important;
  background:var(--test-primary)!important;
}

.adaptive-section-test .answer.correct::before{
  border-color:#22c55e!important;
  background:#22c55e!important;
}

.adaptive-section-test .answer.wrong::before{
  border-color:#ef4444!important;
  background:#ef4444!important;
}

.adaptive-section-test .answer:disabled{
  cursor:default!important;
  opacity:1!important;
}

.adaptive-section-test .adaptive-question-figure{
  max-width:720px!important;
  margin:20px auto 0!important;
  padding:16px!important;
  border:1px solid var(--test-border)!important;
  border-radius:20px!important;
  background:#f8fbff!important;
  text-align:center!important;
}

.adaptive-section-test .adaptive-question-figure svg{
  display:block!important;
  width:100%!important;
  height:auto!important;
  max-height:330px!important;
}

.adaptive-section-test .adaptive-question-figure figcaption{
  margin-top:10px!important;
  color:var(--test-muted)!important;
  font-size:14px!important;
  line-height:1.5!important;
}

.adaptive-section-test .feedback{
  display:none!important;
}

.adaptive-section-test .question.checked .feedback{
  display:block!important;
  border:1px solid #bfdbfe!important;
  background:#eff6ff!important;
  color:#1e3a8a!important;
}

.adaptive-section-test .adaptive-feedback-heading{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:16px!important;
}

.adaptive-section-test .plain-feedback-label{
  margin:0!important;
  font-weight:900!important;
}

.adaptive-section-test .plain-feedback-label.is-correct{color:#166534!important}
.adaptive-section-test .plain-feedback-label.is-wrong{color:#991b1b!important}
.adaptive-section-test .plain-feedback-label.is-empty{color:#92400e!important}

.adaptive-section-test .adaptive-explanation-toggle{
  min-height:42px!important;
  padding:9px 14px!important;
  border:1px solid #93c5fd!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#1d4ed8!important;
  font:800 14px/1.25 Inter,Arial,sans-serif!important;
  cursor:pointer!important;
}

.adaptive-section-test .adaptive-explanation-toggle:hover{
  border-color:var(--test-primary)!important;
  background:#dbeafe!important;
}

.adaptive-section-test .adaptive-explanation-toggle:focus-visible{
  outline:3px solid rgba(6,182,212,.38)!important;
  outline-offset:2px!important;
}

.adaptive-section-test .adaptive-explanation[hidden]{
  display:none!important;
}

.adaptive-section-test .adaptive-explanation{
  display:grid!important;
  gap:10px!important;
  margin-top:14px!important;
}

.adaptive-section-test .adaptive-explanation-step{
  display:grid!important;
  grid-template-columns:minmax(155px,.35fr) minmax(0,1.65fr)!important;
  gap:12px!important;
  padding-top:10px!important;
  border-top:1px solid rgba(147,197,253,.42)!important;
}

.adaptive-section-test .adaptive-explanation-step strong{
  color:var(--test-dark)!important;
}

.adaptive-section-test .adaptive-topic-summary{
  margin-top:32px!important;
  text-align:left!important;
}

.adaptive-section-test .adaptive-topic-summary h3{
  margin:0 0 8px!important;
  color:var(--test-dark)!important;
  font-size:clamp(25px,3vw,34px)!important;
  line-height:1.2!important;
}

.adaptive-section-test .adaptive-topic-summary>p{
  margin:0 0 20px!important;
  color:var(--test-text)!important;
  font-size:17px!important;
}

.adaptive-section-test .adaptive-topic-table-wrap{
  width:100%!important;
  overflow-x:auto!important;
  border:1px solid #bfdbfe!important;
  border-radius:22px!important;
  background:#fff!important;
}

.adaptive-section-test .adaptive-topic-table{
  width:100%!important;
  min-width:720px!important;
  border-collapse:collapse!important;
  table-layout:fixed!important;
}

.adaptive-section-test .adaptive-topic-table th{
  padding:18px 20px!important;
  background:#eef7ff!important;
  color:var(--test-dark)!important;
  font-size:15px!important;
  font-weight:900!important;
  text-align:left!important;
}

.adaptive-section-test .adaptive-topic-table th:nth-child(1){width:36%!important}
.adaptive-section-test .adaptive-topic-table th:nth-child(2){width:22%!important}
.adaptive-section-test .adaptive-topic-table th:nth-child(3){width:14%!important}
.adaptive-section-test .adaptive-topic-table th:nth-child(4){width:28%!important}

.adaptive-section-test .adaptive-topic-table td{
  padding:22px 20px!important;
  border-top:1px solid #dbeafe!important;
  color:var(--test-text)!important;
  font-size:16px!important;
  text-align:left!important;
  vertical-align:middle!important;
}

.adaptive-section-test .adaptive-topic-name strong{
  display:block!important;
  color:var(--test-text)!important;
  font-size:17px!important;
}

.adaptive-section-test .adaptive-topic-name .adaptive-level-tag{
  margin:6px 0 0!important;
}

.adaptive-section-test .adaptive-topic-table td>b{
  color:var(--test-text)!important;
  font-weight:900!important;
}

.adaptive-section-test .adaptive-topic-table tr.is-weak td:nth-child(3)>b{
  color:#b45309!important;
}

.adaptive-section-test .adaptive-topic-table tr.is-mastered td:nth-child(3)>b{
  color:#166534!important;
}

.adaptive-section-test .adaptive-topic-table a{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:46px!important;
  padding:11px 16px!important;
  border:1px solid #fdba74!important;
  border-radius:14px!important;
  background:#fff7ed!important;
  color:#9a3412!important;
  font-weight:900!important;
  text-decoration:none!important;
  white-space:nowrap!important;
}

.adaptive-section-test .adaptive-topic-table tr.is-mastered a{
  border-color:#86efac!important;
  background:#f0fdf4!important;
  color:#166534!important;
}

.adaptive-section-test .adaptive-section-result[hidden]{
  display:none!important;
}

.adaptive-section-test .adaptive-section-result.is-visible{
  display:block!important;
  scroll-margin-top:105px!important;
  text-align:center!important;
}

.adaptive-section-test .adaptive-section-result .score{
  line-height:1.05!important;
}

.adaptive-section-test .adaptive-section-result>h2{
  margin:10px 0 8px!important;
}

.adaptive-section-test .adaptive-section-result>p{
  margin:0!important;
}

.adaptive-section-test .adaptive-result-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  justify-content:center!important;
  gap:16px!important;
  margin-top:30px!important;
}

.adaptive-section-test #adaptiveCheck[hidden]{
  display:none!important;
}

@media(max-width:720px){
  .unified-lesson-test .unified-test-header{
    position:relative!important;
    flex-direction:column!important;
    align-items:stretch!important;
    padding:14px 16px!important;
  }

  .unified-test-header .unified-test-brand{
    font-size:19px!important;
  }

  .unified-test-header .unified-test-back,
  .unified-lesson-test .unified-result-action{
    width:100%!important;
    min-width:0!important;
  }

  .unified-test-header .unified-test-header-actions{
    width:100%!important;
    flex-direction:column!important;
    align-items:stretch!important;
  }

  .unified-test-header .course-level-switch{
    width:100%!important;
  }

  .unified-test-header .course-level-switch__option{
    min-width:0!important;
    flex:1 1 50%!important;
    padding:11px 10px!important;
  }

  .unified-lesson-test .unified-result-actions{
    flex-direction:column!important;
  }

  .adaptive-section-test .adaptive-test-scope__heading,
  .adaptive-section-test .adaptive-feedback-heading{
    align-items:flex-start!important;
    flex-direction:column!important;
  }

  .adaptive-section-test .adaptive-explanation-step{
    grid-template-columns:1fr!important;
  }

  .adaptive-section-test .adaptive-topic-table-wrap{
    overflow:visible!important;
    border:0!important;
    background:transparent!important;
  }

  .adaptive-section-test .adaptive-topic-table{
    min-width:0!important;
  }

  .adaptive-section-test .adaptive-topic-table thead{
    display:none!important;
  }

  .adaptive-section-test .adaptive-topic-table,
  .adaptive-section-test .adaptive-topic-table tbody,
  .adaptive-section-test .adaptive-topic-table tr,
  .adaptive-section-test .adaptive-topic-table td{
    display:block!important;
    width:100%!important;
  }

  .adaptive-section-test .adaptive-topic-table tr{
    margin-bottom:14px!important;
    overflow:hidden!important;
    border:1px solid #bfdbfe!important;
    border-radius:18px!important;
    background:#fff!important;
  }

  .adaptive-section-test .adaptive-topic-table td{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:14px!important;
    padding:13px 15px!important;
  }

  .adaptive-section-test .adaptive-topic-table td::before{
    content:attr(data-label)!important;
    color:var(--test-muted)!important;
    font-size:13px!important;
    font-weight:800!important;
  }

  .adaptive-section-test .adaptive-topic-table td:first-child{
    display:block!important;
  }

  .adaptive-section-test .adaptive-topic-table td:first-child::before{
    display:block!important;
    margin-bottom:4px!important;
  }

  .adaptive-section-test .adaptive-topic-table a{
    width:auto!important;
  }

  .adaptive-section-test .adaptive-result-actions{
    flex-direction:column!important;
    align-items:stretch!important;
  }
}

/* Kompaktowy nagłówek testu na telefonie. */
@media(max-width:720px){
  .unified-lesson-test .unified-test-header{
    position:sticky!important;
    top:0!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:space-between!important;
    flex-wrap:nowrap!important;
    gap:6px!important;
    min-height:64px!important;
    margin-bottom:16px!important;
    padding:8px 12px!important;
  }
  .unified-test-header .unified-test-brand{
    flex:0 0 38px!important;
    width:38px!important;
    min-width:38px!important;
    overflow:hidden!important;
  }
  .unified-test-header .unified-test-brand>span:not(.unified-test-brand-mark){display:none!important}
  .unified-test-header .unified-test-brand-mark{flex:0 0 38px!important;width:38px!important;height:38px!important;border-radius:12px!important}
  .unified-test-header .unified-test-header-actions{
    display:flex!important;
    flex:1 1 auto!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:6px!important;
    width:auto!important;
    min-width:0!important;
  }
  .unified-test-header .course-level-switch{
    display:block!important;
    flex:0 1 118px!important;
    width:118px!important;
    min-width:96px!important;
    height:40px!important;
    padding:0!important;
    border-width:1px!important;
    border-radius:12px!important;
    overflow:hidden!important;
  }
  .unified-test-header .course-level-switch__option{display:none!important}
  .unified-test-header .course-level-switch__select{
    display:block!important;
    width:100%!important;
    height:38px!important;
    min-height:38px!important;
    margin:0!important;
    padding:0 24px 0 9px!important;
    border:0!important;
    border-radius:11px!important;
    appearance:auto!important;
    background:#fff!important;
    color:var(--test-primary)!important;
    font:800 12px/1.2 Inter,Arial,sans-serif!important;
    box-shadow:none!important;
  }
  .unified-test-header .course-level-switch__select:focus-visible{outline:3px solid rgba(6,182,212,.38)!important;outline-offset:-3px!important}
  .unified-test-header .unified-test-back{
    display:inline-grid!important;
    flex:0 0 40px!important;
    place-items:center!important;
    width:40px!important;
    min-width:40px!important;
    height:40px!important;
    min-height:40px!important;
    margin:0!important;
    padding:0!important;
    border-radius:12px!important;
  }
  .unified-test-header .unified-test-back__text{display:none!important}
  .unified-test-header .unified-test-back__icon{display:block!important}
}
