/* Komponenty ebooka. Wymiary w em: w widoku książki 1em = 10.5px (jak w Figmie, styl KK/Tekst),
   w apteczce online podstawę podnosi klasa .eb--web. Zmienne = zmienne Figmy (KK marka, KK dział). */
.eb {
  --papier: #fff; --atrament: #2f3148; --szary: #5f5e69; --linia: #b9bbcb;
  --brzoskwinia: #feb495; --brz-jasna: #ffe9df; --terakota: #b5431f;
  --dzial-tlo: #fff3c7; --dzial-akcent: #f2c230; --dzial-tekst: #55701f; /* the ebook's own section colours from Figma (Robert, 29 Nov: only the CTAs are peach) */
  --serif: 'Cormorant Infant', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Red Hat Display', 'Helvetica Neue', Arial, sans-serif;
  font: 400 10.5px/1.62 var(--sans); color: var(--atrament); text-align: left;
  font-variant-numeric: lining-nums; letter-spacing: normal;
}
.eb * { color: inherit; font-family: inherit; font-weight: inherit; letter-spacing: inherit; }
.eb *, .eb *::before, .eb *::after { box-sizing: border-box; }
.eb :where(h1, h2, h3, h4, p, ul, ol, dl, dd, li) { margin: 0; padding: 0; }
.eb :where(ul, ol) { list-style: none; }
.eb strong { font-weight: 700; }
.eb .ms { font-family: 'Material Symbols Outlined' !important; font-weight: 300; font-style: normal; font-size: 2em; line-height: 1; letter-spacing: normal;
  text-transform: none; display: inline-block; white-space: nowrap; direction: ltr; width: 1em; height: 1em; overflow: hidden;
  -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga'; color: var(--dzial-tekst) !important; flex: none; vertical-align: middle; }

/* rysunek i plama */
.eb-illu { display: block; overflow: visible; }
.eb-illu path, .eb-illu circle { fill: none; stroke: var(--dzial-tekst); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.eb-illu .st { stroke-width: 2.1; }
.eb-illu .thin { stroke-width: .8; opacity: .75; }
.eb-illu .lf { fill: var(--dzial-tlo); fill-opacity: .55; }
.eb-illu .dot { fill: var(--dzial-akcent); fill-opacity: .6; }
.eb-plama { display: block; overflow: visible; }

/* strona A4 */
.eb-page { position: relative; width: 595px; height: 842px; background: var(--papier); overflow: hidden; }
.eb-body { position: absolute; left: 56px; top: 84px; width: 483px; height: 696px; z-index: 1; }
.eb-pagina { position: absolute; left: 56px; right: 56px; top: 36px; display: flex; justify-content: space-between;
  font: 500 7.5px/10px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--szary); }
.eb-folio { position: absolute; top: 786px; font: 500 18px/22px var(--serif); color: var(--szary); }
.eb-tab { position: absolute; top: 216px; width: 22px; height: 84px; background: var(--dzial-akcent); }
.eb-page.is-right .eb-tab { right: 0; } .eb-page.is-left .eb-tab { left: 0; }
.eb-page.is-right .eb-folio { right: 56px; } .eb-page.is-left .eb-folio { left: 56px; }
.eb-deco { position: absolute; z-index: 0; pointer-events: none; }
.eb-deco--top { left: 300px; top: -110px; width: 360px; height: 360px; }
.eb-deco--top .eb-plama { width: 360px; height: 330px; }
.eb-deco--top .eb-illu { position: absolute; left: 138px; top: 150px; width: 118px; height: 245px; }
.eb-deco--bottom { left: 326px; top: 500px; width: 360px; height: 360px; }
.eb-deco--bottom .eb-plama { position: absolute; left: 39px; top: 40px; width: 320px; height: 320px; }
.eb-deco--bottom .eb-illu { position: absolute; left: 44px; top: 0; width: 154px; height: 320px; }

/* typografia */
.eb-h1 { font: 300 8em/1 var(--serif); letter-spacing: -.01em; }
.eb-page--opener .eb-h1 { margin-top: 62px; }
.eb-h2 { font: 500 4.19em/1.05 var(--serif); letter-spacing: -.005em; margin-bottom: .5em; text-wrap: balance; }
.eb-body > * + .eb-h2 { margin-top: .6em; }
.eb-p p + p, .eb-p + .eb-p { margin-top: .75em; }
.eb-p + .eb-list, .eb-list + .eb-p, .eb-p + .eb-q, .eb-list + .eb-q { margin-top: .85em; }
.eb-labelrow { margin: 30px 0 16px; }
.eb-chip { display: inline-block; background: var(--brzoskwinia); color: var(--atrament); font: 500 .9em/1.3 var(--sans); padding: .35em 1em; border-radius: 2px; }
.eb-labelrow .eb-chip { font-size: 1.24em; padding: .3em .92em; }

.eb-list li { position: relative; padding-left: 1.33em; }
.eb-list li + li { margin-top: .45em; }
.eb-list li::before { content: ''; position: absolute; left: 0; top: .28em; width: .95em; height: .95em; background: var(--dzial-tekst);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1 9C1 4 4 1 9 1C9 6 6 9 1 9ZM1 9L6 4' fill='none' stroke='%23000' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1 9C1 4 4 1 9 1C9 6 6 9 1 9ZM1 9L6 4' fill='none' stroke='%23000' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.eb-list--cols { columns: 2; column-gap: 2.1em; }
.eb-list--cols li { break-inside: avoid; }

/* pytanie kontrolne */
.eb-q { border: 1px solid var(--dzial-akcent); border-radius: 8px; padding: 2em; margin-top: 2.6em; }
.eb-q h3 { font: 500 2.29em/1.17 var(--serif); margin-bottom: .5em; }
.eb-q ul { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1em 2.1em; }
.eb-q label { display: flex; gap: .95em; align-items: flex-start; cursor: pointer; }
.eb-q input { appearance: none; -webkit-appearance: none; width: 1.05em; height: 1.05em; margin: .3em 0 0; border: 1px solid var(--atrament); border-radius: 1px; background: #fff; flex: none; cursor: pointer; }
.eb-q input:checked { background: var(--dzial-tekst); border-color: var(--dzial-tekst); box-shadow: inset 0 0 0 2px #fff; }
.eb-q input:focus-visible { outline: 2px solid var(--atrament) !important; outline-offset: 2px; }

/* uwaga */
.eb-warn { background: #fff6f1; border-radius: 8px; padding: 1.35em 1.5em 1.5em; margin-bottom: 2.2em; }
.eb-warn h3 { font: 500 2.29em/1.17 var(--serif); display: flex; align-items: center; gap: .35em; margin-bottom: .45em; }
.eb-warn h3 .ms { color: var(--terakota) !important; font-size: 1em; }
.eb-warn .eb-list li::before { background: var(--terakota); }

/* ciekawostka */
.eb-fact { display: grid; grid-template-columns: 6.1em 1fr; gap: 1.5em; margin-top: 2.4em; }
.eb-fact__pic { position: relative; width: 6.1em; height: 6.9em; }
.eb-fact__pic .eb-plama { position: absolute; inset: 0; width: 100%; height: 100%; }
.eb-fact__pic .eb-illu { position: absolute; left: 28%; top: 8%; width: 44%; height: 84%; }
.eb-fact h3 { font: 500 2.29em/1.17 var(--serif); color: var(--dzial-tekst) !important; margin-bottom: .25em; }

/* receptura */
.eb-rec { border-bottom: 1px solid var(--dzial-akcent); }
.eb-body > * + .eb-rec, .eb-body > * + .eb-pair { margin-top: 2.2em; }
.eb-rec + .eb-h2, .eb-pair + .eb-h2 { margin-top: .75em; }
.eb-rec__head { position: relative; display: flex; align-items: center; gap: 1em; padding: 1.4em 1em; min-height: 7.2em; }
.eb-rec__head .eb-plama { position: absolute; left: -3%; top: -8%; width: 100%; height: 116%; z-index: 0; }
.eb-rec__head > :not(.eb-plama) { position: relative; z-index: 1; }
.eb-rec__icon { font-size: 2.1em !important; }
.eb-rec__head h3 { font: 500 2.29em/1.17 var(--serif); flex: 1; text-wrap: balance; }
.eb-rec__note { font: italic 500 1.33em/1.3 var(--serif); color: var(--szary); margin: .2em 0 .9em; }
.eb-rec__cols { display: grid; grid-template-columns: 16.2em 1fr; border-top: 1px solid var(--dzial-akcent); padding: 1.2em 0 1.3em; margin-top: 1.1em; }
.eb-rec__steps { border-left: 1px solid var(--linia); padding-left: 2.3em; margin-left: 2.3em; }
.eb-rec h4 { font: 500 1.71em/1.22 var(--serif); margin-bottom: .45em; display: flex; align-items: center; gap: .35em; }
.eb-rec h4 .ms { font-size: 1em; color: var(--atrament) !important; }
.eb-rec__ings li { display: flex; justify-content: space-between; gap: 1em; font-size: .9em; line-height: 1.45; padding: .28em 0; border-bottom: 1px dotted var(--linia); }
.eb-rec__ings li:last-child { border-bottom: 0; }
.eb-rec__ings em { font-style: normal; color: var(--dzial-tekst); font-weight: 500; text-align: right; flex: none; max-width: 55%; }
.eb-rec__steps ol { counter-reset: krok; }
.eb-rec__steps li { counter-increment: krok; position: relative; padding-left: 3.6em; min-height: 2.5em; display: flex; align-items: center; }
.eb-rec__steps li + li { margin-top: .85em; }
.eb-rec__steps li::before { content: counter(krok); position: absolute; left: 0; top: 0; width: 1.45em; height: 1.45em; border-radius: 50%; background: var(--dzial-tlo);
  font: 500 1.71em/1.45 var(--serif); text-align: center; }
.eb-rec__sec { display: grid; grid-template-columns: 16.2em 1fr; border-top: 1px solid var(--dzial-akcent); padding: 1.15em 0; }
.eb-rec__sec h4 { margin: 0; align-self: start; }
.eb-rec__sec > div { padding-left: 2.3em; margin-left: 2.3em; }
.eb-rec--narrow .eb-rec__cols, .eb-rec--narrow .eb-rec__sec { display: block; }
.eb-rec--narrow .eb-rec__steps { border-left: 0; padding-left: 0; margin-left: 0; border-top: 1px solid var(--linia); margin-top: 1.1em; padding-top: 1.1em; }
.eb-rec--narrow .eb-rec__sec > div { padding-left: 0; margin-left: 0; margin-top: .35em; }
.eb-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4em; align-items: start; }

/* karta zioła */
.eb-herb + .eb-herb { margin-top: 1.4em; }
.eb-herb__head { display: grid; grid-template-columns: 11.4em 1fr; gap: 2.1em; margin-bottom: .8em; }
.eb-herb__pic { position: relative; width: 11.4em; height: 11em; }
.eb-herb__pic .eb-plama { position: absolute; left: 0; top: 14%; width: 100%; height: 86%; }
.eb-herb__pic .eb-illu { position: absolute; left: 24%; top: 4%; width: 52%; height: 92%; }
.eb-herb__head h3 { font: 500 2.29em/1.17 var(--serif); padding-top: .2em; text-wrap: balance; }
.eb-herb dl > div { display: grid; grid-template-columns: 11.6em 1fr; gap: 1.5em; border-top: 1px solid var(--dzial-akcent); padding: .8em 0; }
.eb-herb dt { font: 500 1.71em/1.22 var(--serif); color: var(--dzial-tekst); }

/* okładka, dział, spis, legenda */
.eb-cover::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 22px; background: var(--dzial-akcent); }
.eb-cover__plama { left: 150px; top: -40px; } .eb-cover__plama .eb-plama { width: 520px; height: 500px; }
.eb-cover__illu { position: absolute; left: 330px; top: 96px; width: 190px; height: 396px; }
.eb-cover__illu .eb-illu { width: 100%; height: 100%; }
.eb-cover__by { position: absolute; left: 78px; top: 60px; font: 500 9px/12px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--szary); }
.eb-cover h1 { position: absolute; left: 74px; top: 498px; font: 300 96px/.92 var(--serif); letter-spacing: -.015em; }
.eb-cover__sub { position: absolute; left: 78px; top: 692px; font: italic 500 26px/1.1 var(--serif); color: var(--dzial-tekst); }
.eb-cover__foot { position: absolute; left: 78px; top: 772px; font: 500 9px/12px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--szary); }
.eb-part__plama { left: -120px; top: 330px; } .eb-part__plama .eb-plama { width: 560px; height: 540px; }
.eb-part__illu { position: absolute; left: 330px; top: 380px; width: 190px; height: 396px; } .eb-part__illu .eb-illu { width: 100%; height: 100%; }
.eb-part .eb-h1 { font-size: 64px; line-height: 1.03; margin-top: 60px; }
.eb-part__list { margin-top: 34px; width: 300px; }
.eb-part__list li { display: flex; justify-content: space-between; align-items: baseline; font: 500 24px/1.2 var(--serif); padding: 10px 0; border-bottom: 1px solid var(--dzial-akcent); }
.eb-part__list b { font: 500 9px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--szary); }
.eb-part__list .is-soon { color: var(--szary); }
.eb-toc__part { font: 500 7.5px/10px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--szary); margin: 0 0 14px; }
.eb-toc li a { display: flex; align-items: baseline; gap: 8px; font: 500 18px/1.25 var(--serif); padding: 9px 0; border-bottom: 1px solid var(--dzial-tlo); color: inherit; text-decoration: none; cursor: pointer; }
.eb-toc li a i { flex: 1; } .eb-toc li a b { font: 500 13px/1 var(--sans); color: var(--dzial-tekst); }
.eb-toc li a:hover span { text-decoration: underline; text-decoration-color: var(--brzoskwinia); text-underline-offset: 4px; }
.eb-legend { margin: 26px 0 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.eb-legend li { display: flex; align-items: center; gap: 10px; }

/* ---------- apteczka online: ta sama treść, większa skala ---------- */
.eb--web { font-size: 16.5px; line-height: 1.6; }
.eb--web .eb-h2 { font-size: 2.6em; }
.eb--web .eb-p, .eb--web .eb-list:not(.eb-list--cols) { max-width: 68ch; }
.eb--web .eb-q h3, .eb--web .eb-warn h3, .eb--web .eb-fact h3, .eb--web .eb-rec__head h3, .eb--web .eb-herb__head h3 { font-size: 1.75em; }
.eb--web .eb-rec h4, .eb--web .eb-herb dt { font-size: 1.3em; }
.eb--web .eb-rec__steps li::before { font-size: 1.3em; }
.eb--web .eb-rec__steps li { padding-left: 2.9em; min-height: 1.9em; }
.eb--web .eb-rec__head { min-height: 6em; padding: 1.2em 1em; }
.eb--web .eb-rec__icon { font-size: 1.7em !important; }
.eb--web .eb-rec__cols, .eb--web .eb-rec__sec { grid-template-columns: 15em 1fr; }
.eb--web .eb-herb__head { grid-template-columns: 8em 1fr; }
.eb--web .eb-herb__pic { width: 8em; height: 9.4em; }
.eb--web .eb-herb dl > div { grid-template-columns: 9em 1fr; }
.eb--web .eb-fact { grid-template-columns: 4.6em 1fr; }
.eb--web .eb-fact__pic { width: 4.6em; height: 5.2em; }
.eb--web .eb-chip { font-size: .78em; }
.eb--web mark { background: var(--dzial-tlo); color: inherit; box-shadow: 0 0 0 2px var(--dzial-tlo); border-radius: 1px; }
@media (max-width: 720px) {
  .eb--web { font-size: 16px; }
  .eb--web .eb-rec__cols, .eb--web .eb-rec__sec, .eb--web .eb-herb dl > div { display: block; }
  .eb--web .eb-rec__steps { border-left: 0; padding-left: 0; margin-left: 0; border-top: 1px solid var(--linia); margin-top: 1em; padding-top: 1em; }
  .eb--web .eb-rec__sec > div { padding-left: 0; margin-left: 0; margin-top: .3em; }
  .eb--web .eb-q ul, .eb--web .eb-list--cols { grid-template-columns: 1fr; columns: 1; }
  .eb--web .eb-herb dd { margin-top: .2em; }
}

.eb-deco--bottom.is-small { left: 440px; top: 640px; }
.eb-deco--bottom.is-small .eb-plama { left: 10px; top: 60px; width: 190px; height: 190px; }
.eb-deco--bottom.is-small .eb-illu { left: 40px; top: 20px; width: 84px; height: 175px; }
.eb-deco--bottom.is-hidden { display: none; }
