/* Widok studenta na telefonie: ramka 390×844, układ pionowy, jedna myśl, jedna rzecz do zrobienia.
   Korzysta z tokenów (tokeny.css) i kilku komponentów slajdu (slajd.css: .status, .k-kod, .przyklad, .belka). */

/* strona telefonu: ekran na całe okno (na komputerze wąska kolumna pośrodku) */
html, body.strona-telefonu { height: 100%; }
body.strona-telefonu { margin: 0; background: #050404; overflow: hidden; }
.ekran-telefonu[style] { justify-content: flex-start; }
.ekran-telefonu { height: 100%; display: flex; justify-content: center; }
.ekran-telefonu > .tel { width: 100%; max-width: 520px; height: 100%; border-radius: 0; outline: 0; }

/* ── EKRAN ── */
.tel {
  position: relative; width: 390px; height: 844px; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font-family: var(--f-sans); font-size: 18px; line-height: 1.4;
  border-radius: 26px; outline: 1px solid #2a3235; outline-offset: 0;
  isolation: isolate;
  -webkit-font-smoothing: antialiased;
}
html.kontrast .tel { outline-color: #666; }
.tel *, .tel *::before, .tel *::after { box-sizing: border-box; }
.tel::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.tel.sen::before { background: radial-gradient(90% 40% at 70% 108%, var(--sen-mgla-1), transparent 70%), linear-gradient(180deg, transparent 60%, rgba(90, 55, 25, .18)); }
.tel.przepis::before { background: radial-gradient(80% 40% at 10% -6%, var(--prz-mgla-1), transparent 70%), linear-gradient(180deg, rgba(40, 60, 70, .14), transparent 40%); }
html.kontrast .tel::before { display: none; }
.tel p { margin: 0; overflow-wrap: anywhere; hyphens: auto; }
.tel h1, .tel h2, .tel h3 { margin: 0; overflow-wrap: anywhere; hyphens: auto; }
.tel :lang(pl) { hyphens: auto; }

/* stały cienki pasek: znacznik części, numer, stan połączenia */
.t-pasek {
  flex: none; height: 52px; padding: 14px 16px 0; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--linia-2);
}
.t-pasek .belka { display: none; }
.t-pasek .znacznik { font-size: 12px; letter-spacing: .04em; min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; }
.t-pasek .nr { font-size: 13px; letter-spacing: .04em; }
.t-pasek .pol {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--st-mocy); white-space: nowrap;
}
.t-pasek .pol::before { content: ""; width: 8px; height: 8px; background: currentColor; }
.t-pasek .pol.brak { color: var(--st-projekt); }
.t-pasek .pol.brak::before { background: transparent; border: 1.5px solid currentColor; }
.t-pasek .pol.po { color: var(--mute); }
.t-pasek .pol.po::before { border-radius: 50%; }

/* strefy: treść przewijana, dolny pas akcji */
.t-tresc { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 20px 18px; display: flex; flex-direction: column; gap: 16px; position: relative; }
.t-tresc > * { flex-shrink: 0; }
.t-akcje { flex: none; padding: 12px 16px 18px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--linia-2); background: var(--bg); }
.t-wiersz { display: flex; gap: 10px; }
.t-wiersz > * { flex: 1 1 0; min-width: 0; }

/* typografia telefonu */
.t-kicker { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.t-tytul { font-family: var(--f-display); font-weight: 600; font-size: 34px; line-height: 1.06; letter-spacing: -.005em; }
.t-pytanie { font-family: var(--f-display); font-weight: 600; font-size: 28px; line-height: 1.12; }
.t-tekst { font-size: 19px; line-height: 1.45; color: var(--ink-2); }
.t-mocny { font-family: var(--f-display); font-weight: 600; font-size: 46px; line-height: .98; letter-spacing: -.015em; }
.t-mocny span { color: var(--akc); }
.t-nota { font-size: 18px; line-height: 1.4; color: var(--mute); }
.t-oryg { font-family: var(--f-mono); font-size: 13px; letter-spacing: .1em; color: var(--mute); }
.t-teza { font-size: 21px; line-height: 1.4; border-top: 1px solid var(--linia); padding-top: 14px; }
.t-sygn { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); display: inline-flex; gap: 6px; align-items: center; }
.t-sygn i { font-style: normal; color: var(--akc); font-size: 14px; }

/* przyciski: pełna szerokość, min. 48 px, widoczny fokus */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; padding: 10px 16px;
  font-family: var(--f-display); font-weight: 600; font-size: 19px; line-height: 1.15; letter-spacing: .01em; text-align: center;
  color: var(--ink); background: transparent; border: 1.5px solid var(--ink-2); border-radius: 0; cursor: pointer;
  text-decoration: none; overflow-wrap: anywhere;
}
.btn.glowny { background: var(--akc); border-color: var(--akc); color: var(--bg); }
html.kontrast .btn.glowny { color: #fff; }
.btn.cichy { border-color: var(--linia); color: var(--ink-2); font-weight: 500; }
.btn.wyl { border-style: dashed; border-color: var(--mute); color: var(--mute); background: transparent; cursor: not-allowed; }
.btn:focus-visible, .opcja:focus-visible, .tog button:focus-visible, .t-pole:focus-visible, .tel a:focus-visible, .tel summary:focus-visible {
  outline: 3px solid var(--akc-cienka); outline-offset: 2px;
}
.btn.fokus { outline: 3px solid var(--akc-cienka); outline-offset: 2px; }

/* opcje wyboru (tap = odpowiedź); kształt + słowo + barwa */
.opcje { display: flex; flex-direction: column; gap: 10px; }
.opcja {
  display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 10px 14px;
  font: 500 19px/1.25 var(--f-sans); text-align: left; color: var(--ink); background: transparent;
  border: 1.5px solid var(--linia); border-radius: 0; cursor: pointer; overflow-wrap: anywhere;
}
.opcja::before { content: ""; width: 20px; height: 20px; border: 2px solid var(--mute); border-radius: 50%; box-sizing: border-box; }
.opcja b { font-family: var(--f-display); font-weight: 600; }
.opcja[aria-pressed="true"] { border-color: var(--akc); background: color-mix(in srgb, var(--akc) 14%, transparent); }
.opcja[aria-pressed="true"]::before { background: var(--akc); border-color: var(--akc); box-shadow: inset 0 0 0 3px var(--bg); }
.opcja.zablok:not([aria-pressed="true"]) { color: var(--mute); border-style: dashed; }

/* komunikaty */
.komunikat { border-left: 3px solid var(--akc); padding: 8px 0 8px 14px; font-size: 19px; line-height: 1.4; color: var(--ink); }
.komunikat b { display: block; font-family: var(--f-display); font-weight: 600; font-size: 22px; margin-bottom: 2px; }
.baner { flex: none; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; background: color-mix(in srgb, var(--akc) 12%, var(--bg)); border-bottom: 1px solid var(--linia); font-size: 18px; line-height: 1.35; }
.baner.spokojny { background: color-mix(in srgb, var(--st-projekt) 10%, var(--bg)); border-bottom-color: color-mix(in srgb, var(--st-projekt) 45%, transparent); }
.baner b { font-family: var(--f-display); font-weight: 600; }

/* siatka eksperymentu */
.siatka-licznik { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.siatka-licznik .licz { font-family: var(--f-mono); font-size: 22px; font-weight: 600; color: var(--akc); letter-spacing: .04em; white-space: nowrap; }
.sl-pasek { height: 4px; background: var(--linia-2); margin-top: -6px; }
.sl-pasek span { display: block; height: 100%; width: var(--w); background: var(--akc); }
.obiekty { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.obiekty li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 58px; border-top: 1px solid var(--linia-2); padding: 5px 0; }
.obiekty li:last-child { border-bottom: 1px solid var(--linia-2); }
.obiekty .nazwa { font-size: 18px; line-height: 1.2; overflow-wrap: anywhere; }
.obiekty .nazwa small { display: block; font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; color: var(--mute); text-transform: uppercase; margin-top: 2px; }
.tog { display: inline-flex; border: 1.5px solid var(--linia); }
.tog button { min-height: 48px; min-width: 56px; padding: 0 10px; font: 600 15px/1 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); background: transparent; border: 0; cursor: pointer; }
.tog button + button { border-left: 1.5px solid var(--linia); }
.tog button[aria-pressed="true"].tak { background: var(--akc); color: var(--bg); }
.tog button[aria-pressed="true"].nie { background: var(--ink-2); color: var(--bg); }
html.kontrast .tog button[aria-pressed="true"] { color: #fff; }

/* pole tekstowe */
.t-pole { width: 100%; font: 500 28px/1.2 var(--f-display); color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); border: 1.5px solid var(--ink-2); border-radius: 0; padding: 14px; min-height: 64px; }
textarea.t-pole { font: 400 19px/1.4 var(--f-sans); min-height: 190px; resize: none; display: block; }
.t-pole::placeholder { color: var(--mute); }
.pole-meta { display: flex; justify-content: space-between; gap: 12px; font-family: var(--f-mono); font-size: 13px; letter-spacing: .06em; color: var(--mute); }
.pole-meta b { color: var(--ink); font-weight: 600; }

/* zgadnij: siatka 2×3 */
.jezyki { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.jezyki .opcja { grid-template-columns: minmax(0, 1fr); gap: 2px; min-height: 84px; padding: 10px 14px; }
.jezyki .opcja::before { display: none; }
.jezyki .kod { font-family: var(--f-display); font-weight: 600; font-size: 30px; line-height: 1; }
.jezyki .jez { font-size: 18px; color: var(--ink-2); }
.jezyki .opcja[aria-pressed="true"] .jez { color: var(--ink); }

/* karta aktu na telefonie */
.t-karta { border-top: 1.5px solid var(--ink-2); border-bottom: 1px solid var(--linia); display: flex; flex-direction: column; min-height: 0; }
.t-karta .gora { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 0 8px; }
.t-karta .pil { font-family: var(--f-display); font-weight: 600; font-size: 28px; color: var(--akc); line-height: 1; }
.t-karta .tytul { font-family: var(--f-display); font-weight: 500; font-size: 18px; line-height: 1.25; color: var(--ink); margin-bottom: 6px; }
.t-karta .cytat { font-family: var(--f-serif); font-size: 19px; line-height: 1.45; padding: 0 0 12px 16px; border-left: 1px solid var(--linia); display: grid; gap: 9px; }
.t-karta .seg { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.t-karta .seg .n { font-family: var(--f-mono); font-size: 12px; font-weight: 600; color: var(--bg); background: var(--ink-2); width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; transform: translateY(-2px); }
.t-karta mark { background: none; color: var(--akc); border-bottom: 2px solid var(--akc); padding: 0 1px; font-style: italic; }
.t-karta .pol-przewij { flex: 1; min-height: 0; overflow-y: auto; }
.t-glosa { display: grid; gap: 10px; border-top: 1px solid var(--linia-2); padding-top: 12px; }
.t-glosa p { font-size: 18px; line-height: 1.35; color: var(--ink-2); }
.t-glosa b { color: var(--akc); font-weight: 600; font-family: var(--f-serif); font-style: italic; }
.przewin { font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); display: flex; justify-content: space-between; padding-top: 6px; }
.t-tresc.z-cieniem::after { content: ""; position: sticky; bottom: -18px; display: block; flex: none; height: 28px; margin-top: -28px; pointer-events: none; background: linear-gradient(transparent, var(--bg)); }

/* wsuwana warstwa „zajrzyj głębiej” */
.glebiej { border: 1px solid var(--linia); }
.glebiej summary { list-style: none; min-height: 52px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--f-display); font-weight: 600; font-size: 20px; cursor: pointer; color: var(--akc); }
.glebiej summary::-webkit-details-marker { display: none; }
.glebiej summary::after { content: "−"; font-family: var(--f-mono); font-size: 22px; }
.glebiej:not([open]) summary::after { content: "+"; }
.glebiej .wnetrze { padding: 4px 14px 14px; display: grid; gap: 14px; border-top: 1px solid var(--linia-2); }
.glebiej h3 { font-family: var(--f-mono); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); margin-top: 8px; }
.glebiej .pelne { font-family: var(--f-serif); font-size: 18px; line-height: 1.45; }
.wersje-j { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.wersje-j li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--linia-2); font-family: var(--f-serif); font-size: 18px; line-height: 1.3; }
.wersje-j li b { font-family: var(--f-mono); font-size: 13px; font-weight: 600; color: var(--mute); letter-spacing: .08em; }
.wersje-j li.brak b, .wersje-j li.brak span { color: var(--akc); }
.link-st { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 8px 0; color: var(--akc); font-weight: 600; font-size: 19px; text-decoration: none; border-top: 1px solid var(--linia-2); overflow-wrap: anywhere; }
.link-st span { text-decoration: underline; text-underline-offset: 3px; }
.link-st::after { content: "→"; font-family: var(--f-mono); flex: none; }

/* atmosfera „mocna” (klasa .atmo-mocna na <html>): tylko tło ekranów; wysoki kontrast ją wyłącza */
html.atmo-mocna:not(.kontrast) .tel.sen::before {
  background:
    radial-gradient(150% 100% at 50% 40%, transparent 55%, rgba(0, 0, 0, .5) 100%),
    radial-gradient(70% 14% at 50% 80%, rgba(255, 176, 92, .12), transparent 72%),
    radial-gradient(150% 48% at 50% 86%, rgba(232, 120, 38, .32), rgba(186, 86, 28, .17) 50%, transparent 78%),
    linear-gradient(180deg, transparent 45%, rgba(150, 72, 22, .16) 65%, rgba(120, 56, 18, .26) 100%);
}
html.atmo-mocna:not(.kontrast) .tel.przepis::before {
  filter: blur(5px);
  background:
    radial-gradient(150% 100% at 50% 50%, transparent 58%, rgba(0, 0, 0, .45) 100%),
    radial-gradient(110% 22% at 50% -3%, rgba(92, 207, 214, .30), transparent 72%),
    linear-gradient(180deg, transparent 22%, rgba(165, 210, 220, .08) 27%, transparent 32%,
                    transparent 52%, rgba(165, 210, 220, .10) 58%, transparent 64%,
                    transparent 74%, rgba(145, 190, 205, .085) 79%, transparent 85%);
}

/* ═════════ SILNIK (16.11.2026): elementy telefonu dodane przy budowie ═════════ */
.t-pasek .pol.lok { color: var(--ink-2); }
.t-pasek .pol.odp { color: var(--st-projekt); }
.t-pasek .pol.odp::before { background: transparent; border: 1.5px dashed currentColor; }
.t-pyt { flex: none; min-height: 32px; padding: 2px 8px; font: 600 12px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--akc); background: transparent; border: 1.5px solid var(--linia); border-radius: 0; cursor: pointer; }
.t-pyt:focus-visible { outline: 3px solid var(--akc-cienka); outline-offset: 2px; }
.t-srodek { justify-content: center; gap: 20px; }
.t-tytul-duzy { font-size: 40px; }
.t-dol { margin-top: auto; }
.t-akc { color: var(--akc); }
.t-akc-kursywa { font-family: var(--f-serif); font-style: italic; font-size: 23px; line-height: 1.35; color: var(--akc); border-top-color: var(--linia); }
.t-kursywa { font-family: var(--f-serif); font-style: italic; color: var(--ink); }
.t-mocny-s { font-size: 36px; line-height: 1.05; }
.t-pytanie.t-sredni { font-size: 25px; }
.t-kr { font-family: var(--f-kr); font-weight: 600; font-size: 30px; line-height: 1.25; word-break: keep-all; }
.t-kr em { font-style: normal; color: var(--akc); }
.t-etk { display: block; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--akc); }
.t-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.t-lista li { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--linia); padding: 12px 0; }
.t-lista li:last-child { border-bottom: 1px solid var(--linia-2); }
.t-lista li.a { border-top: 2px solid var(--akc); }
.t-lista b { font-family: var(--f-display); font-weight: 600; font-size: 22px; line-height: 1.15; }
.t-lista li.a b { color: var(--akc); }
.t-lista span:not(.t-etk) { font-size: 18px; line-height: 1.4; color: var(--ink-2); }
.t-lista-krotka li { padding: 8px 0; }
.t-werdykty { display: flex; flex-direction: column; }
.t-w-glowa, .t-w { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 70px); gap: 6px; align-items: center; }
.t-w-glowa { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); padding-bottom: 6px; border-bottom: 1.5px solid var(--ink-2); }
.t-w { border-bottom: 1px solid var(--linia-2); padding: 7px 0; min-height: 44px; }
.t-w b { font-size: 16px; font-weight: 500; line-height: 1.2; overflow-wrap: anywhere; }
.t-w .stan, .tel .t-w .stan { font-size: 11px; gap: 5px; letter-spacing: .04em; }
.t-w .stan::before { width: 11px; height: 11px; }
.t-os { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1.5px solid var(--linia); display: flex; flex-direction: column; gap: 12px; }
.t-os li { position: relative; font-size: 17px; line-height: 1.4; color: var(--ink-2); }
.t-os li::before { content: ""; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; background: var(--ink-2); }
.t-os li span { display: block; font-family: var(--f-mono); font-size: 14px; color: var(--mute); }
.t-os li b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.t-os li.a::before { background: var(--akc); }
.t-os li.a b, .t-os li.a span { color: var(--akc); }
.t-para { border-top: 1.5px solid var(--ink-2); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.t-para.zgub { border-top-color: var(--linia); }
.t-para p { font-family: var(--f-serif); font-size: 22px; line-height: 1.3; }
.t-para em { font-style: normal; color: var(--akc); border-bottom: 2px solid var(--akc); }
.t-para s { text-decoration: none; color: var(--mute); border-bottom: 2px dashed var(--mute); }
.t-para.zgub .t-etk { color: var(--mute); }
.t-sygnatury { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: auto; padding-top: 6px; }
.t-interakcja { display: flex; flex-direction: column; gap: 16px; }
.t-interakcja > * { flex-shrink: 0; }
.t-bodziec { font-family: var(--f-serif); font-size: 20px; line-height: 1.5; padding-left: 18px; margin-left: 2px; }
.t-slowo { font-size: 56px; }
.t-slowo span { color: var(--akc); }
.komunikat.czeka { border-left-color: var(--st-projekt); }
.komunikat.odslona { border-left-color: var(--akc); }
.jezyki .opcja.poprawna { border-color: var(--akc); border-width: 3px; }
.jezyki .opcja.poprawna .kod { color: var(--akc); }
.opcja[aria-disabled="true"] { cursor: default; }
.tog button:disabled { cursor: not-allowed; color: var(--mute); }
.tog button:disabled[aria-pressed="true"] { color: var(--bg); }
.btn[disabled] { opacity: .45; cursor: default; }
.tel .pole-meta { margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  .tel *, .tel *::before, .tel *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
/* zgadywanie z wieloma opcjami (slajd 47: 12 języków) mieści się bez przewijania (25.11.2026) */
.jezyki.wiele .opcja { min-height: 52px; padding: 6px 12px; }
.jezyki.wiele .kod { font-size: 24px; }
.jezyki.wiele .jez { font-size: 13px; }
.jezyki.wiele .opcja { grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: 8px; min-height: 48px; }
