/* Karty pracy — spójnie z panelami strony (#2379d2 / #f7faff) */
.ie-karta-wrap { max-width: 860px; margin: 0 auto; padding: 24px 16px 60px; }
.ie-karta__powrot { margin: 0 0 12px; font-size: 14px; }
.ie-karta__powrot a { color: #2379d2; text-decoration: none; }
.ie-karta__tytul { margin: 0 0 18px; }
.ie-karta__pasek { background: #fff7e6; border: 1px solid #f1d9a6; border-left: 4px solid #dba617; border-radius: 8px; padding: 10px 14px; margin: 0 0 18px; font-size: 14px; }
.ie-karta .wp-block-paragraph, .ie-karta p { font-size: 16px; line-height: 1.65; }

.ie-pytanie { background: #f7faff; border: 1px solid #cfe0f5; border-left: 4px solid #2379d2; border-radius: 10px; padding: 14px 18px; margin: 18px 0; transition: background .4s; }
.ie-pytanie__naglowek { font-size: 16px; line-height: 1.5; color: #13182c; margin-bottom: 10px; }
.ie-pytanie__nr { font-weight: 700; color: #2379d2; margin-right: 4px; }
.ie-pytanie__odp { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; line-height: 1.55; padding: 10px 12px; border: 1px solid #b9cde8; border-radius: 6px; background: #fff; resize: vertical; }
.ie-pytanie__odp:focus { outline: none; border-color: #2379d2; box-shadow: 0 0 0 3px rgba(35,121,210,.15); }
.ie-pytanie__meta { font-size: 12px; color: #6b7280; min-height: 16px; margin-top: 6px; }
.ie-pytanie--zajete { background: #fff7e6; border-color: #f1d9a6; border-left-color: #dba617; }
.ie-pytanie--zajete .ie-pytanie__odp { background: #fffdf7; color: #555; }
.ie-pytanie--zajete .ie-pytanie__meta { color: #a1660a; font-weight: 600; }
.ie-pytanie--swieze { background: #eef8ef; }
.ie-pytanie--blad { color: #b32d2e; }

.ie-karta__status { position: fixed; right: 14px; bottom: 14px; background: #13182c; color: #fff; font-size: 13px; padding: 8px 14px; border-radius: 20px; box-shadow: 0 4px 14px rgba(0,0,0,.18); z-index: 9999; opacity: .92; }
.ie-karta__status--ok { background: #1e7e34; }
.ie-karta__status--praca { background: #2379d2; }
.ie-karta__status--uwaga { background: #dba617; color: #13182c; }
.ie-karta__status--blad { background: #b32d2e; }

/* lista kart (Baza wiedzy — widok ucznia; wybór ucznia — nauczycielka) */
.ie-karty__tytul { margin: 0 0 14px; }
.ie-karty { list-style: none; margin: 0 0 20px; padding: 0; }
.ie-karty__item { margin: 0 0 10px; }
.ie-karty__link { display: flex; align-items: center; gap: 12px; background: #f7faff; border: 1px solid #cfe0f5; border-left: 4px solid #2379d2; border-radius: 10px; padding: 14px 18px; color: #13182c; text-decoration: none; transition: background .15s; }
.ie-karty__link:hover { background: #eaf2fc; }
.ie-karty__nazwa { font-weight: 700; flex: 1 1 auto; }
.ie-karty__data { color: #6b7280; font-size: 13px; }
.ie-karty__strzalka { color: #2379d2; font-size: 20px; }
.ie-karty-info { background: #f7faff; border: 1px solid #cfe0f5; border-left: 4px solid #2379d2; border-radius: 10px; padding: 14px 18px; margin: 0 0 18px; }

/* rzut 2: przyciski, stany, tryb odczytu */
.ie-karta__akcje { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 22px 0 10px; }
.ie-btn { display: inline-block; font: inherit; font-size: 15px; font-weight: 700; padding: 11px 22px; border-radius: 6px; border: 1px solid #2379d2; background: #fff; color: #2379d2; cursor: pointer; text-decoration: none; }
.ie-btn--primary { background: #2379d2; color: #fff; }
.ie-btn--primary:hover { background: #1b63ad; }
.ie-btn--link { border-color: #cfe0f5; color: #2379d2; font-weight: 600; }
.ie-btn[disabled] { opacity: .6; cursor: wait; }
.ie-karta__hint { font-size: 13px; color: #6b7280; flex-basis: 100%; }
.ie-karta__pasek--info { background: #eef4fb; border-color: #cfe0f5; border-left-color: #2379d2; }
.ie-karta__pasek--ok { background: #eef8ef; border-color: #cfe6d0; border-left-color: #1e7e34; }
.ie-karta--odczyt .ie-pytanie__odp { background: #f8f9fb; color: #333; }
.ie-karty__etykieta { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 12px; white-space: nowrap; }
.ie-karty__etykieta--czeka { background: #fff2cc; color: #8a5b00; }
.ie-karty__etykieta--ok { background: #dff3e3; color: #1e5e2a; }
.ie-karty__pusto { color: #6b7280; margin: 0 0 18px; }

/* przypisy (core/footnotes) */
.ie-karta sup.fn { font-size: 0.7em; line-height: 0; }
.ie-karta sup.fn a { color: #2379d2; text-decoration: none; }
.ie-karta sup.fn a::before { content: "["; } .ie-karta sup.fn a::after { content: "]"; }
.ie-karta ol.wp-block-footnotes { margin: 32px 0 0; padding: 12px 0 0 22px; border-top: 1px solid #cfe0f5; font-size: 14px; line-height: 1.55; color: #3a4460; list-style: decimal; }
.ie-karta ol.wp-block-footnotes li { margin: 0 0 6px; }
.ie-karta ol.wp-block-footnotes li:target { background: #fff6d6; }
.ie-karta ol.wp-block-footnotes a { color: #2379d2; }

/* poprawki (diff) i komentarze nauczycielki */
.ie-karta ins, .ie-karta__legenda ins { background: #dff3e3; color: #1e5e2a; text-decoration: none; padding: 0 2px; border-radius: 3px; }
.ie-karta del, .ie-karta__legenda del { color: #b32d2e; text-decoration: line-through; padding: 0 2px; }
.ie-karta__legenda { display: block; margin-top: 4px; font-size: 13px; color: #3a4460; }
.ie-pytanie--z-poprawkami .ie-pytanie__odp, .ie-pytanie--z-poprawkami .ie-pytanie__meta { display: none; }
.ie-poprawki { margin-top: 4px; }
.ie-diff { white-space: pre-wrap; background: #fff; border: 1px solid #b9cde8; border-radius: 6px; padding: 10px 12px; font-size: 16px; line-height: 1.55; }
.ie-komentarz { margin-top: 12px; background: #fff7e6; border: 1px solid #f1d9a6; border-left: 4px solid #dba617; border-radius: 8px; padding: 10px 14px; }
.ie-komentarz__etykieta { display: block; font-size: 13px; font-weight: 700; color: #8a5b00; margin-bottom: 6px; }
.ie-komentarz__etykieta span { font-weight: 400; color: #a1660a; }
.ie-komentarz__pole { background: #fffdf7; border-color: #f1d9a6; }
.ie-komentarz__tresc { white-space: pre-wrap; font-size: 15px; line-height: 1.55; color: #13182c; }
.ie-komentarz--ogolny { margin-top: 24px; }
.ie-komentarz.ie-pytanie--zajete { background: #fff2cc; }

/* 3b: tabela do uzupełniania */
.ie-tabela__przewijanie { overflow-x: auto; }
.ie-tabela__siatka { border-collapse: collapse; width: 100%; background: #fff; }
.ie-tabela__siatka th, .ie-tabela__siatka td { border: 1px solid #b9cde8; padding: 6px 8px; vertical-align: top; font-size: 15px; line-height: 1.45; text-align: left; }
.ie-tabela__siatka th { background: #eaf2fc; font-weight: 700; color: #13182c; }
.ie-tabela__pole { background: #fffdf7; padding: 3px !important; min-width: 90px; }
.ie-tabela__odp { min-height: 38px; padding: 6px 8px; font-size: 15px; resize: vertical; }
.ie-tabela__pole.ie-pytanie--zajete { background: #fff2cc; }
.ie-tabela__pole.ie-pytanie--z-poprawkami .ie-diff { border: 0; padding: 6px 8px; font-size: 15px; }
.ie-diff__gdzie { font-weight: 700; color: #6b7280; margin-right: 4px; }
.ie-diff--komorka + .ie-diff--komorka { margin-top: 6px; }

/* 3b: ABCD */
.ie-abcd__hint { font-size: 13px; color: #6b7280; margin: -4px 0 8px; }
.ie-abcd__opcje, .ie-abcd__porownanie { background: #fff; border: 1px solid #b9cde8; border-radius: 6px; padding: 8px 12px; }
.ie-abcd__opcja { display: flex; align-items: flex-start; gap: 8px; padding: 6px 4px; font-size: 16px; line-height: 1.5; cursor: pointer; border-radius: 4px; }
.ie-abcd__opcja:hover { background: #f7faff; }
.ie-abcd__wybor { margin: 6px 0 0; flex: 0 0 auto; width: 18px; height: 18px; }
.ie-abcd__litera { font-weight: 700; color: #2379d2; flex: 0 0 auto; }
.ie-abcd__kratka { display: inline-block; width: 16px; height: 16px; border: 1px solid #55607a; border-radius: 3px; margin-top: 5px; flex: 0 0 auto; }
.ie-abcd__opcja--wybrana .ie-abcd__kratka, .ie-abcd__opcja--dodana .ie-abcd__kratka, .ie-abcd__opcja--usunieta .ie-abcd__kratka { background: #2379d2; box-shadow: inset 0 0 0 3px #fff; }
.ie-abcd__opcja--dodana { background: #dff3e3; color: #1e5e2a; }
.ie-abcd__opcja--dodana .ie-abcd__kratka { background: #1e7e34; }
.ie-abcd__opcja--usunieta { color: #b32d2e; text-decoration: line-through; }
.ie-abcd__opcja--usunieta .ie-abcd__kratka { background: #b32d2e; }
.ie-abcd--porownanie .ie-abcd__opcje { display: none; }
.ie-abcd__legenda { font-size: 13px; color: #3a4460; margin-top: 6px; }
.ie-abcd__legenda span { text-decoration: none; padding: 0 4px; border-radius: 3px; }
.ie-abcd__legenda .ie-abcd__opcja--usunieta { text-decoration: line-through; }
.ie-abcd.ie-pytanie--zajete .ie-abcd__opcje { opacity: .7; }

/* 3b: luki w tekście */
.ie-luki__tekst { font-size: 16px; line-height: 2.1; background: #fff; border: 1px solid #b9cde8; border-radius: 6px; padding: 12px 14px; white-space: pre-wrap; }
.ie-luka { display: inline-block; margin: 0 2px; white-space: nowrap; }
.ie-luka__nr { display: inline-block; font-size: 11px; line-height: 1; color: #2379d2; font-weight: 700; vertical-align: super; margin-right: 2px; }
/* wyższa specyficzność niż input[type=text] motywu (motyw narzuca ramkę/wysokość/padding) */
.ie-karta input.ie-luka__pole[type="text"] { font: inherit; font-size: 16px; line-height: 1.4; height: auto; min-height: 0; padding: 2px 8px; margin: 0; border: 0; border-bottom: 2px solid #2379d2; border-radius: 4px 4px 0 0; background: #f7faff; box-shadow: none; }
.ie-karta input.ie-luka__pole[type="text"]:focus { outline: none; background: #eaf2fc; box-shadow: none; }
.ie-karta input.ie-luka__pole[type="text"][readonly] { background: #f8f9fb; color: #333; }
.ie-luka.ie-pytanie--zajete .ie-luka__pole { background: #fff2cc; border-bottom-color: #dba617; }
.ie-diff--luka { display: inline-block; border: 0; border-bottom: 2px solid #2379d2; border-radius: 0; padding: 2px 8px; background: #f7faff; font-size: 16px; }
.ie-karta__opcja { font-size: 14px; color: #3a4460; display: inline-flex; align-items: center; gap: 6px; }
/* 10.09: pasek „nie mogę zapisać" + przycisk przywracania szkicu */
.ie-karta__alarm { display: none; position: sticky; top: 0; z-index: 9998; background: #b32d2e; color: #fff; font-weight: 700; padding: 10px 14px; border-radius: 8px; margin: 0 0 14px; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.ie-btn--maly { font-size: 13px; padding: 4px 10px; margin-left: 6px; }
/* 10.09: historia wersji pola (nauczycielka) */
.ie-historia__link { display: inline-block; font-size: 12px; color: #6b7280; text-decoration: underline; cursor: pointer; margin: 4px 0 0; background: none; border: 0; padding: 0; font-family: inherit; }
.ie-historia { margin: 6px 0 0; border: 1px solid #cfe0f5; border-radius: 6px; background: #fff; font-size: 13px; max-height: 260px; overflow: auto; }
.ie-historia__wpis { display: flex; gap: 10px; align-items: flex-start; padding: 6px 10px; border-bottom: 1px solid #eef2f8; }
.ie-historia__wpis:last-child { border-bottom: 0; }
.ie-historia__kiedy { color: #6b7280; white-space: nowrap; min-width: 150px; }
.ie-historia__tresc { flex: 1 1 auto; white-space: pre-wrap; color: #13182c; }
.ie-historia__tresc--pusta { color: #8891a5; font-style: italic; }
.ie-historia__pusto { padding: 8px 10px; color: #6b7280; }

/* ===== 3b cz. 2: prawda/fałsz, wybór A/B i C/D w zdaniu, nazwane pola, wypowiedź, wypracowanie ===== */
.ie-wybor__brak { color: #6b7280; font-style: italic; }

/* prawda / fałsz */
.ie-pf__siatka { border-collapse: collapse; width: 100%; background: #fff; }
.ie-pf__siatka th, .ie-pf__siatka td { border: 1px solid #b9cde8; padding: 8px 10px; vertical-align: middle; font-size: 15px; line-height: 1.45; text-align: left; }
.ie-pf__siatka th { background: #eaf2fc; font-weight: 700; color: #13182c; }
.ie-pf__kol-wybor { width: 64px; text-align: center; }
.ie-pf__wybor { text-align: center; }
.ie-pf__nr { font-weight: 700; color: #2379d2; margin-right: 4px; }
.ie-pf__opcja { display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; padding: 9px 12px; border-radius: 6px; min-height: 40px; }
.ie-pf__opcja:hover { background: #f7faff; }
.ie-pf__litera { font-weight: 700; color: #2379d2; }
.ie-pf__stwierdzenie.ie-pytanie--zajete { background: #fff2cc; }
.ie-pf .ie-wybor__opcja { width: 18px; height: 18px; margin: 0; }

/* wybór A/B oraz C/D w jednym zdaniu */
.ie-zdanie__tekst { font-size: 16px; line-height: 2.4; background: #fff; border: 1px solid #b9cde8; border-radius: 6px; padding: 12px 14px; white-space: pre-wrap; }
.ie-zdanie__grupa { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; background: #f7faff; border: 1px solid #cfe0f5; border-radius: 6px; padding: 1px 5px; margin: 0 1px; vertical-align: middle; white-space: normal; }
.ie-zdanie__opcja { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; padding: 6px 6px; border-radius: 4px; line-height: 1.4; min-height: 34px; }
.ie-zdanie__opcja:hover { background: #eaf2fc; }
.ie-zdanie__albo { color: #6b7280; }
.ie-zdanie__grupa .ie-wybor__opcja { width: 17px; height: 17px; margin: 0; }
.ie-zdanie__grupa.ie-pytanie--zajete { background: #fff2cc; border-color: #f1d9a6; }

/* odpowiedź z nazwanymi polami */
.ie-pole-nazwane { margin-bottom: 12px; }
.ie-pole-nazwane:last-child { margin-bottom: 0; }
.ie-pole-nazwane__etykieta { font-size: 15px; font-weight: 700; color: #13182c; margin-bottom: 5px; }

/* wypowiedź użytkowa */
.ie-wypowiedz__ramka { background: #fff; border: 1px solid #b9cde8; border-radius: 8px; padding: 12px 14px; }
.ie-wypowiedz__forma { text-align: center; font-weight: 700; font-size: 16px; color: #13182c; margin-bottom: 10px; letter-spacing: .3px; }
.ie-wypowiedz__odp { min-height: 140px; }

/* wypracowanie / rozprawka */
.ie-wypracowanie__odp { min-height: 260px; line-height: 1.7; }
.ie-wypracowanie__licznik { font-size: 13px; color: #6b7280; margin-top: 6px; }
.ie-wypracowanie__licznik--malo { color: #a1660a; font-weight: 600; }
.ie-wypracowanie__licznik--ok { color: #1e7e34; font-weight: 600; }

/* kontrolki wyboru w trybie odczytu (karta wysłana / cudza blokada) */
.ie-wybor__opcja:disabled { cursor: default; opacity: .75; }
/* karta sprawdzona u ucznia: pole jest ukryte, więc licznik słów nie ma czego liczyć */
.ie-pytanie--z-poprawkami .ie-wypracowanie__licznik { display: none; }
.ie-wypowiedz .ie-poprawki { margin-top: 0; }

/* telefon: tabela P/F musi się mieścić bez przewijania w bok (litera powtarza nagłówek kolumny) */
@media (max-width: 480px) {
	.ie-pf__siatka th, .ie-pf__siatka td { padding: 6px 7px; font-size: 14px; }
	.ie-pf__kol-wybor { width: 48px; }
	.ie-pf__opcja { padding: 9px 4px; }
	.ie-pf__litera { display: none; }
	.ie-zdanie__tekst { line-height: 2.2; }
}

/* 0.9.1: komunikaty i historia per pole (P/F, wybór w zdaniu, nazwane pola) */
.ie-pytanie__meta--pole:empty { min-height: 0; margin: 0; }
.ie-pf__stwierdzenie .ie-pytanie__meta--pole:not(:empty),
.ie-pole-nazwane .ie-pytanie__meta--pole:not(:empty) { margin-top: 6px; }
.ie-zdanie__pola .ie-pytanie__meta--pole:not(:empty) { margin-top: 8px; }
.ie-pf__stwierdzenie .ie-historia { max-height: 200px; }
.ie-pf__stwierdzenie .ie-historia__kiedy { min-width: 0; white-space: normal; }
.ie-luki__pola .ie-pytanie__meta--pole:not(:empty) { margin-top: 8px; }
