/* ==========================================================================
   ebook-store — wspólny arkusz stylów
   Kierunek: spokojny podręcznik. Nagłówki sekcji na marginesie, okładka
   tomu jako element serii (kolor serii w --series), zakreślenia we fragmencie.
   ========================================================================== */

:root {
  color-scheme: light;
  --paper: #f3f5f2;
  --surface: #ffffff;
  --ink: #172a2c;
  --muted: #56676a;
  --line: #d3dbd7;
  --series: #1e5b4b;        /* kolor tomu 1; kolejne tomy nadpisują tę zmienną */
  --series-ink: #f3f5f2;
  --series-soft: #e3ece8;
  --highlight: #e6ee73;
  --focus: #1f4fd1;
  --danger: #a3261b;

  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, "Iowan Old Style", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.75rem, 1.3rem + 1.6vw, 2.2rem);
  --step-4: clamp(2.2rem, 1.4rem + 3.4vw, 3.6rem);

  --gutter: 16px;
  --wrap: 1120px;
  --section-pad: clamp(56px, 8vw, 96px);
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0f1a1b;
    --surface: #152325;
    --ink: #e4ebe8;
    --muted: #98a9a6;
    --line: #2a3a3b;
    --series: #2f7a65;
    --series-ink: #eef4f1;
    --series-soft: #18302b;
    --highlight: rgba(230, 238, 115, 0.3);
    --focus: #8fb0ff;
    --danger: #ff8a7a;
  }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --paper: #0f1a1b;
    --surface: #152325;
    --ink: #e4ebe8;
    --muted: #98a9a6;
    --line: #2a3a3b;
    --series: #2f7a65;
    --series-ink: #eef4f1;
    --series-soft: #18302b;
    --highlight: rgba(230, 238, 115, 0.3);
    --focus: #8fb0ff;
    --danger: #ff8a7a;
  }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--sans);
  overflow-x: clip; /* clip, nie hidden: hidden psuje position: sticky nagłówka w części przeglądarek mobilnych */
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.3; }

p { margin: 0 0 1em; max-width: 66ch; }
p:last-child { margin-bottom: 0; }

.skip-link {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 10;
}
.skip-link:focus { top: 8px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

/* --- Nagłówek strony ---------------------------------------------------- */

.site-header {
  position: -webkit-sticky; position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; column-gap: 24px; min-height: 64px; }
html { scroll-padding-top: 88px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 700; font-size: 1.15rem; line-height: 1; text-decoration: none; color: var(--ink); white-space: nowrap; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-mark .bm-book { fill: var(--series); }
.brand-mark .bm-ribbon { fill: var(--highlight); }
.brand-mark .bm-arrow { fill: none; stroke: var(--series-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.brand-name span { font-weight: 400; font-style: italic; color: var(--series); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-name span { color: #8fd0bb; } }
:root[data-theme="dark"] .brand-name span { color: #8fd0bb; }
.brand:hover .brand-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
/* Menu: na telefonie rozwijane przyciskiem (hamburger), od 860 px zawsze widoczne w jednym rzędzie. */
.nav-toggle {
  margin-left: auto; width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); cursor: pointer;
}
.nav-toggle:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }
@media (prefers-reduced-motion: reduce) { .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { transition: none; } }

.site-menu { display: none; flex-basis: 100%; flex-direction: column; gap: 4px; padding: 8px 0 16px; }
.site-menu.is-open { display: flex; }
.site-nav { display: flex; flex-direction: column; }
.site-nav a { text-decoration: none; color: var(--ink); padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: var(--step-0); }
.site-nav a:hover { color: var(--series); }
.site-nav a[aria-current="page"] { font-weight: 600; color: var(--series); }
.site-menu .btn { margin-top: 12px; align-self: stretch; }

@media (min-width: 860px) {
  html { scroll-padding-top: 88px; }
  .nav-toggle { display: none; }
  .site-menu, .site-menu.is-open { display: flex; flex-basis: auto; flex-direction: row; align-items: center; gap: 24px; margin-left: auto; padding: 0; }
  .site-nav { flex-direction: row; gap: 28px; }
  .site-nav a { color: var(--muted); padding: 4px 0; border-bottom: 2px solid transparent; font-size: var(--step--1); }
  .site-nav a:hover { color: var(--ink); }
  .site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--series); }
  .site-menu .btn { margin-top: 0; align-self: auto; }
}

/* --- Przyciski ------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  border: 2px solid var(--series); border-radius: var(--radius);
  background: var(--series); color: var(--series-ink);
  font: 600 var(--step-0)/1 var(--sans);
  text-decoration: none; cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}
.btn:hover { background: transparent; color: var(--ink); text-decoration: none; }
.btn--small { min-height: 40px; padding: 0 14px; font-size: var(--step--1); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--soon { background: var(--series-soft); color: var(--muted); border-color: var(--line); cursor: default; }
.btn--soon:hover { background: var(--series-soft); color: var(--muted); }
.btn[aria-disabled="true"], .btn:disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* --- Hero ----------------------------------------------------------------- */

.hero { padding: clamp(40px, 7vw, 88px) 0 var(--section-pad); }
.hero .wrap { display: grid; gap: 48px; align-items: center; }
.hero-lede { font-size: var(--step-1); color: var(--muted); margin-top: 20px; max-width: 34em; }
.hero-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 32px; }
.price { font-family: var(--serif); font-size: var(--step-2); font-weight: 700; min-width: 5.5ch; }
.price-note { flex-basis: 100%; margin: 0; font-size: var(--step--1); color: var(--muted); }
.hero-buy .sale-closed { flex-basis: 100%; margin-top: 0; }
@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; }
}

/* Okładka tomu — wspólny wzór dla całej serii */
.cover {
  --w: min(100%, 340px);
  width: var(--w); aspect-ratio: 3 / 4; margin: 0 auto;
  position: relative; display: flex; flex-direction: column;
  padding: 28px 26px 24px 40px;
  background: var(--series); color: var(--series-ink);
  border-radius: 3px 8px 8px 3px;
  container-type: inline-size;
  box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 24px 48px -24px rgba(10, 30, 28, .45);
}
.cover::before { /* grzbiet */
  content: ""; position: absolute; inset: 0 auto 0 0; width: 14px;
  background: rgba(0, 0, 0, .18); border-right: 1px solid rgba(255,255,255,.12);
  border-radius: 3px 0 0 3px;
}
.cover-volume { font-size: var(--step--1); opacity: .85; }
.cover-motif { width: 46%; margin: 12% 0 10%; }
@media (max-width: 899px) { .cover-motif { display: none; } }
.cover-title { font-family: var(--serif); font-weight: 700; font-size: calc(100cqi / 7.2); line-height: 1.05; margin-top: auto; }
.cover-subtitle { font-size: .95rem; line-height: 1.4; margin-top: 14px; opacity: .9; max-width: 22ch; }
.cover-rule { height: 1px; background: currentColor; opacity: .35; margin: 22px 0 12px; }
.cover-brand { font-size: var(--step--1); opacity: .85; }
@media (max-width: 899px) {
  /* Na telefonie okładka jest dodatkiem pod przyciskiem zakupu, nie zajmuje ekranu */
  .cover { --w: 220px; margin: 0; padding: 18px 16px 16px 28px; }
  .cover::before { width: 10px; }
  .cover-subtitle { font-size: .8rem; margin-top: 8px; }
  .cover-rule { margin: 14px 0 8px; }
  .cover-volume, .cover-brand { font-size: .75rem; }
}

/* --- Sekcje: nagłówek na marginesie --------------------------------------- */

.section { padding: var(--section-pad) 0; border-top: 1px solid var(--line); }
.section .wrap { display: grid; gap: 20px 48px; }
.section-head h2 { max-width: 14em; }
.section-head p { color: var(--muted); margin-top: 12px; }
@media (min-width: 900px) {
  .section .wrap { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
  .section-head { position: sticky; top: 96px; align-self: start; }
}

/* Dla kogo */
.fit { display: grid; gap: 32px; }
.fit h3 { margin-bottom: 12px; }
.fit ul { margin: 0; padding-left: 1.1em; }
.fit li { margin-bottom: .5em; }
.fit li::marker { color: var(--series); }
.fit-not li::marker { color: var(--muted); }
@media (min-width: 640px) { .fit { grid-template-columns: 1fr 1fr; } }

/* Problemy → zmiana */
.shift { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.shift li { display: grid; gap: 4px 32px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.shift .before { color: var(--muted); }
.shift .after { font-weight: 600; }
@media (min-width: 640px) { .shift li { grid-template-columns: 1fr 1fr; } }

/* Zastosowania */
.uses { display: grid; gap: 28px 40px; }
.uses h3 { margin-bottom: 6px; }
.uses p { color: var(--muted); }
@media (min-width: 640px) { .uses { grid-template-columns: 1fr 1fr; } }

/* Fragment — strona poradnika */
.page {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(24px, 5vw, 48px);
  font-family: var(--serif); font-size: 1.125rem; line-height: 1.7;
}
.page-meta { font-family: var(--sans); font-size: var(--step--1); color: var(--muted); margin-bottom: 20px; }
.page h3 { font-size: var(--step-2); margin-bottom: 16px; }
.page mark { background: linear-gradient(transparent 12%, var(--highlight) 12%, var(--highlight) 88%, transparent 88%); color: inherit; padding: 0 .1em; }
.page-note {
  font-family: var(--sans); font-size: var(--step--1); color: var(--muted);
  border-left: 3px solid var(--series); padding-left: 14px; margin-top: 24px;
}

/* Spis rozdziałów — prawdziwa kolejność, więc numeracja */
.toc { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.toc li {
  display: grid; grid-template-columns: 4.5em 1fr; gap: 0 12px; align-items: baseline;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.toc-n { font-family: var(--serif); font-weight: 700; color: var(--series); }
.toc strong { font-weight: 600; }

/* Zakup */
.offer { display: grid; gap: 32px; }
.offer ul { margin: 0; padding-left: 1.1em; }
.offer li { margin-bottom: .55em; }
.offer li::marker { color: var(--series); }
.buy-panel {
  background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--series);
  border-radius: var(--radius); padding: 28px;
}
.buy-panel .price { font-size: var(--step-3); display: block; margin-bottom: 4px; }
.buy-where { display: block; font-family: var(--serif); font-size: var(--step-2); font-weight: 700; }
.buy-panel .btn { width: 100%; margin-top: 20px; }
.buy-panel .small { font-size: var(--step--1); color: var(--muted); margin-top: 14px; }
.sale-closed {
  margin-top: 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--series-soft);
}
@media (min-width: 640px) { .offer { grid-template-columns: 1fr minmax(260px, 320px); align-items: start; } }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative;
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-family: var(--serif); font-size: 1.5rem; color: var(--series);
}
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 20px; color: var(--muted); }

/* Autor */
.author { display: grid; gap: 20px; }
.author-photo {
  width: 96px; height: 96px; border-radius: 50%; background: var(--series-soft);
  display: grid; place-items: center; font-family: var(--serif); font-size: 1.6rem; color: var(--series);
  border: 1px solid var(--line);
  overflow: hidden; flex: none;
}
.author-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 640px) { .author { grid-template-columns: 96px 1fr; } }

/* Placeholdery do uzupełnienia — widoczne, żeby nie trafiły na produkcję */
.todo { background: var(--highlight); padding: 0 .2em; border-radius: 2px; }
.legal-note {
  border: 1px dashed var(--danger); border-radius: var(--radius); padding: 14px 16px;
  color: var(--ink); background: var(--surface); margin: 0 0 32px;
}

/* --- Stopka --------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: var(--step--1); color: var(--muted); }
.site-footer .wrap { display: grid; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { color: var(--ink); }
@media (min-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: center; } }

/* --- Strony proste (prawne, techniczne, checkout) ------------------------- */

.simple { padding: clamp(40px, 7vw, 80px) 0 var(--section-pad); }
.simple .wrap { max-width: calc(760px + 2 * var(--gutter)); }
.simple h1 { font-size: var(--step-3); margin-bottom: 24px; }
.simple h2 { font-size: var(--step-1); margin: 36px 0 12px; font-family: var(--serif); }
.simple ol, .simple ul { padding-left: 1.2em; }
.simple li { margin-bottom: .5em; max-width: 66ch; }

/* Formularz */
.form { display: grid; gap: 20px; margin-top: 24px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input[type="email"], .field input[type="text"] {
  width: 100%; min-height: 48px; padding: 10px 14px;
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--muted); border-radius: var(--radius);
}
.field input:focus-visible { outline-offset: 1px; }
.field .hint { font-size: var(--step--1); color: var(--muted); margin-top: 6px; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; font-size: var(--step--1); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--series); }
.form-error { color: var(--danger); font-size: var(--step--1); min-height: 1.2em; }
.summary-box {
  display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
  padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.summary-box .price { font-size: var(--step-1); }
.status-box { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--series); border-radius: var(--radius); margin-top: 24px; }

.mt { margin-top: 24px; }

/* Informacje przed zakupem */
.precontract { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 20px; }
.precontract h2 { font-size: var(--step-1); margin: 0 0 12px; }
.precontract ul { margin: 0 0 12px; padding-left: 1.1em; font-size: var(--step--1); }
.precontract li { margin-bottom: .45em; }
.req { color: var(--muted); }
.turnstile-slot:empty { display: none; }

/* Baner zgody na cookies */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 560px; margin: 0 auto;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-top: 4px solid var(--series);
  border-radius: var(--radius); padding: 18px; box-shadow: 0 12px 32px -12px rgba(10, 30, 28, .35);
}
.consent p { font-size: var(--step--1); margin: 0 0 14px; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.consent-actions .btn { flex: 1 1 150px; min-height: 44px; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }

/* Strona po zakupie */
.status-box .btn { margin-top: 16px; }
.spinner-note { color: var(--muted); }

/* Panel admina */
.admin { padding: 32px 0 64px; }
.admin .wrap { max-width: calc(1200px + 2 * var(--gutter)); }
.admin h1 { font-size: var(--step-2); margin-bottom: 8px; }
.admin h2 { font-size: var(--step-1); margin: 32px 0 12px; }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi span { display: block; font-size: var(--step--1); color: var(--muted); }
.kpi strong { font-family: var(--serif); font-size: var(--step-1); }
.meter { height: 10px; background: var(--series-soft); border-radius: 5px; overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--series); }
.meter.warn i { background: var(--danger); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.admin table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.admin th, .admin td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin th { color: var(--muted); font-weight: 600; }
.admin form.inline { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; }
.admin label { font-size: var(--step--1); font-weight: 600; display: block; }
.admin input[type="number"], .admin input[type="text"], .admin input[type="date"], .admin select {
  width: 100%; min-height: 40px; padding: 6px 10px; font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--muted); border-radius: var(--radius); margin-top: 4px;
}
.admin .row-actions { display: flex; gap: 6px; }
.admin .btn--small { min-height: 32px; padding: 0 10px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: .75rem; font-weight: 600; background: var(--series-soft); }
.badge.PAID { background: #d5eadf; color: #124232; }
.badge.FAILED, .badge.REFUNDED { background: #f6d9d5; color: #6d1a12; }
.badge.PENDING, .badge.EXPIRED { background: #ebeee9; color: #3d4b4d; }
.toast { position: fixed; right: 16px; bottom: 16px; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: var(--radius); font-size: var(--step--1); max-width: 90vw; word-break: break-all; }

/* Podpowiedzi poza polami formularza */
.hint { font-size: var(--step--1); color: var(--muted); }
.form > .hint, .precontract > .hint { margin: 0; }
.admin #ledger { white-space: nowrap; }
.admin form.inline > div:last-child { justify-self: start; }

/* Baza wiedzy */
.breadcrumbs { font-size: var(--step--1); color: var(--muted); margin-bottom: 20px; }
.breadcrumbs a { color: var(--muted); }
.article h1 { font-size: var(--step-3); margin-bottom: 12px; }
.article-meta { font-size: var(--step--1); color: var(--muted); }
.lead { font-size: var(--step-1); color: var(--muted); margin: 20px 0 8px; max-width: 40em; }
.prose { max-width: 68ch; }
.prose h2 { font-size: var(--step-2); margin: 40px 0 12px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--series); }
.prompt {
  white-space: pre-wrap; font: 0.95rem/1.6 var(--sans); background: var(--surface);
  border: 1px solid var(--line); border-left: 4px solid var(--series); border-radius: var(--radius);
  padding: 16px 18px; margin: 16px 0 20px; overflow-x: auto;
}
.callout { background: var(--series-soft); border-radius: var(--radius); padding: 14px 16px; }
.cta-box {
  display: grid; gap: 16px 32px; align-items: center; margin: 48px 0 8px; padding: 24px;
  background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--series); border-radius: var(--radius);
}
.cta-box h2 { font-size: var(--step-2); margin: 4px 0 8px; }
.cta-kicker { font-size: var(--step--1); color: var(--muted); margin: 0; }
.cta-buy { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
@media (min-width: 720px) { .cta-box { grid-template-columns: 1fr auto; } }
.related { margin-top: 40px; }
.related h2 { font-size: var(--step-1); margin-bottom: 12px; }
.related ul { padding-left: 1.2em; }
.article-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }
.card-article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.card-article h2, .card-article h3 { font-size: var(--step-1); margin: 0 0 6px; }
.card-article h2 a, .card-article h3 a { text-decoration: none; }
.card-article h2 a:hover, .card-article h3 a:hover { text-decoration: underline; }
.card-article p { color: var(--muted); font-size: var(--step--1); margin: 0; }
.simple.article .wrap { max-width: calc(820px + 2 * var(--gutter)); }

/* --- Okładki (zdjęcie) ----------------------------------------------------- */
.cover-img { display: block; width: 100%; aspect-ratio: 2479 / 3508; border-radius: 3px 8px 8px 3px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(23, 42, 44, .12), 0 24px 48px -24px rgba(23, 42, 44, .45); background: var(--series); }
.cover-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover-img--hero { max-width: 340px; margin: 0 auto; }
.hero-cover { display: block; text-decoration: none; transition: transform .2s ease; }
.hero-cover:hover { transform: translateY(-4px); }
@media (prefers-reduced-motion: reduce) { .hero-cover { transition: none; } .hero-cover:hover { transform: none; } }

.kicker { font-size: var(--step--1); color: var(--muted); letter-spacing: .02em; margin: 0 0 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 20px 0 0; }
.tags li { font-size: .8125rem; padding: 4px 10px; border-radius: 999px; background: var(--series-soft); color: var(--ink); margin: 0; }
.product-buy { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.product-subtitle { font-size: var(--step-1); color: var(--muted); margin: 8px 0 0; max-width: 34em; }

/* --- Katalog poradników ---------------------------------------------------- */
.catalog-page .wrap { max-width: calc(980px + 2 * var(--gutter)); }
.catalog { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 28px; }
.catalog > li { margin: 0; max-width: none; }
.product-card { display: grid; gap: 24px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.product-card-cover { display: block; width: min(220px, 60%); }
.product-card h2 { font-size: var(--step-2); margin: 0; font-family: var(--serif); line-height: 1.15; }
.product-card h2 a { text-decoration: none; color: inherit; }
.product-card h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.product-card-body > p:not(.kicker):not(.product-subtitle) { margin-top: 14px; max-width: 60ch; }
.soon-card { padding: 24px; border: 1px dashed var(--line); border-radius: var(--radius); }
.soon-card h2 { margin: 0 0 8px; font-size: var(--step-1); }
.soon-card p:not(.kicker) { color: var(--muted); margin: 0 0 16px; max-width: 60ch; }
@media (min-width: 720px) {
  .product-card { grid-template-columns: 220px 1fr; gap: 36px; padding: 32px; align-items: start; }
  .product-card-cover { width: 100%; }
}

/* --- Strona poradnika ------------------------------------------------------ */
.product-hero { padding: clamp(28px, 5vw, 56px) 0 var(--section-pad); }
.product-hero-grid { display: grid; gap: 40px; align-items: center; }
.product-hero h1 { font-size: var(--step-4); line-height: 1.05; margin: 0; }
.product-author { margin: 14px 0 0; font-weight: 600; }
.product-short { margin: 20px 0 0; max-width: 40em; }
.product-hero .sale-closed { max-width: 40em; }
@media (min-width: 900px) {
  .product-hero-grid { grid-template-columns: 360px minmax(0, 1fr); gap: 64px; }
  .product-hero .cover-img--hero { max-width: none; }
}
.product-prose h3 { font-family: var(--serif); font-size: var(--step-1); margin: 28px 0 12px; }
.check-list { list-style: none; padding: 0 !important; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: .7em; }
.check-list li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 14px; height: 8px;
  border-left: 2.5px solid var(--series); border-bottom: 2.5px solid var(--series); transform: rotate(-45deg); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: none; }
.steps li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 0; }
.steps span { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--series); color: var(--series-ink); font-weight: 700; font-size: .875rem; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.facts { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.simple .tags, .simple .catalog { padding-left: 0; }
.simple .tags li { margin: 0; max-width: none; }
.author--page { margin: 8px 0 8px; }
.author--page h2 { margin-top: 0; }
.product-buy .btn + .btn { margin-left: 0; }
.author--text { grid-template-columns: 1fr !important; }
.author--text h3 { margin-top: 0; }

/* --- Strona główna: hero z hasłem i kafelkami tematów --------------------- */
.home-hero { padding: clamp(40px, 7vw, 96px) 0 var(--section-pad); }
.home-hero h1 { font-size: var(--step-4); line-height: 1.05; margin: 0; max-width: 14em; }
.home-hero h1 span { display: block; color: var(--series); font-style: italic; font-weight: 400; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .home-hero h1 span { color: #8fd0bb; } }
:root[data-theme="dark"] .home-hero h1 span { color: #8fd0bb; }
.home-hero .hero-lede { margin-top: 20px; max-width: 36em; }
.home-hero .product-buy { margin-top: 28px; }

.topics { list-style: none; padding: 0; margin: clamp(36px, 6vw, 64px) 0 0; display: grid; gap: 12px; }
.topics li { margin: 0; }
.topic {
  display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; row-gap: 2px; align-items: start; height: 100%;
  padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); transition: border-color .15s ease, transform .15s ease;
}
.topic:hover { border-color: var(--series); transform: translateY(-2px); }
.topic:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.topic-icon { grid-row: span 3; width: 40px; height: 40px; padding: 8px; border-radius: 10px; background: var(--series-soft);
  fill: none; stroke: var(--series); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.topic-title { font-family: var(--serif); font-weight: 700; font-size: var(--step-1); line-height: 1.2; }
.topic-text { color: var(--muted); font-size: var(--step--1); line-height: 1.5; }
.topic-more { color: var(--series); font-size: var(--step--1); font-weight: 600; margin-top: 6px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .topic-icon, :root:not([data-theme="light"]) .topic-more { stroke: #8fd0bb; color: #8fd0bb; } }
:root[data-theme="dark"] .topic-icon, :root[data-theme="dark"] .topic-more { stroke: #8fd0bb; color: #8fd0bb; }
@media (prefers-reduced-motion: reduce) { .topic { transition: none; } .topic:hover { transform: none; } }
@media (min-width: 820px) {
  .topics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .topic { grid-template-columns: 1fr; padding: 22px; }
  .topic-icon { grid-row: auto; margin-bottom: 10px; }
}

.catalog--home { margin-top: 0; }
.why { grid-template-columns: 1fr; }
@media (min-width: 640px) { .why { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.product-card h3 { font-size: var(--step-2); margin: 0; font-family: var(--serif); line-height: 1.15; }
.product-card h3 a { text-decoration: none; color: inherit; }
.product-card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 819px) {
  .topic { padding: 12px 14px; align-items: center; }
  .topic-icon { grid-row: span 2; }
  .topic-more { display: none; }
  .product-card-cover { width: min(150px, 42%); }
}

/* --- Baza wiedzy: tematy -------------------------------------------------- */
.simple .article-list { padding-left: 0; }
.simple .article-list li { max-width: none; }
.topic-nav { font-size: var(--step--1); color: var(--muted); margin: 8px 0 0; }
.topic-section { margin-top: 48px; scroll-margin-top: 96px; }
.topic-section h2 { font-size: var(--step-2); margin: 0 0 6px; }
.topic-intro { color: var(--muted); margin: 0 0 16px; }
.card-article h3 { font-family: var(--serif); font-size: var(--step-1); line-height: 1.25; margin: 0 0 6px; }
.card-article h3 a { text-decoration: none; color: inherit; }
.card-article h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* „Pokaż adres e-mail” (Cloudflare Turnstile) – adres nie występuje w kodzie strony */
.email-reveal { margin: .75rem 0 1.25rem; }
.email-reveal-widget { margin-top: .75rem; min-height: 65px; }
.email-reveal-widget[hidden] { display: none; }
.email-reveal-status { margin: .5rem 0 0; min-height: 1.4em; font-size: .9rem; color: var(--muted, #5b6b66); }
.email-reveal-link { display: inline-block; font-weight: 600; font-size: 1.05rem; word-break: break-all; }
.email-reveal-btn[disabled] { opacity: .6; cursor: default; }
