/* Podstrony: lista ksiazek, podstrona tomu (naglowek w kolorach okladki, kartkowanie rozkladowek, metryka),
   zamowienie i strony w budowie. Kolory tomow (--t1, --t2, --t-napis) dopisuje na koncu scripts/build.mjs. */

/* kotwice (#eksperci, #ekspert-..., #srodek) laduja pod stalym menu, nie pod nim */
html { scroll-padding-top: calc(max(var(--nav-h), 82px) + 16px); } /* logo-odznaka wystaje pod pasek do 82 px */

/* --- zwykla podstrona --- */
.pod { padding: calc(var(--nav-h) + clamp(28px, 6vw, 64px)) 0 clamp(48px, 8vw, 96px); min-height: 70svh; }
.pod-in { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--padx); }
.pod-h { margin: 0 0 .6em; font-size: clamp(34px, 4.2vw, 58px); line-height: 1.08; letter-spacing: -.01em; text-wrap: balance; }
.pod-lead { max-width: 640px; font-size: 19px; line-height: 1.6; color: var(--ink-soft); }
.pod-lead a { color: var(--teal); }
.pod-brak { color: var(--ink-soft); font-size: 16px; line-height: 1.6; }

/* --- lista ksiazek --- */
.lista { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(22px, 2.6vw, 40px); margin: 0; padding: 0; list-style: none; }
.lista-tom { align-items: stretch; text-align: left; }
.lista-tom h2 { margin: 18px 0 6px; font-size: clamp(19px, 1.5vw, 22px); line-height: 1.25; text-wrap: balance; }
.lista-tom h2 a { color: inherit; text-decoration: none; }
.lista-tom h2 a:hover { color: var(--teal); }
.lista-opis { flex: 1; margin: 0 0 12px; font-size: 16px; line-height: 1.5; color: var(--ink-soft); }
.lista-tom .tom-cena { margin-bottom: 10px; }
.lista-kup { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.lista-kup .kafel-link { font-size: 16px; }
@media (max-width: 1100px) { .lista { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .lista { grid-template-columns: 1fr; gap: 40px; } }

/* --- podstrona tomu: naglowek w kolorach okladki --- */
.tomp-hero {
  position: relative; overflow: clip; color: var(--t-napis);
  background: linear-gradient(var(--t1), var(--t2));
  padding: calc(var(--nav-h) + clamp(20px, 4vw, 56px)) var(--padx) clamp(40px, 6vw, 80px);
}
.tomp-hero::after { /* ziarno jak na okladkach */
  content: ""; position: absolute; inset: 0; opacity: .25; mix-blend-mode: soft-light; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.tomp-in { position: relative; z-index: 1; width: 100%; max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.tomp-in-kol { display: block; }
.tomp-okl { position: relative; justify-self: end; width: min(100%, 560px); perspective: 1600px; }
.tomp-okl img {
  width: 100%; height: auto; aspect-ratio: 1; border-radius: 3px 8px 8px 3px;
  box-shadow: 0 40px 70px -34px rgba(10, 30, 45, .75), 0 4px 10px rgba(10, 30, 45, .18);
  transform-origin: 0 50%; animation: okl-wejscie 1.1s cubic-bezier(.16, 1, .3, 1) both; /* ksiazka hamuje plynnie, bez odbicia */
}
.tomp-okl::after { /* grzbiet: cien i swiatlo przy lewej krawedzi */
  content: ""; position: absolute; inset: 0 auto 0 0; width: 5%; border-radius: 3px 0 0 3px; pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, .22), rgba(255, 255, 255, .18) 45%, rgba(0, 0, 0, 0));
}
@keyframes okl-wejscie { from { opacity: 0; transform: translateY(40px) rotateY(-18deg); } to { opacity: 1; transform: none; } }
.tomp-info { display: flex; flex-direction: column; align-items: flex-start; }
.okruszki { margin: 0 0 18px; font-size: 15px; }
.okruszki a { color: inherit; opacity: .85; text-underline-offset: 3px; }
.okruszki a::before { content: "← "; }
.tomp-info .t-sysiu { font-size: clamp(64px, 7.4vw, 118px); }
.tomp-info .t-rest { font-size: clamp(28px, 3vw, 46px); color: var(--t-napis); text-wrap: balance; }
[data-tom="slub"] .tomp-info .t-rest, [data-tom="zuzi"] .tomp-info .t-rest { text-shadow: 0 0 .5em rgba(255, 255, 255, .55); }
.tomp-autor { margin: 22px 0 0; font-size: 17px; opacity: .92; }
.tomp-cena { margin: 18px 0 14px; font-size: 30px; font-weight: 700; }
.tomp-kup { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.tomp-kup .ile { color: var(--ink); }
/* najwazniejsze fakty pod autorami: oprawa, format, dla kogo (pelna metryka w "Szczegolach") */
.tomp-fakty { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 10px 0 0; padding: 0; list-style: none; font-size: 15px; opacity: .92; }
.tomp-fakty li + li::before { content: "·"; margin: 0 .55em; }
.tomp-fakty .tomp-fakty-kto { flex-basis: 100%; }
.tomp-fakty .tomp-fakty-kto::before { content: none; }
.tomp-zajrzyj { margin-top: 18px; color: inherit; font-size: 16px; font-weight: 700; text-underline-offset: 4px; }
.tomp-zajrzyj:hover { opacity: .8; }
@media (max-width: 760px) {
  /* tylko siatka naglowka: Chrome stosuje justify-items takze w ukladzie blokowym, a wtedy pas stron w .tomp-in-kol
     dostaje szerokosc wszystkich stron naraz i rozpycha strone na telefonie */
  .tomp-hero .tomp-in { grid-template-columns: 1fr; gap: 24px; justify-items: center; }
  .tomp-okl { justify-self: center; width: min(78vw, 420px); }
  .tomp-info { align-items: center; text-align: center; }
  .tomp-info .t-sysiu { font-size: 64px; }
  .tomp-info .t-rest { font-size: 28px; }
  .tomp-kup { justify-content: center; }
  .tomp-fakty { justify-content: center; }
  .okruszki { display: none; }
}

/* --- sekcje podstrony tomu --- */
.tomp-sek { padding: clamp(48px, 7vw, 96px) var(--padx); }
.tomp-ekspert, .tomp-inne { background: #fbf6ee; }
.tomp-w { max-width: 720px; margin: 0 auto; }
.tomp-w-szeroki { max-width: 960px; }
.tomp-sek h2, .tomp-srodek h2 { margin: 0 0 .7em; font-size: clamp(28px, 3vw, 42px); line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; }
.tomp-sek p { margin: 0 0 1em; font-size: clamp(17px, 1.3vw, 19px); line-height: 1.65; color: #36596a; text-wrap: pretty; }
.tomp-cytat { margin: 1.8em 0; padding: 0; text-align: center; }
.tomp-cytat p { margin: 0; font-size: clamp(22px, 2vw, 28px); line-height: 1.35; color: var(--ink); font-weight: 700; }
.tomp-cytat footer { margin-top: 8px; font-size: 16px; color: var(--ink-soft); }
.tomp-tematy { display: grid; gap: 10px; margin: 1.4em 0; padding: 0; list-style: none; }
.tomp-tematy li { position: relative; padding: 14px 18px 14px 50px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px rgba(31, 70, 86, .07), 0 14px 30px -24px rgba(31, 70, 86, .5); font-size: 17px; line-height: 1.4; }
.tomp-tematy li::before { content: ""; position: absolute; left: 18px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 46% 54% 50% 50% / 55% 45% 55% 45%; background: var(--sky); }
.tomp-sek .tomp-ekspert-kto { font-size: 16px; color: var(--ink-soft); }
.tomp-ekspert-kto b { color: var(--ink); }

/* metryka */
.metryka { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; margin: 0; }
.metryka div { display: flex; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid rgba(31, 70, 86, .12); }
.metryka dt { flex: none; color: var(--ink-soft); font-size: 15px; }
.metryka dd { margin: 0; font-size: 16px; text-align: right; }
/* O ksiazce obok szczegolow: tekst po lewej, karta metryki po prawej (na telefonie pod spodem) */
.tomp-opis-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: clamp(28px, 5vw, 72px); align-items: start; max-width: 1100px; margin: 0 auto; }
.tomp-metryka { padding: 26px 28px 22px; border-radius: 26px; background: #fff; box-shadow: 0 0 0 1px rgba(31, 70, 86, .07), 0 22px 44px -34px rgba(31, 70, 86, .55); }
.tomp-sek .tomp-metryka h2 { margin-bottom: .4em; font-size: 22px; }
.tomp-metryka .metryka { grid-template-columns: 1fr; }
.tomp-metryka .metryka div { padding: 10px 0; }
.tomp-metryka .metryka dt { font-size: 14px; }
.tomp-metryka .metryka dd { font-size: 15px; }
/* dane wydawcy (wymog GPSR): jedna drobna linia pod metryka */
.tomp-sek .wydawca { margin: 16px 0 0; font-size: 13px; line-height: 1.55; color: var(--ink-soft); }
.wydawca a { color: var(--teal); }
@media (max-width: 860px) { .tomp-opis-in { grid-template-columns: 1fr; } }
.nw { white-space: nowrap; }
@media (max-width: 760px) {
  .metryka { grid-template-columns: 1fr; }
}

/* inne tomy */
.tomp-in-kol h2 { text-align: center; }
.inne { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 3vw, 40px); max-width: 900px; margin: 0 auto; padding: 0; list-style: none; }
@media (max-width: 560px) {
  .inne .tom h3 { font-size: 14px; margin-top: 10px; }
  .inne .tom-cena { font-size: 14px; }
}

/* --- zajrzyj do srodka: pas stron (telefon, bez JS) albo otwarta ksiazka (ksiazka.js) --- */
.tomp-srodek { padding: clamp(48px, 7vw, 96px) var(--padx); background: linear-gradient(var(--t1), color-mix(in srgb, var(--t1) 75%, #000)); color: #fff; }
.tomp-srodek h2 { text-shadow: 0 .05em .3em rgba(10, 30, 45, .35); }
[data-tom="slub"] .tomp-srodek { background: linear-gradient(#5f7aa8, #3e5683); } /* jasna okladka: ciemniejsze tlo pod stronami */
.tomp-srodek-brak h2 { text-align: center; }
.tomp-srodek-brak .pod-brak { text-align: center; }
.kart { outline: none; }
.kart-okno { margin: 0 calc(-1 * var(--padx)); }
.kart-pas {
  display: flex; gap: 12px; margin: 0; padding: 6px var(--padx) 18px; list-style: none;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--padx); scrollbar-width: none;
}
.kart-pas::-webkit-scrollbar { display: none; }
.kart-str { flex: 0 0 min(86vw, 560px); scroll-snap-align: start; }
.kart-str img { width: 100%; height: auto; aspect-ratio: 1; background: #f3eee4; box-shadow: 0 26px 50px -30px rgba(5, 20, 30, .8); }
@media (min-width: 761px) {
  /* bez JS na komputerze: rozkladowka po rozkladowce */
  .kart-pas { gap: 0; }
  .kart-str { flex-basis: min(46vw, 560px); scroll-snap-align: none; }
  .kart-str[data-b="L"] { scroll-snap-align: start; }
}
.kart-ster { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 18px; }
.kart-ster button {
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%;
  background: #fffaf2; color: var(--ink); cursor: pointer; box-shadow: 0 10px 24px -12px rgba(5, 20, 30, .7);
}
.kart-ster button:disabled { opacity: .35; cursor: default; }
.kart-ster button:focus-visible { outline: 3px solid #fdf3c4; outline-offset: 3px; }
html:not(.js):not(.rm) .kart-ster { display: none; } /* bez JS pas stron przewija sie palcem */
.kart-podpis { min-width: 4.5em; margin: 0; font-size: 16px; font-variant-numeric: tabular-nums; text-align: center; }

/* otwarta ksiazka */
.kart-ksiega .kart-okno { display: none; }
.ksiega {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; width: min(100%, 1120px); margin: 0 auto;
  perspective: 2600px; filter: drop-shadow(0 34px 40px rgba(5, 20, 30, .45));
}
.k-str { position: relative; aspect-ratio: 1; cursor: pointer; background: #f3eee4; }
.k-str img, .k-twarz img { position: absolute; inset: 0; width: 100%; height: 100%; }
.k-str::after, .k-twarz::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.k-str-l::after { background: linear-gradient(270deg, rgba(20, 30, 40, .28), rgba(20, 30, 40, 0) 8%); }
.k-str-p::after { background: linear-gradient(90deg, rgba(20, 30, 40, .28), rgba(20, 30, 40, 0) 8%); }
.k-kartka { position: absolute; top: 0; z-index: 2; width: 50%; height: 100%; transform-style: preserve-3d; transition: transform .95s cubic-bezier(.45, .05, .25, 1); }
.k-kartka-p { left: 50%; transform-origin: 0 50%; }
.k-kartka-l { left: 0; transform-origin: 100% 50%; }
.k-kartka-p.obr { transform: rotateY(-180deg); }
.k-kartka-l.obr { transform: rotateY(180deg); }
.k-twarz { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; background: #f3eee4; }
.k-tyl { transform: rotateY(180deg); }
/* swiatlo na obracanej kartce: przy grzbiecie ciemniej, w polowie obrotu jasny refleks */
.k-kartka-p .k-twarz:not(.k-tyl)::after, .k-kartka-l .k-tyl::after { background: linear-gradient(90deg, rgba(20, 30, 40, .3), rgba(20, 30, 40, 0) 12%, rgba(255, 255, 255, .12) 60%, rgba(255, 255, 255, 0)); }
.k-kartka-p .k-tyl::after, .k-kartka-l .k-twarz:not(.k-tyl)::after { background: linear-gradient(270deg, rgba(20, 30, 40, .3), rgba(20, 30, 40, 0) 12%, rgba(255, 255, 255, .12) 60%, rgba(255, 255, 255, 0)); }

/* --- zamowienie --- */
.pod-zam { padding-bottom: clamp(32px, 5vw, 64px); }
.pod-zam .kup { padding: 0 var(--padx); }
.pod-zam .kup .pod-h { text-align: center; }
.pod-zam .pod-in { margin-top: 32px; text-align: center; }
/* dostawa i dane pod koszykiem (formularz na wzor .zam-form z placowek, ale sekcje zamiast jednej siatki) */
.zam-dane { text-align: left; }
.zam-form.zam-dane fieldset { display: block; min-width: 0; margin: 0 0 clamp(20px, 3vw, 30px); padding: 0; border: 0; }
.zam-dane legend { margin: 0 0 12px; padding: 0; font-size: clamp(20px, 2vw, 24px); font-weight: 700; color: var(--ink); }
.zam-dane fieldset:disabled { opacity: .45; }
.zam-dane button.btn { border: 0; font-family: inherit; cursor: pointer; }
.zam-pusto { margin: 0 0 1.2em; font-size: 16px; font-weight: 600; color: var(--ink); }
.zam-info { margin: 0 0 14px; font-size: 15px; color: var(--ink-soft); }
.pole-pod { font-size: 14px; color: var(--ink-soft); }
.pola { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.pole label small { font-weight: 600; color: var(--ink-soft); }
.pole input:focus-visible { outline: 3px solid var(--teal); outline-offset: 1px; }
.pole input:user-invalid { border-color: #c0392b; box-shadow: inset 0 0 0 1px #c0392b; }
.pole :is(input, textarea)[aria-invalid="true"] { border-color: #c0392b; box-shadow: inset 0 0 0 1px #c0392b; }
.pole-blad { display: block; margin-top: 2px; font-size: 13px; line-height: 1.4; color: #b03a2e; }
.dost { display: grid; gap: 10px; margin-bottom: 16px; }
.dost-op { display: grid; grid-template-columns: auto 80px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 16px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px rgba(31, 70, 86, .18); cursor: pointer; }
.dost-op:has(input:checked) { box-shadow: 0 0 0 2px var(--teal); }
.dost-op input { width: 20px; height: 20px; margin: 0; accent-color: var(--teal); }
/* logo przewoznika w ramce o stalym rozmiarze: rozne proporcje (DPD szerokie, ORLEN kwadrat) wpisane w ten sam prostokat */
.dost-logo { display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 80px; height: 52px; padding: 6px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px rgba(31, 70, 86, .14); }
.dost-logo img { display: block; max-width: 100%; max-height: 100%; }
.dost-t { display: grid; gap: 2px; min-width: 0; }
.dost-n, .dost-c { font-weight: 700; }
.dost-c { white-space: nowrap; }
.dost-i { font-size: 14px; color: var(--ink-soft); }
/* telefon: nazwa i cena w pierwszym wierszu, opis pod nimi na cala szerokosc (inaczej opis lamal sie na trzy linie) */
@media (max-width: 480px) {
  .dost-op { grid-template-columns: auto 64px minmax(0, 1fr) auto; gap: 2px 10px; padding: 12px; }
  .dost-op input { grid-column: 1; grid-row: 1 / 3; }
  .dost-logo { grid-column: 2; grid-row: 1 / 3; width: 64px; height: 44px; padding: 5px; }
  .dost-t { display: contents; }
  .dost-n { grid-column: 3; grid-row: 1; }
  .dost-c { grid-column: 4; grid-row: 1; }
  .dost-i { grid-column: 3 / -1; grid-row: 2; }
}
.punkt-wiersz { display: flex; flex-wrap: wrap; gap: 10px; }
.punkt-wiersz input { flex: 1 1 180px; text-transform: uppercase; }
.punkt-wiersz .btn { padding: 12px 18px; font-size: 15px; white-space: nowrap; }
.punkt-adres { min-height: 1.2em; margin: 8px 0 0; font-size: 15px; color: var(--ink-soft); }
.mapa { margin-top: 14px; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(31, 70, 86, .18); }
.mapa iframe { display: block; width: 100%; height: min(70vh, 560px); border: 0; }
.zgoda { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; font-size: 15px; line-height: 1.5; cursor: pointer; }
.zgoda input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--teal); }
.zgoda a { color: var(--teal); }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; } /* pulapka na boty, poza ekranem */
.zam-razem { display: grid; gap: 6px; max-width: 360px; margin: 0 0 18px auto; }
.zam-razem p { display: flex; justify-content: space-between; margin: 0; font-size: 17px; }
.zam-razem .razem-suma { padding-top: 8px; border-top: 1px solid rgba(31, 70, 86, .18); font-size: 20px; }
.zam-przerwa, .zam-blad { margin: 0 0 14px; padding: 12px 16px; border-radius: 14px; font-weight: 600; line-height: 1.5; }
.zam-przerwa { background: #fff2a8; color: #6b5600; }
.zam-blad { background: #fde2df; color: #7b1d12; }
.zam-blad a { color: inherit; }
.zam-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.zam-dalej { padding: 14px 28px; font-size: 18px; }
.zam-dalej:disabled { opacity: .4; cursor: default; box-shadow: none; }
.zam-pod { flex: 1 1 260px; margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
/* baner "Zaufane platnosci" Tpay (oficjalny SVG z tpay.com/dla-developera/banery, plik lokalny ze wzgledu na CSP) */
.tpay-baner { margin: 18px 0 0; }
.tpay-baner a { display: inline-block; border-radius: 12px; }
.tpay-baner a:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.tpay-baner img { display: block; width: 170px; max-width: 100%; height: auto; }
@media (max-width: 560px) { .pola { grid-template-columns: 1fr; } .zam-razem { max-width: none; } .zam-dalej { width: 100%; } }

/* --- strony z tekstem (O serii, O nas): kolumna do czytania, szersze sekcje z kartami --- */
.pod-tekst { padding-bottom: 0; }
.tekst-glowa, .tekst-sek { width: auto; max-width: 760px; margin: 0 auto; padding: 0 var(--padx); box-sizing: content-box; }
/* O nas: kolumna jak przy osobach (zdjecie + tekst), tekst wydawnictwa w linii z notami */
.pod-onas .tekst-glowa, .pod-onas .tekst-sek { max-width: 960px; }
@media (min-width: 761px) { .pod-onas .tekst-wydawca > * { margin-left: calc(220px + clamp(20px, 4vw, 44px)); max-width: 640px; } }
.tekst-glowa { padding-bottom: clamp(28px, 5vw, 56px); }
.tekst-glowa .pod-h { margin-bottom: .45em; }
.tekst-lead { margin: 0; font-size: clamp(20px, 1.9vw, 25px); line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.tekst-sek { padding-top: clamp(36px, 6vw, 72px); padding-bottom: clamp(36px, 6vw, 72px); border-top: 1px solid rgba(31, 70, 86, .1); }
.tekst-sek h2 { margin: 0 0 .6em; font-size: clamp(27px, 2.8vw, 40px); line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; }
.tekst-sek p { margin: 0 0 1em; font-size: clamp(17px, 1.3vw, 19px); line-height: 1.7; color: #36596a; text-wrap: pretty; }
.tekst-sek .tekst-lead { color: var(--ink); line-height: 1.5; }
.tekst-szeroka { max-width: 1100px; }
.tekst-szeroka > h2, .tekst-szeroka > .tekst-pod { text-align: center; }
.tekst-sek .tekst-pod { margin: -.3em 0 clamp(24px, 4vw, 40px); font-size: 18px; color: var(--ink-soft); }
.tekst-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6em !important; }
.tekst-szeroka .tekst-cta { justify-content: center; }

/* O serii: ramka "dla kogo", waska kolumna w szerokiej sekcji, karty tomow, dwie karty obok siebie, cytat */
.tekst-ramka { margin-top: clamp(24px, 4vw, 40px); padding: 22px 26px; border-radius: 24px; background: #fff; box-shadow: 0 0 0 1px rgba(31, 70, 86, .07), 0 22px 44px -34px rgba(31, 70, 86, .55); }
.tekst-ramka h2 { margin: 0 0 .4em; font-size: 20px; color: var(--teal); }
.tekst-ramka p { margin: 0; font-size: 17px; line-height: 1.65; color: #36596a; }
.tekst-waska { max-width: 760px; margin: 0 auto; }
.tekst-sek .tekst-h3 { margin: 1.6em 0 .8em; font-size: clamp(21px, 1.8vw, 26px); }
.tematy { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); margin: 0 0 clamp(32px, 5vw, 56px); padding: 0; list-style: none; }
.tematy a { display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; }
.tematy img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 4px 7px 7px 4px; box-shadow: 0 22px 40px -24px rgba(31, 70, 86, .65); transition: transform .45s var(--spring); }
.tematy a:hover img { transform: translateY(-5px) rotate(-1deg); }
.tematy a:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; border-radius: 8px; }
.tematy-tyt { margin-top: 8px; font-size: 17px; font-weight: 700; line-height: 1.25; }
.tematy a:hover .tematy-tyt { color: var(--teal); }
.tematy-o { font-size: 15px; line-height: 1.45; color: var(--ink-soft); }
@media (max-width: 760px) { .tematy { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dwie { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: clamp(16px, 2.5vw, 28px); gap: clamp(14px, 2vw, 28px); }
.dwie-k { padding: 26px 28px; border-radius: 26px; background: #fbf6ee; }
.dwie-k h3 { margin: 0 0 .5em; font-size: 21px; }
.tekst-sek .dwie-k p { margin: 0; font-size: 17px; }
@media (max-width: 760px) { .dwie { grid-template-columns: 1fr; } }
.tekst-sek .tekst-cytat { margin: 0 0 .8em; font-size: clamp(23px, 2.2vw, 30px); line-height: 1.3; color: var(--teal); font-weight: 700; text-wrap: balance; }

/* trzy czesci ksiazki */
.trzy { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 28px); margin: 0; padding: 0; list-style: none; }
.trzy li { display: flex; flex-direction: column; align-items: flex-start; padding: 26px 24px; border-radius: 26px; background: #fff; box-shadow: 0 0 0 1px rgba(31, 70, 86, .07), 0 22px 44px -32px rgba(31, 70, 86, .55); }
.trzy-nr { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 16px; border-radius: 46% 54% 50% 50% / 55% 45% 55% 45%; color: #fff; font-size: 24px; font-weight: 700; background: var(--kc); }
.trzy li:nth-child(1) { --kc: #3a87ab; } .trzy li:nth-child(2) { --kc: #5b8a4a; } .trzy li:nth-child(3) { --kc: #1d7a90; }
.trzy h3 { margin: 0 0 .4em; font-size: 20px; line-height: 1.25; }
.trzy p { flex: 1; margin: 0 0 1em; font-size: 16px; line-height: 1.5; }
.trzy .kafel-link { font-size: 16px; }
@media (max-width: 760px) { .trzy { grid-template-columns: 1fr; } }

/* eksperci */
.eksperci { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: clamp(16px, 2.4vw, 32px); margin: 0; padding: 0; list-style: none; } /* rozwinieta nota nie rozciaga karty obok */
.ekspert { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; align-items: start; padding: 22px; border-radius: 26px; background: #fff; box-shadow: 0 0 0 1px rgba(31, 70, 86, .07), 0 22px 44px -32px rgba(31, 70, 86, .55); }
.ekspert-foto { width: 120px; height: 150px; object-fit: cover; border-radius: 18px; background: #e9e2d6; }
.ekspert h3 { margin: 2px 0 6px; font-size: 19px; line-height: 1.25; }
.tekst-sek .ekspert p { margin: 0 0 8px; font-size: 15px; line-height: 1.5; }
.tekst-sek .ekspert-rola { color: var(--ink-soft); }
.ekspert-tom a { color: var(--teal); font-weight: 700; }
.ekspert details { margin-top: 6px; }
.ekspert summary { display: inline-block; cursor: pointer; color: var(--teal); font-size: 15px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.ekspert summary::-webkit-details-marker { display: none; }
.ekspert summary:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
.ekspert details[open] summary { margin-bottom: 8px; }
@media (max-width: 900px) { .eksperci { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .ekspert { grid-template-columns: 88px minmax(0, 1fr); gap: 14px; padding: 16px; } .ekspert-foto { width: 88px; height: 110px; } }

/* Dla placowek: karty odbiorcow, podstawa programowa, metryka dla bibliotek, warunki i formularz (na razie bez wysylki) */
.pod-placowki .tekst-glowa .tekst-cta { margin-top: 1.4em !important; }
.kto { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); margin: 0; padding: 0; list-style: none; }
.kto li { display: flex; flex-direction: column; align-items: flex-start; padding: 26px 24px; border-radius: 26px; background: #fff; box-shadow: 0 0 0 1px rgba(31, 70, 86, .07), 0 22px 44px -32px rgba(31, 70, 86, .55); }
.kto h3 { margin: 0 0 .4em; font-size: 21px; }
.tekst-sek .kto p { flex: 1; margin: 0 0 1em; font-size: 16px; line-height: 1.55; }
.kto .kafel-link { font-size: 16px; }
@media (max-width: 760px) { .kto { grid-template-columns: 1fr; } }
.tekst-sek .tekst-cta .kafel-link { font-size: 17px; }
/* podstawa programowa: watki jako wiersze (naglowek z lewej, opis z prawej), na jednej kremowej karcie */
.pp { max-width: 960px; margin: clamp(20px, 3vw, 32px) auto 0; padding: clamp(8px, 1.5vw, 14px) clamp(22px, 3vw, 40px); list-style: none; border-radius: 26px; background: #fbf6ee; }
.pp li { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(16px, 3vw, 40px); padding: clamp(20px, 2.6vw, 28px) 0; border-top: 1px solid rgba(31, 70, 86, .12); }
.pp li:first-child { border-top: 0; }
.pp h3 { margin: 0; font-size: 20px; line-height: 1.3; color: var(--teal); }
.tekst-sek .pp p { margin: 0; font-size: 17px; line-height: 1.65; }
.pp a, .pp-zrodlo a, .pod-placowki .tekst-waska a { color: var(--teal); }
.tekst-sek .pp-zrodlo { max-width: 960px; margin: 1.2em auto 0; font-size: 14px; line-height: 1.5; color: var(--ink-soft); text-align: center; }
@media (max-width: 760px) { .pp li { grid-template-columns: 1fr; gap: 8px; } }
.tekst-sek .biblio-seria { margin: -.2em 0 clamp(20px, 3vw, 32px); font-size: 16px; text-align: center; color: var(--ink-soft); }
.biblio { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); margin: 0; padding: 0; list-style: none; }
.biblio li { padding: 22px 26px 10px; border-radius: 26px; background: #fff; box-shadow: 0 0 0 1px rgba(31, 70, 86, .07), 0 22px 44px -34px rgba(31, 70, 86, .55); }
.biblio h3 { margin: 0 0 .3em; font-size: 19px; line-height: 1.3; }
.biblio h3 a { color: inherit; text-decoration: none; }
.biblio h3 a:hover { color: var(--teal); }
.biblio .metryka { grid-template-columns: 1fr; }
.biblio .metryka div:last-child { border-bottom: 0; }
@media (max-width: 760px) { .biblio { grid-template-columns: 1fr; } }
.zam-warunki { max-width: 760px; margin: 0 auto; }
.zam-form { max-width: 760px; margin: clamp(32px, 5vw, 56px) auto 0; padding: clamp(22px, 3vw, 34px); border-radius: 26px; background: #fbf6ee; }
.tekst-sek .zam-uwaga { margin: 0 0 1.2em; font-size: 16px; line-height: 1.55; color: var(--ink); font-weight: 600; }
.zam-form fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; margin: 0; padding: 0; border: 0; min-width: 0; }
.pole { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pole-2 { grid-column: 1 / -1; }
.pole label { font-size: 15px; font-weight: 700; color: var(--ink); }
.pole input, .pole textarea { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid rgba(31, 70, 86, .22); border-radius: 14px; background: #fff; color: var(--ink); font: inherit; font-size: 16px; }
.pole textarea { resize: vertical; }
/* wylaczone sa tylko pola; etykiety zostaja czytelne, bo mowia, jakie dane wyslac mailem */
.zam-form fieldset:disabled input, .zam-form fieldset:disabled textarea { opacity: .6; cursor: not-allowed; }
.zam-kontakt { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 760px; margin: 24px auto 0; }
@media (max-width: 560px) {
  .zam-form fieldset { grid-template-columns: 1fr; }
  .zam-kontakt .btn { width: 100%; text-align: center; box-sizing: border-box; }
}

/* O nas: osoba ze zdjeciem */
.osoba { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(20px, 4vw, 44px); align-items: start; max-width: 960px; }
.osoba-foto { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 26px; background: #e9e2d6; box-shadow: 0 26px 50px -34px rgba(31, 70, 86, .7); }
.tekst-sek .osoba-etyk, .osoba-etyk { margin-top: 0; margin-bottom: 6px; font-size: 14px; letter-spacing: .09em; text-transform: uppercase; color: var(--teal); font-weight: 700; }
.osoba h2 { margin-bottom: .2em; }
.tekst-sek .osoba-rola { margin-bottom: 1.1em; color: var(--ink-soft); font-size: 17px; }
.tekst-wydawca { max-width: 760px; }
.wydawca-logo { width: min(300px, 70vw); height: auto; margin: 0 0 22px; }
@media (max-width: 760px) {
  .osoba { grid-template-columns: 1fr; }
  .osoba-foto { width: min(60vw, 260px); }
}

/* ekspert na podstronie tomu */
.tomp-ekspert-kto { display: flex; align-items: flex-start; gap: 16px; margin-top: 1.2em; }
.tomp-ekspert-foto { flex: none; width: 76px; height: 95px; object-fit: cover; border-radius: 16px; background: #e9e2d6; }
.tomp-sek .tomp-ekspert-kto p { margin: 0; font-size: 16px; line-height: 1.5; }
.tomp-ekspert-kto details { margin-top: 4px; }
.tomp-ekspert-kto summary { display: inline-block; cursor: pointer; color: var(--teal); font-size: 15px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.tomp-ekspert-kto summary::-webkit-details-marker { display: none; }
.tomp-ekspert-kto summary:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
.tomp-sek .tomp-ekspert-kto details p { margin: 8px 0 0; font-size: 15px; }

/* dokumenty EDBAD (regulamin, polityka): zwykly tekst prawny do czytania */
.dokument .pod-in { max-width: 820px; }
.dokument h1 { margin: 0 0 1em; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.1; text-align: left; }
.dokument h2, .dokument h3, .dokument h4 { margin: 1.8em 0 .6em; font-size: clamp(19px, 1.5vw, 22px); line-height: 1.3; text-align: left; }
.dokument h4 { font-size: 18px; }
.dokument p, .dokument li { font-size: 16px; line-height: 1.7; color: #36596a; }
.dokument p { margin: 0 0 .9em; }
.dokument ol, .dokument ul { margin: 0 0 1em; padding-left: 1.4em; }
.dokument li { margin-bottom: .35em; }
.dokument a { color: var(--teal); word-break: break-word; }


/* Dla placowek: okazje, cennik, warunki, kroki, formularz na fakture, FAQ */
.okazje { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); margin: 0; padding: 0; list-style: none; }
.okazje li { padding: 20px 22px; border-radius: 22px; background: #fff; box-shadow: 0 0 0 1px rgba(31, 70, 86, .07), 0 22px 44px -34px rgba(31, 70, 86, .55); }
.okazje h3 { margin: 0 0 .3em; font-size: 18px; line-height: 1.3; }
.tekst-sek .okazje p { margin: 0; font-size: 15px; line-height: 1.5; }
.cennik-wrap { max-width: 480px; margin: 0 auto; padding: clamp(10px, 1.6vw, 18px) clamp(14px, 2.4vw, 32px); border-radius: 26px; background: #fff; box-shadow: 0 0 0 1px rgba(31, 70, 86, .07), 0 22px 44px -34px rgba(31, 70, 86, .55); }
.cennik-tab { width: 100%; border-collapse: collapse; font-size: 17px; }
.cennik-tab th, .cennik-tab td { padding: 12px 14px; border-bottom: 1px solid rgba(31, 70, 86, .12); text-align: left; }
.cennik-tab thead th { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.cennik-tab tbody th { font-weight: 700; color: var(--ink); }
.cennik-tab td:nth-child(2) { font-weight: 700; white-space: nowrap; }
.cennik-tab th:nth-child(2), .cennik-tab td:nth-child(2) { text-align: right; }
.cennik-tab tbody tr:last-child th, .cennik-tab tbody tr:last-child td { border-bottom: 0; }
.tekst-sek .cennik-nota { max-width: 720px; margin: 14px auto 0; font-size: 14px; line-height: 1.5; color: var(--ink-soft); text-align: center; }
.cennik-nota a { color: var(--teal); }
.warunki { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); margin: clamp(22px, 3vw, 34px) 0 0; }
.warunki div { padding: 18px 20px; border-radius: 22px; background: #fbf6ee; }
.warunki dt { margin: 0 0 .3em; font-size: 14px; letter-spacing: .05em; text-transform: uppercase; color: var(--teal); font-weight: 700; }
.warunki dd { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink); }
.trzy.kroki { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.trzy.kroki li:nth-child(4) { --kc: #c9792b; }
/* linki w tekscie kart, pytan i akapitow sekcji (Pytania, Odstapienie, Dla placowek) w kolorze strony, nie domyslnym niebieskim; przyciski .btn maja wlasne kolory (bez :not napis znikal na tle) */
.faq a, .trzy p a, .tekst-sek > p a:not(.btn) { color: var(--teal); }
/* zdanie pod wysrodkowanym przyciskiem w szerokiej sekcji (Odstapienie) */
.tekst-pod { margin-top: .9em; text-align: center; font-size: 15px; color: var(--ink-soft); }
.pl-form .sztuki { display: grid; gap: 0; margin-bottom: 6px; }
.sztuki-w { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(31, 70, 86, .12); }
.sztuki-w label { font-size: 16px; font-weight: 700; color: var(--ink); }
.sztuki-w input { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid rgba(31, 70, 86, .3); border-radius: 12px; font: inherit; font-size: 18px; font-weight: 700; text-align: center; background: #fff; }
.sztuki-w input:focus-visible { outline: 3px solid var(--teal); outline-offset: 1px; }
.pl-form .zam-razem { margin-top: 18px; }
.pl-form .zam-pod, .kt-form .zam-pod { margin-top: 18px; }
.pl-form .razem-n { display: block; margin: 0 0 8px; font-size: 16px; color: var(--ink-soft); }
.pl-limit { margin: 8px 0 0; font-size: 15px; color: #c0392b; font-weight: 600; }
.pl-limit a { color: inherit; }
.pl-ok { max-width: 760px; margin: clamp(32px, 5vw, 56px) auto 0; padding: clamp(22px, 3vw, 34px); border-radius: 26px; background: #e8f3ea; box-shadow: 0 0 0 1px rgba(59, 122, 58, .2); }
.pl-ok h3 { margin: 0 0 .5em; font-size: 24px; color: #2f6b2e; }
.tekst-sek .pl-ok p { margin: 0 0 .6em; font-size: 17px; }
.pl-ok:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
.faq { max-width: 760px; margin: 0 auto; }
.faq details { padding: 14px 0; border-bottom: 1px solid rgba(31, 70, 86, .12); }
.faq summary { display: flex; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; font-size: 19px; font-weight: 700; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; color: var(--teal); font-size: 26px; line-height: 1; }
.faq details[open] summary::after { content: '×'; }
.faq summary:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; border-radius: 6px; }
.tekst-sek .faq p { margin: 10px 0 0; font-size: 17px; }
.faq a { color: var(--teal); }
@media (max-width: 960px) {
  .okazje, .warunki, .trzy.kroki { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .okazje, .warunki, .trzy.kroki { grid-template-columns: 1fr; }
  .cennik-tab { font-size: 15px; }
  .cennik-tab th, .cennik-tab td { padding: 10px 8px; }
  .sztuki-w { grid-template-columns: minmax(0, 1fr) 84px; }
}


/* Dla placowek: naglowek z okladkami i mapa sekcji */
.pod-placowki .tekst-glowa.pl-hero { max-width: 1100px; display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: clamp(24px, 4vw, 56px); align-items: center; text-align: left; padding-bottom: clamp(18px, 3vw, 32px); }
.pl-hero .tekst-cta { justify-content: flex-start; }
.pl-hero-okl { position: relative; height: 320px; }
.pl-hero-okl img { position: absolute; top: 50%; left: 50%; width: 180px; height: 180px; border-radius: 16px; box-shadow: 0 18px 36px -18px rgba(31, 70, 86, .6), 0 0 0 1px rgba(31, 70, 86, .08); transform: translate(-50%, -50%) rotate(var(--r)) translate(var(--x), var(--y)); }
.pl-hero-okl img:nth-child(1) { --r: -9deg; --x: -118px; --y: 28px; }
.pl-hero-okl img:nth-child(2) { --r: -3deg; --x: -40px; --y: -10px; }
.pl-hero-okl img:nth-child(3) { --r: 4deg; --x: 40px; --y: -2px; }
.pl-hero-okl img:nth-child(4) { --r: 10deg; --x: 118px; --y: 30px; }
.mapa-sekcji { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 1100px; margin: 0 auto; padding: 0 var(--padx) clamp(14px, 2.5vw, 28px); }
.mapa-sekcji a { padding: 8px 15px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px rgba(31, 70, 86, .12); color: var(--ink); font-size: 15px; font-weight: 700; text-decoration: none; transition: background .2s, color .2s; }
.mapa-sekcji a:hover { background: var(--teal); color: #fff; box-shadow: none; }
.mapa-sekcji a:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
@media (max-width: 960px) {
  .pod-placowki .tekst-glowa.pl-hero { grid-template-columns: 1fr; text-align: center; }
  .pl-hero .tekst-cta { justify-content: center; }
  .pl-hero-okl { height: auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .pl-hero-okl img { position: static; width: 100%; height: auto; transform: none; border-radius: 12px; }
}
/* Kontakt: dane w kafelkach, formularz jak u placowek */
.tekst-sek .kontakt-dane p { margin: 0; font-size: 17px; line-height: 1.5; }
.kontakt-dane a { color: var(--teal); font-weight: 700; }

/* kolory tomow: generowane przez scripts/build.mjs z zrodlo/dane/kolory.json */
[data-tom="oczko"] { --t1: #256d94; --t2: #a1c1da; --t-napis: #fff; }
[data-tom="domek"] { --t1: #904642; --t2: #e0b896; --t-napis: #fff; }
[data-tom="slub"] { --t1: #b6d0c0; --t2: #8196bd; --t-napis: var(--ink); }
[data-tom="zuzi"] { --t1: #e5dc83; --t2: #d6a27d; --t-napis: var(--ink); }
