/* =========================================================
   Witryna z prezentacjami – informatyka, klasa 7
   Wspólny styl: strona główna + slajdy
   ========================================================= */

:root {
  --tusz: #15213b;
  --tekst: #2b3448;
  --przygaszony: #5d6779;
  --linia: #dfe4ee;
  --tlo: #f4f6fb;
  --karta: #ffffff;
  --niebieski: #2563eb;
  --zielony: #15803d;
  --czerwony: #c0262d;
  --zolty: #f5b301;
  --cien: 0 1px 2px rgba(21, 33, 59, .06), 0 6px 18px rgba(21, 33, 59, .07);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SF Mono", Menlo, "Liberation Mono", monospace;

  /* kolor działu – nadpisywany przez data-dzial */
  --dzial: #2563eb;
  --dzial-ciemny: #1d3f9e;
  --dzial-jasny: #e8efff;
}

[data-dzial="1"] { --dzial: #2563eb; --dzial-ciemny: #1b3d99; --dzial-jasny: #e7eeff; }
[data-dzial="2"] { --dzial: #7c3aed; --dzial-ciemny: #4c1d95; --dzial-jasny: #f1eaff; }
[data-dzial="3"] { --dzial: #db2777; --dzial-ciemny: #8a1446; --dzial-jasny: #fde8f2; }
[data-dzial="4"] { --dzial: #0f8a5f; --dzial-ciemny: #0a5a3e; --dzial-jasny: #e2f5ec; }
[data-dzial="5"] { --dzial: #d97706; --dzial-ciemny: #8a4300; --dzial-jasny: #fff1dc; }
[data-dzial="6"] { --dzial: #0891b2; --dzial-ciemny: #0b5566; --dzial-jasny: #e0f5fa; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--tekst);
  background: var(--tlo);
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}
svg.ik { width: 1em; height: 1em; flex: none; vertical-align: -0.125em; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--zolty); outline-offset: 2px; }

/* =========================================================
   STRONA GŁÓWNA
   ========================================================= */

.strona { min-height: 100vh; display: flex; flex-direction: column; }

.baner {
  background: var(--tusz);
  color: #fff;
  padding: 40px 16px 76px;
  position: relative;
  overflow: hidden;
}
.baner::after {
  content: "";
  position: absolute; inset: auto -10% -60% auto;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(37,99,235,.55), transparent);
  pointer-events: none;
}
.baner .wnetrze, .glowna, .stopka .wnetrze { max-width: 1120px; margin: 0 auto; }
.baner .wnetrze { position: relative; z-index: 1; }
.baner .etykieta {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: #b9c7e6;
}
.baner h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.1; margin: 10px 0 8px; color: #fff; }
.baner p { margin: 0; font-size: 18px; color: #d3dcef; max-width: 640px; }

.glowna { width: 100%; padding: 0 16px 48px; margin-top: -48px; position: relative; z-index: 2; flex: 1; }

.pasek-narzedzi {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  background: var(--karta); border-radius: 14px; box-shadow: var(--cien);
  padding: 12px; margin-bottom: 28px;
}
.szukaj {
  flex: 1 1 260px; display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--linia); border-radius: 10px; padding: 0 12px;
  background: #fff;
}
.szukaj:focus-within { border-color: var(--niebieski); }
.szukaj svg { color: var(--przygaszony); font-size: 18px; }
.szukaj input {
  border: 0; outline: 0; font: inherit; font-size: 16px; padding: 11px 0; width: 100%;
  background: transparent; color: var(--tekst);
}
.przelacznik { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--przygaszony); cursor: pointer; user-select: none; padding: 4px 6px; }
.przelacznik input { width: 18px; height: 18px; accent-color: var(--niebieski); }

.nowosc {
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
  background: var(--karta); border-radius: 16px; box-shadow: var(--cien);
  padding: 20px 22px; margin-bottom: 36px; text-decoration: none;
  border-left: 6px solid var(--dzial);
  transition: transform .15s ease, box-shadow .15s ease;
}
.nowosc:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(21,33,59,.13); }
.nowosc .znaczek {
  background: var(--zolty); color: #3b2a00; font-weight: 700; font-size: 13px;
  text-transform: uppercase; letter-spacing: .06em; padding: 4px 10px; border-radius: 99px;
}
.nowosc .tresc { flex: 1 1 300px; min-width: 0; }
.nowosc h2 { margin: 6px 0 2px; font-size: 22px; color: var(--tusz); }
.nowosc p { margin: 0; color: var(--przygaszony); }
.nowosc .przycisk { flex: none; }

.dzial { margin-bottom: 38px; }
.dzial-naglowek { display: flex; align-items: baseline; gap: 12px; margin: 0 0 14px; flex-wrap: wrap; }
.dzial-naglowek .nr {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--dzial); color: #fff; font-weight: 700; font-size: 18px; flex: none;
  align-self: center;
}
.dzial-naglowek h2 { margin: 0; font-size: 24px; color: var(--tusz); }
.dzial-naglowek .ile { color: var(--przygaszony); font-size: 15px; }

.tematy { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }

.temat {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--karta); border-radius: 14px; padding: 18px 18px 16px;
  box-shadow: var(--cien); text-decoration: none; position: relative;
  border-top: 5px solid var(--dzial);
  transition: transform .15s ease, box-shadow .15s ease;
  min-height: 170px;
}
a.temat:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(21,33,59,.14); }
.temat .numer { font-size: 14px; font-weight: 700; color: var(--dzial); letter-spacing: .03em; }
.temat h3 { margin: 0; font-size: 19px; line-height: 1.25; color: var(--tusz); }
.temat .opis { margin: 0; font-size: 15px; color: var(--przygaszony); }
.temat .meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--przygaszony); padding-top: 8px; flex-wrap: wrap; }
.temat .otworz { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--dzial); }
.temat.wkrotce { background: transparent; box-shadow: none; border: 2px dashed #cdd4e1; border-top: 5px solid #cdd4e1; min-height: 0; }
.temat.wkrotce h3 { color: #6b7385; }
.temat.wkrotce .numer { color: #8c94a6; }
.temat .nowe { position: absolute; top: 14px; right: 14px; background: var(--zolty); color: #3b2a00; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; text-transform: uppercase; letter-spacing: .05em; }

.przycisk {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--dzial); color: #fff; text-decoration: none; font-weight: 600;
  padding: 10px 16px; border-radius: 10px; border: 0; cursor: pointer;
}
.przycisk:hover { background: var(--dzial-ciemny); }

.brak-wynikow { text-align: center; color: var(--przygaszony); padding: 40px 0; font-size: 18px; display: none; }

.pomoc {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px;
  background: var(--karta); border-radius: 14px; box-shadow: var(--cien); padding: 20px 22px; margin-top: 8px;
}
.pomoc h2 { grid-column: 1 / -1; margin: 0; font-size: 18px; color: var(--tusz); }
.pomoc div { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
kbd {
  font-family: var(--mono); font-size: .85em; background: #eef1f7; border: 1px solid #cfd6e3;
  border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; color: var(--tusz); white-space: nowrap;
}

.stopka { padding: 20px 16px 28px; color: var(--przygaszony); font-size: 14px; border-top: 1px solid var(--linia); }
.stopka .wnetrze { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

@media (prefers-color-scheme: dark) {
  body.strona-glowna {
    --tekst: #d7deeb; --przygaszony: #9aa5ba; --linia: #2b3650; --tlo: #0f1626; --karta: #18213a; --tusz: #eef2fa;
  }
  body.strona-glowna .baner { background: #0a1020; }
  body.strona-glowna .szukaj { background: #10182c; }
  body.strona-glowna .temat.wkrotce { border-color: #34405a; }
  body.strona-glowna .temat.wkrotce h3 { color: #8590a6; }
  body.strona-glowna kbd { background: #222c46; border-color: #3a4766; color: #e4e9f3; }
}

@media (max-width: 560px) {
  .baner { padding-top: 28px; }
  .tematy { grid-template-columns: 1fr; }
  .nowosc .przycisk { width: 100%; justify-content: center; }
  .dzial-naglowek h2 { flex: 1 1 0; font-size: 20px; }
  .dzial-naglowek .ile { flex-basis: 100%; padding-left: 48px; margin-top: -6px; font-size: 14px; }
  .temat.wkrotce { padding: 12px 16px; gap: 2px; }
  .temat.wkrotce h3 { font-size: 17px; }
  .temat.wkrotce .meta { display: none; }
}

/* =========================================================
   PREZENTACJA – pasek, scena, tryby
   ========================================================= */

body.prezentacja { background: #0d1424; overflow: hidden; height: 100vh; height: 100dvh; }
body.prezentacja.tryb-lista, body.prezentacja.tryb-mobilny { overflow: auto; height: auto; background: #e9edf5; }

.pasek {
  position: fixed; inset: var(--gora, 0px) 0 auto 0; height: 52px; z-index: 20;
  display: flex; align-items: center; gap: 8px; padding: 0 10px;
  background: rgba(13, 20, 36, .92); color: #e5ebf7; backdrop-filter: blur(6px);
  transition: opacity .25s ease, transform .25s ease;
}
.pasek .powrot {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: #e5ebf7;
  padding: 8px 10px; border-radius: 8px; font-size: 15px; white-space: nowrap;
}
.pasek .powrot:hover { background: rgba(255,255,255,.1); }
.pasek .tytul { flex: 1; min-width: 0; font-size: 15px; color: #aab6cf; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pasek .tytul b { color: #fff; font-weight: 600; }
.pasek .licznik { font-variant-numeric: tabular-nums; font-size: 15px; color: #d6deee; min-width: 64px; text-align: center; }
.pasek button {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 8px;
  border: 0; background: transparent; color: #e5ebf7; cursor: pointer; font-size: 20px;
}
.pasek button:hover { background: rgba(255,255,255,.12); }
.pasek button:disabled { opacity: .35; cursor: default; background: transparent; }
.pasek button[aria-pressed="true"] { background: rgba(255,255,255,.18); }
.postep { position: fixed; left: 0; top: calc(var(--gora, 0px) + 52px); height: 3px; background: var(--dzial); z-index: 21; transition: width .25s ease, opacity .25s ease; }

body.ukryj-pasek .pasek { opacity: 0; transform: translateY(-100%); }
body.ukryj-pasek .postep { opacity: 0; }
body.ukryj-pasek { cursor: none; }

.scena { position: fixed; inset: calc(var(--gora, 0px) + 52px) 0 0 0; overflow: hidden; }
body.pelny-ekran .scena { inset: var(--gora, 0px) 0 0 0; }
/* miejsce na reklamę hostingu (PRV.PL) – przesuwa pasek i slajdy w dół */
#prv-billboard { position: relative; z-index: 30; }
.scena .ramka { position: absolute; inset: 0; pointer-events: none; }
.scena .slajd {
  position: absolute; left: 0; top: 0;
  transform-origin: 0 0;
  visibility: hidden; opacity: 0; pointer-events: auto;
  transition: opacity .28s ease, visibility .28s;
}
.scena .slajd.aktywny { visibility: visible; opacity: 1; }
.scena .ramka .nr-slajdu { display: none; }

/* tryb listy (desktop): slajdy pod sobą, przeskalowane */
body.tryb-lista .scena { position: static; overflow: visible; padding: 76px 16px 40px; display: flex; flex-direction: column; align-items: center; gap: 28px; }
body.tryb-lista .scena .ramka { position: relative; inset: auto; pointer-events: auto; box-shadow: 0 6px 24px rgba(13,20,36,.18); border-radius: 6px; overflow: hidden; flex: none; }
body.tryb-lista .scena .slajd { visibility: visible; opacity: 1; transition: none; }
body.tryb-lista .scena .ramka .nr-slajdu { display: block; }
body.tryb-mobilny .scena .ramka { position: static; inset: auto; pointer-events: auto; }
body.tryb-lista .scena .ramka .nr-slajdu { position: absolute; right: 10px; bottom: 8px; z-index: 3; font-size: 13px; background: rgba(13,20,36,.7); color: #fff; padding: 2px 8px; border-radius: 99px; }

/* =========================================================
   SLAJD – płótno 1280 × 720
   ========================================================= */

.slajd {
  width: 1280px; height: 720px; overflow: hidden;
  background: #fff; color: var(--tekst);
  padding: 52px 72px 48px;
  display: flex; flex-direction: column; gap: 22px;
  font-size: 22px; line-height: 1.4;
  position: relative;
}
.slajd::before { /* pasek koloru działu po lewej */
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 12px; background: var(--dzial);
}
.slajd > .stopka-slajdu {
  position: absolute; left: 72px; right: 72px; bottom: 18px;
  display: flex; justify-content: space-between; font-size: 14px; color: #8a93a5;
}

.slajd h1, .slajd h2, .slajd h3, .slajd p { margin: 0; }
.slajd h2 { font-size: 44px; line-height: 1.12; color: var(--tusz); font-weight: 700; letter-spacing: -.01em; }
.slajd h2 .ik { color: var(--dzial); margin-right: 14px; vertical-align: -0.12em; }
.slajd h3 { font-size: 24px; line-height: 1.2; color: var(--tusz); font-weight: 700; }
.slajd .wstep { font-size: 24px; color: var(--tekst); max-width: 1050px; }
.slajd .maly { font-size: 18px; color: var(--przygaszony); }
.slajd strong, .slajd b { color: var(--tusz); }
.slajd .akcent { color: var(--dzial); }
.slajd .wypelnij { flex: 1; min-height: 0; }
.slajd .srodek { display: flex; flex-direction: column; justify-content: center; }

/* siatki */
.siatka { display: grid; gap: 18px; }
.siatka.k2 { grid-template-columns: repeat(2, 1fr); }
.siatka.k3 { grid-template-columns: repeat(3, 1fr); }
.siatka.k4 { grid-template-columns: repeat(4, 1fr); }
.siatka.k5 { grid-template-columns: repeat(5, 1fr); }
.kolumny { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: start; }
.kolumny.rowne { grid-template-columns: 1fr 1fr; }

/* karta */
.karta {
  background: #f6f8fc; border: 1.5px solid #e3e8f1; border-radius: 16px;
  padding: 18px 20px; display: flex; flex-direction: column; gap: 6px;
}
.karta p { font-size: 19px; color: var(--przygaszony); line-height: 1.35; }
.karta.biala { background: #fff; }
.karta.wyrozniona { background: var(--dzial-jasny); border-color: transparent; }
.karta.pozioma { flex-direction: row; align-items: center; gap: 16px; }
.karta.pozioma > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.karta.dobrze { border-color: #9ad3ae; background: #effaf2; }
.karta.zle { border-color: #f0a9ad; background: #fdf0f1; }
.karta .etykieta-karty { font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; display: inline-flex; align-items: center; gap: 6px; }
.karta.dobrze .etykieta-karty { color: var(--zielony); }
.karta.zle .etykieta-karty { color: var(--czerwony); }

.ikona {
  display: inline-grid; place-items: center; flex: none;
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--dzial-jasny); color: var(--dzial); font-size: 28px;
}
.karta.wyrozniona .ikona { background: #fff; }
.ikona.duza { width: 72px; height: 72px; border-radius: 18px; font-size: 38px; }
.ikona.mala { width: 40px; height: 40px; border-radius: 11px; font-size: 22px; }

/* pasek z uwagą na dole slajdu */
.uwaga {
  display: flex; align-items: center; gap: 14px;
  background: var(--dzial-jasny); color: var(--tusz); border-radius: 14px;
  padding: 14px 20px; font-size: 20px; line-height: 1.35;
}
.uwaga > .ik { font-size: 28px; color: var(--dzial); }
.uwaga.ostrzezenie { background: #fff4d6; }
.uwaga.ostrzezenie > .ik { color: #b26b00; }
.uwaga.wazne { background: #fdecee; }
.uwaga.wazne > .ik { color: var(--czerwony); }

/* lista celów */
.cele { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.cele.wypelnij { margin-bottom: 14px; }
.cele.wypelnij li { flex: 1; max-height: 104px; }
.cele li { display: flex; align-items: center; gap: 18px; font-size: 25px; background: #f6f8fc; border-radius: 14px; padding: 12px 18px; }
.cele li .zad { margin-left: auto; font-size: 18px; font-weight: 700; color: var(--dzial); background: var(--dzial-jasny); padding: 4px 12px; border-radius: 99px; white-space: nowrap; }

/* chip / kod w tekście */
code, .kodzik {
  font-family: var(--mono); font-size: .92em; background: #eef1f7; color: #8a1d4a;
  padding: 1px 7px; border-radius: 6px; white-space: nowrap;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 600;
  background: var(--dzial-jasny); color: var(--dzial-ciemny); padding: 3px 10px; border-radius: 99px;
}

/* blok kodu */
pre.kod {
  margin: 0; font-family: var(--mono); font-size: 22px; line-height: 1.5;
  background: #172036; color: #e6ebf5; border-radius: 14px; padding: 18px 22px;
  white-space: pre; overflow: hidden;
}
pre.kod.maly { font-size: 19px; }
pre.kod .t { color: #7cc4ff; }      /* nazwa znacznika i nawiasy */
pre.kod .a { color: #ffcf7a; }      /* atrybut */
pre.kod .w { color: #a6e3a1; }      /* wartość atrybutu */
pre.kod .d { color: #c39bff; }      /* doctype */
pre.kod .k { color: #8892a8; font-style: italic; } /* komentarz */
pre.kod mark { background: rgba(245,179,1,.28); color: inherit; border-radius: 4px; padding: 0 2px; }

/* wiersze (np. operator – opis – przykład) */
.wiersze { display: flex; flex-direction: column; gap: 12px; }
.wiersz {
  display: grid; grid-template-columns: 180px 1fr 1.3fr; gap: 20px; align-items: center;
  background: #f6f8fc; border-radius: 14px; padding: 12px 20px;
}
.wiersz .klucz {
  font-family: var(--mono); font-weight: 700; font-size: 26px; color: var(--dzial-ciemny);
  background: #fff; border: 2px solid var(--dzial-jasny); border-radius: 10px; text-align: center; padding: 4px 6px;
}
.wiersz .co { font-weight: 700; color: var(--tusz); }
.wiersz .przyklad { display: flex; flex-direction: column; gap: 2px; }
.wiersz .przyklad code { font-size: 20px; align-self: flex-start; }
.wiersz .przyklad span { font-size: 17px; color: var(--przygaszony); }

/* kroki */
.kroki { display: grid; gap: 18px; }
.kroki.k4 { grid-template-columns: repeat(4, 1fr); }
.krok { background: #f6f8fc; border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.krok .nr { display: inline-grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--dzial); color: #fff; font-weight: 700; font-size: 22px; }
.krok h3 { font-size: 25px; }
.krok p { font-size: 20px; color: var(--przygaszony); }
.krok > .ikona { margin-top: auto; align-self: flex-end; }

/* duże liczby (slajd „Teraz Ty”) */
.liczby { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.liczba { background: rgba(255,255,255,.1); border-radius: 18px; padding: 22px 24px; display: flex; flex-direction: column; gap: 6px; }
.liczba strong { font-size: 76px; line-height: 1; font-weight: 800; color: #fff; }
.liczba span { font-size: 21px; color: rgba(255,255,255,.85); }

/* slajd tytułowy i końcowy */
.slajd.ciemny { background: var(--tusz); color: #e6ecf7; }
.slajd.ciemny::before { width: 100%; height: 12px; bottom: auto; }
.slajd.ciemny h1, .slajd.ciemny h2, .slajd.ciemny strong, .slajd.ciemny b { color: #fff; }
.slajd .nadtytul { font-size: 18px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--dzial); }
.slajd.ciemny .nadtytul { color: #9fb5e8; }
.slajd[data-dzial="2"].ciemny .nadtytul, [data-dzial="2"] .slajd.ciemny .nadtytul { color: #c9b2ff; }
.slajd h1 { font-size: 68px; line-height: 1.05; letter-spacing: -.015em; font-weight: 800; }
.slajd.ciemny .pytanie {
  display: flex; align-items: center; gap: 20px;
  background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.14); border-radius: 18px; padding: 20px 26px; font-size: 26px;
}
.slajd.ciemny .pytanie .ikona { background: var(--dzial); color: #fff; }
.slajd.ciemny .maly { color: #b8c3da; }
.slajd.ciemny code { background: rgba(255,255,255,.1); color: #ffd28a; }
.dekoracja { position: absolute; right: -60px; bottom: -80px; width: 420px; height: 420px; color: var(--dzial); opacity: .22; pointer-events: none; }
.dekoracja svg { width: 100%; height: 100%; }

/* tabelka licencji itp. */
.tabelka { width: 100%; border-collapse: separate; border-spacing: 0 8px; font-size: 20px; }
.tabelka td { background: #f6f8fc; padding: 10px 16px; }
.tabelka td:first-child { border-radius: 12px 0 0 12px; }
.tabelka td:last-child { border-radius: 0 12px 12px 0; }


/* ---------- dodatkowe elementy slajdów ---------- */
.slajd.zwarty { gap: 16px; }
.slajd.zwarty .karta { padding: 14px 18px; gap: 4px; }
.slajd.zwarty .karta h3 { font-size: 22px; }
.karta.wyrozniona .chip { background: #fff; }
.siatka.wypelnij > .karta { justify-content: center; }
.wiersze.wypelnij > .wiersz { flex: 1; }
.kolumny.wypelnij { align-items: stretch; }
.stos { display: flex; flex-direction: column; gap: 12px; }
.stos.rozloz { justify-content: space-between; }
.email.wypelnij { display: flex; flex-direction: column; }
.email.wypelnij > .email-pole { flex: 1; align-content: center; }


/* ikona z tekstem zamiast obrazka (np. BY, NC) */
.ikona.tekst { font-weight: 800; font-size: 22px; letter-spacing: .02em; }
.ikona.duza.tekst { font-size: 28px; }

/* atrapa wiadomości e-mail */
.email { background: #fff; border: 1.5px solid #dfe4ee; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 14px rgba(21,33,59,.06); }
.email-pole { display: grid; grid-template-columns: 160px 1fr; gap: 14px; align-items: start; padding: 11px 18px; border-bottom: 1px solid #edf0f5; font-size: 19px; line-height: 1.35; }
.email-pole:last-child { border-bottom: 0; background: #f8fafd; }
.email-pole .etyk { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--dzial-ciemny); background: var(--dzial-jasny); border-radius: 8px; padding: 3px 8px; text-align: center; margin-top: 2px; }

/* budowa znacznika */
.anatomia { display: flex; justify-content: center; align-items: flex-start; gap: 8px; }
.anatomia .czesc { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.anatomia .czesc code { font-size: 52px; line-height: 1.2; padding: 12px 22px; border-radius: 14px; background: #172036; color: #fff; text-align: center; }
.anatomia .czesc.znacznik code { color: #7cc4ff; }
.anatomia .czesc > span { border-top: 4px solid var(--dzial); padding-top: 8px; text-align: center; font-size: 20px; font-weight: 700; color: var(--tusz); }
.anatomia .czesc.zawartosc > span { border-top-color: #9aa5ba; }

/* pudełka zagnieżdżone (szkielet, zagnieżdżanie) */
.pudlo { border: 2.5px solid var(--dzial); border-radius: 14px; padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 12px; background: #fff; }
.pudlo > .etyk { font-family: var(--mono); font-weight: 700; font-size: 20px; color: var(--dzial-ciemny); }
.pudlo > p, .pudlo li { font-size: 20px; color: var(--przygaszony); line-height: 1.35; }
.pudlo ul { margin: 0; padding-left: 20px; }
.pudlo.niebieskie { border-color: #3b82f6; background: #f2f7ff; }
.pudlo.niebieskie > .etyk { color: #1d4ed8; }
.pudlo.zielone { border-color: #22a35a; background: #f0faf3; }
.pudlo.zielone > .etyk { color: #15803d; }
.pudlo.srodek-tekst { align-items: center; justify-content: center; font-weight: 700; font-size: 22px; color: var(--tusz); }

/* podgląd „jak w przeglądarce” */
.podglad { background: #fff; border: 1.5px solid #dfe4ee; border-radius: 12px; padding: 10px 14px; font-family: "Times New Roman", Georgia, serif; font-size: 22px; color: #111; }
.podglad-etyk { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: #8a93a5; font-weight: 700; }

.slajd .duzy-tekst { font-size: 30px; font-weight: 700; color: var(--tusz); line-height: 1.25; }
.slajd .wycentrowane { text-align: center; }
.slajd .wiersz-chipow { display: flex; flex-wrap: wrap; gap: 8px; }

body.tryb-mobilny .ikona.tekst { font-size: 15px; }
body.tryb-mobilny .email-pole { grid-template-columns: 1fr; gap: 4px; font-size: 15px; padding: 9px 12px; }
body.tryb-mobilny .email-pole .etyk { justify-self: start; font-size: 11px; }
body.tryb-mobilny .anatomia { flex-wrap: wrap; gap: 6px; }
body.tryb-mobilny .anatomia .czesc code { font-size: 20px; padding: 6px 10px; white-space: nowrap; }
body.tryb-mobilny .anatomia .czesc > span { font-size: 13px; }
body.tryb-mobilny .pudlo { padding: 10px 12px; gap: 8px; }
body.tryb-mobilny .pudlo > .etyk { font-size: 15px; }
body.tryb-mobilny .pudlo > p, body.tryb-mobilny .pudlo li { font-size: 14px; }
body.tryb-mobilny .podglad { font-size: 16px; }
body.tryb-mobilny .slajd .duzy-tekst { font-size: 19px; }

/* =========================================================
   TRYB MOBILNY – slajdy jako przewijane bloki (telefon)
   ========================================================= */

body.tryb-mobilny .scena { position: static; overflow: visible; padding: 64px 10px 32px; display: flex; flex-direction: column; gap: 16px; }
body.tryb-mobilny .scena .slajd {
  position: relative; left: auto; top: auto; transform: none !important;
  visibility: visible; opacity: 1; transition: none;
  width: 100%; height: auto; min-height: 0; overflow: visible;
  padding: 22px 18px 22px 26px; gap: 14px; font-size: 16px; border-radius: 10px;
  box-shadow: 0 2px 10px rgba(13,20,36,.1);
}
body.tryb-mobilny .slajd::before { width: 6px; border-radius: 10px 0 0 10px; }
body.tryb-mobilny .slajd.ciemny::before { width: 100%; height: 6px; border-radius: 10px 10px 0 0; }
body.tryb-mobilny .slajd > .stopka-slajdu { display: none; }
body.tryb-mobilny .slajd h1 { font-size: 30px; }
body.tryb-mobilny .slajd h2 { font-size: 24px; }
body.tryb-mobilny .slajd h3 { font-size: 17px; }
body.tryb-mobilny .slajd .wstep { font-size: 16px; }
body.tryb-mobilny .slajd .maly { font-size: 14px; }
body.tryb-mobilny .slajd .nadtytul { font-size: 13px; }
body.tryb-mobilny .karta { padding: 12px 14px; border-radius: 12px; }
body.tryb-mobilny .karta p { font-size: 15px; }
body.tryb-mobilny .ikona { width: 38px; height: 38px; font-size: 20px; border-radius: 10px; }
body.tryb-mobilny .ikona.duza { width: 48px; height: 48px; font-size: 26px; }
body.tryb-mobilny .uwaga { font-size: 15px; padding: 10px 12px; }
body.tryb-mobilny .uwaga > .ik { font-size: 20px; }
body.tryb-mobilny .siatka { gap: 10px; }
body.tryb-mobilny .siatka.k3, body.tryb-mobilny .siatka.k4, body.tryb-mobilny .siatka.k5 { grid-template-columns: repeat(2, 1fr); }
body.tryb-mobilny .siatka.k2, body.tryb-mobilny .kolumny, body.tryb-mobilny .kolumny.rowne { grid-template-columns: 1fr; gap: 12px; }
body.tryb-mobilny .cele li { font-size: 16px; padding: 10px 12px; gap: 12px; flex-wrap: wrap; }
body.tryb-mobilny .cele li .zad { font-size: 13px; }
body.tryb-mobilny pre.kod { font-size: 13px; padding: 12px; overflow-x: auto; }
body.tryb-mobilny .wiersz { grid-template-columns: 1fr; gap: 6px; padding: 12px; }
body.tryb-mobilny .wiersz .klucz { font-size: 20px; justify-self: start; padding: 2px 14px; }
body.tryb-mobilny .wiersz .przyklad code { font-size: 14px; }
body.tryb-mobilny .wiersz .przyklad span { font-size: 13px; }
body.tryb-mobilny .kroki.k4 { grid-template-columns: 1fr 1fr; gap: 10px; }
body.tryb-mobilny .krok { padding: 12px; }
body.tryb-mobilny .krok .nr { width: 32px; height: 32px; font-size: 16px; }
body.tryb-mobilny .krok h3 { font-size: 16px; }
body.tryb-mobilny .krok p { font-size: 14px; }
body.tryb-mobilny .liczby { grid-template-columns: 1fr; gap: 10px; }
body.tryb-mobilny .liczba { padding: 12px 14px; flex-direction: row; align-items: center; gap: 14px; }
body.tryb-mobilny .liczba strong { font-size: 36px; }
body.tryb-mobilny .liczba span { font-size: 15px; }
body.tryb-mobilny .slajd.ciemny .pytanie { font-size: 17px; padding: 12px 14px; gap: 12px; }
body.tryb-mobilny .dekoracja { width: 140px !important; height: 140px !important; right: -10px !important; bottom: -20px !important; top: auto !important; }
body.tryb-mobilny .slajd { overflow: hidden; }
body.tryb-mobilny .dekoracja { display: none !important; }
body.tryb-mobilny .slajd .karta h3 { font-size: 17px !important; }
body.tryb-mobilny .cele.wypelnij li { flex: none; max-height: none; }
body.tryb-mobilny .cele li { flex-wrap: nowrap; }
body.tryb-mobilny .cele li .zad { padding: 2px 8px; flex: none; min-width: max-content; }
body.tryb-mobilny .liczba strong { white-space: nowrap; flex: none; min-width: max-content; }
body.tryb-mobilny .siatka.k3 { grid-template-columns: 1fr; }
body.tryb-mobilny .slajd * { min-width: 0; }
body.tryb-mobilny .slajd h1, body.tryb-mobilny .slajd h2, body.tryb-mobilny .slajd h3 { overflow-wrap: anywhere; hyphens: auto; }
body.tryb-mobilny .slajd pre.kod { font-size: 13px !important; padding: 12px !important; max-width: 100%; overflow-x: auto; }
body.tryb-mobilny .slajd code[style] { font-size: 15px !important; }
body.tryb-mobilny .slajd .podglad[style] { font-size: 16px !important; }
/* style wpisane bezpośrednio w slajdzie – uproszczenie na telefonie */
body.tryb-mobilny .slajd [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
body.tryb-mobilny .slajd h1[style*="font-size"] { font-size: 28px !important; }
body.tryb-mobilny .slajd h3[style*="font-size"] { font-size: 17px !important; }
body.tryb-mobilny .slajd p[style*="font-size"], body.tryb-mobilny .slajd span[style*="font-size"] { font-size: 15px !important; }
body.tryb-mobilny .slajd div[style*="font-size"] { font-size: 28px !important; }
body.tryb-mobilny .slajd [style*="padding"] { padding: 12px 14px !important; }
body.tryb-mobilny .slajd [style*="margin-top:auto"] { margin-top: 0 !important; margin-bottom: 0 !important; }
body.tryb-mobilny .tabelka { font-size: 14px; }
body.tryb-mobilny code { white-space: normal; }
body.tryb-mobilny .mobilny-ukryj { display: none !important; }
body.tryb-mobilny .pasek .licznik, body.tryb-mobilny .pasek .nawigacja { display: none !important; }
@media (max-width: 700px) { .pasek .mobilny-ukryj-tekst { display: none; } }

/* =========================================================
   DRUK / PDF – każdy slajd na osobnej stronie
   ========================================================= */
@media print {
  @page { size: 1280px 720px; margin: 0; }
  body.prezentacja { background: #fff !important; overflow: visible !important; height: auto !important; }
  .pasek, .postep { display: none !important; }
  .scena { position: static !important; padding: 0 !important; display: block !important; }
  .scena .ramka { position: static !important; width: auto !important; height: auto !important; box-shadow: none !important; border-radius: 0 !important; pointer-events: auto; }
  .scena .ramka .nr-slajdu { display: none; }
  .scena .slajd {
    position: relative !important; left: 0 !important; top: 0 !important; transform: none !important;
    visibility: visible !important; opacity: 1 !important; break-after: page; page-break-after: always;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- przyciski i załączniki na kafelkach tematów ---------- */
.temat .przyciski { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.temat .przyciski .przycisk { flex: 1 1 130px; justify-content: center; }
.przycisk.maly { padding: 8px 12px; font-size: 15px; }
.zalaczniki { display: flex; flex-direction: column; gap: 6px; }
.zalacznik {
  position: relative; display: flex; align-items: center; gap: 8px; text-decoration: none;
  padding: 7px 10px; border-radius: 10px; border: 1.5px dashed var(--dzial);
  color: var(--dzial-ciemny); font-size: 14px; font-weight: 600; line-height: 1.3; transition: background .15s;
}
.zalacznik .ik { flex: 0 0 auto; font-size: 17px; }
.zalacznik-nazwa { flex: 1 1 0; min-width: 0; }
.zalacznik:hover, .zalacznik:focus-visible { background: var(--dzial-jasny); }
.dymek {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 5;
  background: #15213b; color: #fff; font-size: 13px; font-weight: 400; line-height: 1.4;
  padding: 8px 10px; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.25);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s; pointer-events: none;
}
.zalacznik:hover .dymek, .zalacznik:focus-visible .dymek { opacity: 1; visibility: visible; transform: none; }
@media (prefers-color-scheme: dark) {
  body.strona-glowna .zalacznik { color: #d6defa; }
  body.strona-glowna .zalacznik:hover, body.strona-glowna .zalacznik:focus-visible { background: #22305a; }
  body.strona-glowna .dymek { background: #eef2fa; color: #15213b; }
}
