/* =========================================================
   Polski — trener części testowej (prefiks pol-). Wiersze ≥ 44 px, długi tekst zawija się (overflow-wrap), nic nie wychodzi poza 390 px.
   ========================================================= */
html.pol-lock, html.pol-lock body { overflow: hidden; }
.pol-ref { display: block; margin-top: 2px; font: 400 13px/1.35 var(--sans); color: var(--ink-3); }
.pol-polecenie { margin: 0; font: 500 16px/1.5 var(--sans); color: var(--ink-2); overflow-wrap: anywhere; }
.pol-qs { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.pol-q { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pol-q__t { margin: 0; font: 400 clamp(17px, 2.1vw, 19px)/1.55 var(--serif); overflow-wrap: anywhere; }
.pol-q__t b { display: inline-block; margin-right: 6px; font: 600 15px/1 var(--sans); }
.pol-lab { font: 600 14px/1.3 var(--sans); color: var(--ink-2); }
.pol-act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.pol-act .btn { max-width: 100%; white-space: normal; text-align: center; }
.pol-act .btn[disabled] { opacity: .5; cursor: not-allowed; }
.pol-paper { min-height: 44px; padding: 0 4px; text-align: left; white-space: normal; font-weight: 500; color: var(--ink-3); }

/* ---- teksty: przyciski „Czytaj tekst” + pełnoekranowy dialog; zakładki na stronie (notatka, brak <dialog>) ---- */
.pol-read { display: flex; flex-wrap: wrap; gap: 10px; }
.pol-read__b { flex: 1 1 150px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-height: 52px; padding: 8px 14px; white-space: normal; text-align: left; }
.pol-read__b span { font-weight: 600; }
.pol-read__b small { font: 400 13px/1.3 var(--sans); color: var(--ink-3); overflow-wrap: anywhere; }
.pol-tabs { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.pol-tab { flex: 1 1 130px; min-height: 44px; padding: 6px 12px; border: 1.5px solid var(--ink); border-radius: 3px; background: var(--sheet); color: var(--ink); font: 600 14px/1.25 var(--sans); text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.pol-tab[aria-selected="true"] { background: var(--pen); border-color: var(--pen); color: #FFFFFF; }
.pol-tab:focus-visible { outline: 3px solid var(--pen); outline-offset: 2px; }
.pol-tekst { font: 400 17px/1.65 var(--serif); overflow-wrap: anywhere; }
.pol-tekst p { margin: 0 0 12px; }
.pol-inl { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pol-inl__body { max-height: 52vh; overflow-y: auto; padding: 12px 14px; border: 1.5px solid var(--rule); border-radius: 6px; background: var(--sheet); overscroll-behavior: contain; }
.pol-inl__t { margin: 0 0 8px; font: 600 18px/1.3 var(--display); }
.pol-dlg { box-sizing: border-box; width: 100%; max-width: 100%; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: var(--sheet); color: var(--ink); overflow: hidden; }
.pol-dlg[open] { display: flex; flex-direction: column; }
.pol-dlg::backdrop { background: rgba(24, 33, 49, .5); }
.pol-dlg__bar { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-bottom: 1.5px solid var(--rule); background: var(--paper); }
.pol-dlg__bar .pol-tabs { flex: 1 1 auto; flex-wrap: nowrap; }
.pol-dlg__bar .pol-tab { flex: 1 1 0; min-width: 0; text-align: center; }
.pol-dlg__x { flex: none; min-height: 44px; padding: 0 14px; }
.pol-dlg__t { margin: 0; padding: 14px 18px 0; font: 600 clamp(20px, 5vw, 24px)/1.25 var(--display); overflow-wrap: anywhere; }
.pol-dlg__t small { display: block; margin-bottom: 4px; font: 500 14px/1.3 var(--sans); color: var(--ink-3); }
.pol-dlg__body { flex: 1 1 auto; min-height: 0; padding: 10px 18px 32px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.pol-dlg__body:focus-visible { outline: 3px solid var(--pen); outline-offset: -3px; }
@media (min-width: 760px) {
  .pol-dlg { width: min(720px, 92vw); height: min(86vh, 900px); max-height: 86vh; margin: auto; border: 1.5px solid var(--ink); border-radius: 8px; }
}

/* ---- prawda / fałsz, dobieranie, uzupełnianie ---- */
.pol-pf, .pol-lista { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; min-width: 0; }
.pol-pf__row, .pol-dob, .pol-luka { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pol-dob + .pol-dob, .pol-luka + .pol-luka { margin-top: 6px; }
.pol-pf__t, .pol-dob__t, .pol-luka__t, .pol-lista li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; margin: 0; font: 400 clamp(17px, 2.1vw, 19px)/1.5 var(--serif); align-items: baseline; }
.pol-pf__t > span, .pol-dob__t > span, .pol-luka__t > span, .pol-lista li > span { min-width: 0; overflow-wrap: anywhere; }
.pol-pf__t b, .pol-dob__t b, .pol-luka__t b, .pol-lista b { font: 600 15px/1 var(--sans); }
.pol-pfc, .pol-wopts { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 32px; }
.pol-chip { position: relative; flex: none; display: grid; place-items: center; min-width: 52px; height: 44px; padding: 0 12px; border: 1.5px solid var(--ink); border-radius: 3px; background: var(--sheet); color: var(--ink); font: 600 17px/1 var(--sans); cursor: pointer; transition: background 120ms ease, color 120ms ease; }
.pol-chip:not(:disabled):hover { background: var(--pen-wash); }
.pol-chip[aria-pressed="true"] { background: var(--pen); border-color: var(--pen); color: #FFFFFF; }
.pol-chip:disabled { cursor: default; }
.pol-chip:focus-visible, .pol-wchip:focus-visible, .pol-seg__b:focus-visible, .pol-step__b:focus-visible { outline: 3px solid var(--pen); outline-offset: 2px; }
.pol-chip__s { position: absolute; top: 2px; right: 2px; width: 13px; height: 13px; }
.pol-chip__s svg { width: 13px; height: 13px; }
.pol-chip.is-ok, .pol-wchip.is-ok { background: var(--ok-wash); border-color: var(--ok); color: var(--ok); }
.pol-chip.is-bad, .pol-wchip.is-bad { background: var(--bad-wash); border-color: var(--bad); color: var(--bad); }
.pol-chip.is-picked.is-ok, .pol-wchip.is-picked.is-ok { background: var(--ok); color: #FFFFFF; }
.pol-wchip { flex: 0 1 auto; min-height: 44px; max-width: 100%; padding: 6px 14px; border: 1.5px solid var(--ink); border-radius: 3px; background: var(--sheet); color: var(--ink); font: 500 16px/1.3 var(--serif); text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.pol-wchip[aria-pressed="true"] { background: var(--pen); border-color: var(--pen); color: #FFFFFF; }
.pol-wchip:disabled { cursor: default; }
.pol-why { margin: 0; padding-left: 32px; font: 400 15px/1.5 var(--sans); color: var(--bad); overflow-wrap: anywhere; }
.pol-why b { font-weight: 600; }
.pol-opts { margin: 0; }

/* ---- odpowiedź otwarta i notatka ---- */
.pol-ta { display: block; box-sizing: border-box; width: 100%; min-width: 0; margin: 0; padding: 12px 14px; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--sheet); color: var(--ink); font: 400 16px/1.6 var(--serif); resize: vertical; overflow-wrap: anywhere; }
.pol-ta--k { min-height: 112px; }
.pol-ta--n { min-height: 200px; max-height: 60vh; }
.pol-ta:focus-visible { outline: 3px solid var(--pen); outline-offset: 1px; }
.pol-ta:disabled { background: var(--paper); color: var(--ink-2); }
.pol-cnt { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; font: 400 15px/1.4 var(--sans); color: var(--ink-2); }
.pol-cnt b { font-weight: 600; color: var(--ink); }
.pol-cnt span { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.pol-ico { width: 15px; height: 15px; flex: none; }
.pol-cnt.is-ok span { color: var(--ok); }
.pol-cnt.is-malo span, .pol-cnt.is-duzo span { color: var(--wip); }
.pol-cnt.is-pusto { color: var(--ink-3); }
.pol-rev { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px; border: 1.5px solid var(--rule); border-radius: 6px; background: var(--paper); }
.pol-rev[hidden] { display: none; }
.pol-rev__h { margin: 6px 0 0; font: 600 14px/1.3 var(--sans); color: var(--ink-2); }
.pol-rev__h:first-child { margin-top: 0; }
.pol-key { margin: 0; padding: 10px 12px; border-left: 3px solid var(--ok); background: var(--ok-wash); font: 400 16px/1.55 var(--serif); overflow-wrap: anywhere; }
.pol-kr { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pol-chk { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 10px 12px; border: 1.5px solid var(--rule); border-radius: 6px; background: var(--sheet); font: 400 15px/1.45 var(--sans); color: var(--ink); cursor: pointer; }
.pol-chk input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--pen); }
.pol-chk span { min-width: 0; overflow-wrap: anywhere; }
.pol-chk:has(input:checked) { border-color: var(--pen); background: var(--pen-wash); }
.pol-chk--bad:has(input:checked) { border-color: var(--bad); background: var(--bad-wash); }
.pol-typ { margin: 4px 0 0; font: 400 14px/1.5 var(--sans); color: var(--ink-2); overflow-wrap: anywhere; }
.pol-typ span { display: block; margin-top: 2px; color: var(--ink-3); }
.pol-wsk { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pol-wsk li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; font: 400 15px/1.5 var(--sans); color: var(--ink-2); }
.pol-wsk li > span { min-width: 0; overflow-wrap: anywhere; }
.pol-wsk b { font-weight: 600; color: var(--ink); }
.pol-ocena { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pol-ocena__q { margin: 6px 0 0; font: 500 15px/1.4 var(--sans); color: var(--ink); }
.pol-seg { display: flex; flex-direction: column; gap: 6px; }
.pol-seg__b { min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--ink); border-radius: 3px; background: var(--sheet); color: var(--ink); font: 500 15px/1.35 var(--sans); text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.pol-seg__b[aria-pressed="true"] { background: var(--pen); border-color: var(--pen); color: #FFFFFF; }
.pol-seg__b:disabled { cursor: default; }
.pol-step { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.pol-step__b { width: 44px; height: 44px; padding: 0; border: 1.5px solid var(--ink); border-radius: 3px; background: var(--sheet); color: var(--ink); font: 600 22px/1 var(--sans); cursor: pointer; }
.pol-step__b:disabled { opacity: .5; cursor: default; }
.pol-step__n { min-width: 36px; text-align: center; font: 600 20px/1 var(--sans); }
.pol-step__i { flex: 1 1 140px; font: 400 13px/1.4 var(--sans); color: var(--ink-3); }
.pol-leg { margin: 4px 0 0; font: 400 13px/1.5 var(--sans); color: var(--ink-3); }
.pol-roz { margin: 0 0 8px; font: 400 15px/1.5 var(--sans); color: var(--ink-2); }
.pol-roz b { font-weight: 600; color: var(--ink); }
@media (max-width: 480px) {
  .pol-pfc, .pol-wopts, .pol-why { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .pol-chip { transition: none; } }

/* ---- cytaty (historia literatury): fragment pod nagłówkiem zadania, odpowiedzi A–D z podpisem źródła ---- */
.pol-frags { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pol-frag { margin: 0; padding: 12px 14px; border: 1.5px solid var(--rule); border-left: 4px solid var(--pen); border-radius: 6px; background: var(--sheet); min-width: 0; }
.pol-frag__h { margin: 0 0 6px; font: 600 13px/1.35 var(--sans); color: var(--ink-3); overflow-wrap: anywhere; }
.pol-frag__b p:last-child { margin-bottom: 0; }
.pol-frag__z { margin: 8px 0 0; font: 400 13px/1.4 var(--sans); color: var(--ink-3); overflow-wrap: anywhere; }
.pol-v { display: block; font-style: normal; overflow-wrap: anywhere; }
.pol-opts .answer__v small { display: block; margin-top: 6px; font: 400 13px/1.4 var(--sans); color: var(--ink-3); }
.pol-opts .answer__v .pol-v { font-size: 16px; line-height: 1.5; }

/* ---- wypracowanie (trener-wyp.js): wybór tematu, pisanie, samoocena w czterech krokach ---- */
.pol-h { margin: 6px 0 0; font: 600 16px/1.3 var(--sans); }
.pol-pol { margin: 0; padding-left: 20px; font: 400 15px/1.55 var(--sans); color: var(--ink-2); overflow-wrap: anywhere; }
.pol-pol li + li { margin-top: 4px; }
.pol-det { min-width: 0; border: 1.5px solid var(--rule); border-radius: 6px; background: var(--sheet); }
.pol-det > summary { display: flex; align-items: center; min-height: 44px; padding: 8px 14px; font: 600 15px/1.35 var(--sans); cursor: pointer; overflow-wrap: anywhere; }
.pol-det[open] > summary { border-bottom: 1.5px solid var(--rule); }
.pol-det > :not(summary) { margin-left: 14px; margin-right: 14px; }
.pol-det > .linkbtn { margin-top: 6px; margin-bottom: 8px; min-height: 44px; }
.pol-lek__l { display: flex; flex-direction: column; gap: 6px; margin: 10px 14px 4px; padding: 0; list-style: none; font: 400 15px/1.4 var(--sans); }
.pol-lek__l li { overflow-wrap: anywhere; }
.pol-lek__l span { color: var(--ink-3); }
.pol-det .pol-leg { margin: 8px 14px 12px; }
.pol-temat { display: flex; flex-direction: column; gap: 8px; }
.pol-temat__b { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 52px; padding: 10px 14px; border: 1.5px solid var(--ink); border-radius: 3px; background: var(--sheet); color: var(--ink); text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.pol-temat__b b { font: 600 13px/1.3 var(--sans); color: var(--ink-3); }
.pol-temat__b span { font: 500 17px/1.4 var(--serif); }
.pol-temat__b[aria-pressed="true"] { background: var(--pen); border-color: var(--pen); color: #FFFFFF; }
.pol-temat__b[aria-pressed="true"] b { color: #FFFFFF; }
.pol-temat__b:focus-visible { outline: 3px solid var(--pen); outline-offset: 2px; }
.pol-odwb:empty { display: none; }
.pol-odw__h { margin: 0 0 4px; font: 600 14px/1.3 var(--sans); color: var(--ink-2); }
.pol-odw { margin: 0 0 8px; padding-left: 20px; font: 400 15px/1.5 var(--sans); color: var(--ink-2); overflow-wrap: anywhere; }
.pol-ta--w { min-height: 260px; max-height: 70vh; }
.pol-ta[hidden], .pol-lab[hidden] { display: none; }
.pol-inp { box-sizing: border-box; width: 100%; max-width: 220px; min-height: 48px; padding: 8px 12px; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--sheet); color: var(--ink); font: 600 20px/1 var(--sans); }
.pol-inp:focus-visible, .pol-sel:focus-visible { outline: 3px solid var(--pen); outline-offset: 1px; }
.pol-kartka { display: flex; flex-direction: column; gap: 6px; }
.pol-nowe .linkbtn { min-height: 44px; white-space: normal; text-align: left; }
.pol-temat-ob { margin: 0; padding: 10px 12px; border-left: 4px solid var(--pen); background: var(--pen-wash); font: 500 16px/1.45 var(--serif); overflow-wrap: anywhere; }
.pol-temat-ob b { font: 600 13px/1 var(--sans); }
.pol-praca, .pol-wzor, .pol-zas { padding: 10px 0; overflow-wrap: anywhere; }
.pol-praca p { margin: 0; font: 400 15px/1.6 var(--serif); }
.pol-plan { margin: 4px 0 8px; padding-left: 20px; font: 400 15px/1.5 var(--sans); }
.pol-plan li + li { margin-top: 6px; }
.pol-fr b { background: var(--ok-wash); font-weight: 600; }
.pol-zas ul { margin: 0; padding-left: 18px; font: 400 15px/1.5 var(--sans); }
.pol-zas li + li { margin-top: 6px; }
.pol-ost { margin: 0; font: 400 14px/1.5 var(--sans); color: var(--ink-2); }
.pol-krok { min-width: 0; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--sheet); }
.pol-krok > summary { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; cursor: pointer; }
.pol-krok__n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #FFFFFF; font: 600 14px/1 var(--sans); }
.pol-krok__t { font: 600 16px/1.3 var(--sans); overflow-wrap: anywhere; }
.pol-krok__t small { font: 500 13px/1 var(--sans); color: var(--ink-3); }
.pol-krok__st { display: inline-flex; align-items: center; gap: 4px; font: 500 13px/1.2 var(--sans); color: var(--wip); white-space: nowrap; }
.pol-krok__st.is-done { color: var(--ok); font-weight: 600; }
.pol-krok.is-off > summary { opacity: .75; }
.pol-krok[open] > summary { border-bottom: 1.5px solid var(--rule); }
.pol-krok__b { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 12px; }
.pol-q { margin: 0; font: 600 15px/1.4 var(--sans); }
.pol-war { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pol-war.is-off { opacity: .45; }
.pol-war__t { margin: 0; font: 500 15px/1.45 var(--sans); overflow-wrap: anywhere; }
.pol-yn, .pol-bands { display: flex; flex-wrap: wrap; gap: 8px; }
.pol-chip--w { min-width: 72px; }
.pol-sel { box-sizing: border-box; width: 100%; height: 48px; min-height: 48px; padding: 8px 36px 8px 10px; -webkit-appearance: none; appearance: none; background: var(--sheet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23182131' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center; text-overflow: ellipsis; border: 1.5px solid var(--ink); border-radius: 6px; color: var(--ink); font: 500 16px/1.3 var(--sans); }
.pol-sel:disabled { opacity: .6; }
.pol-seg__b b { display: block; font-weight: 600; }
.pol-seg__b span { display: block; margin-top: 2px; font-size: 14px; opacity: .9; }
.pol-pod { font: 400 14px/1.5 var(--sans); color: var(--ink-2); }
.pol-pod > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 600; color: var(--pen); }
.pol-pod p { margin: 0 0 6px; overflow-wrap: anywhere; }
.pol-lock { margin: 0; padding: 10px 12px; border-left: 4px solid var(--wip); background: var(--paper); font: 500 14px/1.45 var(--sans); color: var(--ink-2); overflow-wrap: anywhere; }
.pol-lock.is-hard { border-left-color: var(--bad); }
.pol-lock[hidden] { display: none; }
.pol-razem { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--paper); }
.pol-suma { margin: 0; font: 400 18px/1.3 var(--sans); }
.pol-suma b { font-size: 26px; }
.pol-brak { margin: 0; font: 500 14px/1.4 var(--sans); color: var(--ink-2); }
.pol-brak.is-gotowe { color: var(--ok); }

/* ---------- Wynik łączny na /polski/ (blok .pol-w.sc, wynik.js) ---------- */
.pol-w__top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 14px; }
.pol-w__pct { font: 400 16px/1.3 var(--sans); color: var(--ink-2); }
.pol-w__pct b { margin-right: 4px; font: 600 28px/1 var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.pol-w__nums { font: 400 15px/1.4 var(--sans); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pol-w__track { position: relative; height: 8px; border-radius: 4px; background: var(--grid); overflow: visible; }
.pol-w__bar { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--wip-bar); transition: width 400ms var(--ease); }
.pol-w__bar.is-ok { background: var(--ok); }
.pol-w__prog { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); opacity: .55; }
.pol-w__parts { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; list-style: none; font: 400 14px/1.4 var(--sans); color: var(--ink-2); }
.pol-w__parts li { display: flex; gap: 6px; }
.pol-w__parts b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.pol-w__st { margin: 0; font: 500 15px/1.45 var(--sans); color: var(--ink-2); overflow-wrap: anywhere; }
.pol-w__st.is-ok { color: var(--ok); }
.pol-w__note { margin: 0; font: 400 13px/1.45 var(--sans); color: var(--ink-3); overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .pol-w__bar { transition: none; } }
@media (forced-colors: active) { .pol-w__track { border: 1px solid CanvasText; } .pol-w__bar { background: Highlight !important; forced-color-adjust: none; } }
