/* ==========================================================================
   StatPomoc — statyczna wersja serwisu
   System projektowy v2 — kierunek „ekspercki / naukowy”

   Zasady:
   · nagłówki szeryfowe (jak w czasopismach naukowych), interfejs bezszeryfowy
   · włos zamiast cienia — struktura z linii, nie z pływających kart
   · grafiką są dane (figury SVG), nie zdjęcia stockowe
   · zero zasobów zewnętrznych: brak fontów Google, brak CDN, brak cookies

   Kolory serii wykresów zwalidowane pod kątem daltonizmu i kontrastu:
     jasne tło  #5C9A00 + #2563A8
     ciemne tło #66A80F + #4A8AD4
   ========================================================================== */

/* --------------------------------------------------------------- 1. Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, picture, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
table { border-collapse: collapse; width: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}

/* ----------------------------------------------------------- 2. Zmienne */
:root {
  /* marka — zieleń pochodzi z logo StatPomoc (#8CE902) */
  --brand:        #5C9A00;   /* wypełnienia, serie na jasnym tle */
  --brand-ink:    #3D6800;   /* tekst i linki na białym — kontrast 6,6:1 */
  --brand-bright: #8CE902;   /* akcent na ciemnym tle — kontrast 11,6:1 */
  --brand-wash:   #F1F8E4;
  --series-2:     #2563A8;   /* druga seria danych, jasne tło */

  --ink:      #0E141B;
  --ink-2:    #131922;
  --ink-3:    #1B2430;

  --paper:    #FFFFFF;
  --mist:     #F5F7F9;
  --mist-2:   #EDF1F5;

  --line:        #DFE5EB;
  --line-strong: #C6D0DA;
  --line-dark:   #2A3440;

  --text:       #131922;
  --muted:      #54606E;
  --muted-dark: #A3B0BF;

  --radius:    4px;
  --radius-md: 8px;
  --radius-lg: 10px;

  --container: 1120px;
  --measure:   68ch;
  --gutter:    clamp(1.5rem, 5vw, 2.5rem);
  --section-y: clamp(3.75rem, 8vw, 6.5rem);

  --font-sans:  "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-serif: Georgia, "Iowan Old Style", "Times New Roman", Times, serif;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ------------------------------------------------------------ 3. Typografia */
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1rem, .97rem + .16vw, 1.0625rem);
  line-height: 1.7;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.012em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 1.5rem + 2.7vw, 3.4rem); line-height: 1.1; }
h2 { font-size: clamp(1.65rem, 1.3rem + 1.7vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + .55vw, 1.4rem); }
h4 { font-size: clamp(1.02rem, 1rem + .25vw, 1.13rem); }
p  { text-wrap: pretty; }

.lead {
  font-size: clamp(1.06rem, 1rem + .42vw, 1.24rem);
  line-height: 1.6; color: var(--muted);
}

/* etykieta sekcji — mała, rozstrzelona, bezszeryfowa; z numerem porządkowym */
.eyebrow {
  display: flex; align-items: center; gap: .7rem;
  font-family: var(--font-sans);
  font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--brand-ink); margin-bottom: 1rem;
}
.eyebrow::before {
  content: ""; width: 24px; height: 0; flex: none;
  border-top: 2px solid var(--brand);
}
.eyebrow--light { color: var(--brand-bright); }
.eyebrow--light::before { border-color: var(--brand-bright); }

/* ---------------------------------------------------------- 4. Układ */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 56rem; }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(2.75rem, 5.5vw, 4rem); }
.section--mist { background: var(--mist); }
.section--rule { border-top: 1px solid var(--line); }
.section--dark { background: var(--ink); color: #D7DFE8; }
.section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }
.section--dark .lead { color: var(--muted-dark); }

.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 4.5vw, 3rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head h2 + .lead { margin-top: .9rem; }

.grid { display: grid; gap: clamp(1rem, 2.2vw, 1.6rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 1fr)); }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--ink); color: #fff; padding: .8rem 1.25rem; border-radius: 0 0 6px 6px;
  transition: top .2s var(--ease); text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 0; }

:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 2px solid var(--brand-ink); outline-offset: 3px; border-radius: 3px;
}

/* ------------------------------------------------------------ 5. Przyciski */
.btn {
  --btn-bg: var(--brand); --btn-fg: #0B1400; --btn-bd: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .82rem 1.5rem; border: 1px solid var(--btn-bd); border-radius: var(--radius);
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--font-sans); font-weight: 600; font-size: .95rem;
  text-decoration: none; cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--line-strong); }
.btn--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.btn--onDark { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255,255,255,.32); }
.btn--onDark:hover { background: #fff; color: var(--ink); border-color: #fff; }

.btn--sm { padding: .58rem 1.1rem; font-size: .875rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.9rem; }

.arrow-link {
  display: inline-flex; align-items: center; gap: .45rem;
  font-weight: 600; font-size: .95rem; color: var(--brand-ink);
  text-decoration: none; border-bottom: 1px solid transparent;
}
.arrow-link:hover { border-bottom-color: currentColor; }
.arrow-link svg { transition: transform .2s var(--ease); }
.arrow-link:hover svg { transform: translateX(3px); }

/* ------------------------------------------------------------- 6. Nagłówek */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-bar { display: flex; align-items: center; gap: 1.25rem; min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; flex: none; }
.brand img { height: 34px; width: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-family: var(--font-serif); font-weight: 700; font-size: 1.1rem; letter-spacing: -.01em; color: var(--ink); }
.brand__tag { font-size: .66rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }

.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: .1rem; }
.nav__link {
  position: relative; display: block; padding: .5rem .8rem;
  text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--text);
  transition: color .2s var(--ease);
}
.nav__link:hover { color: var(--brand-ink); }
.nav__link[aria-current="page"] { color: var(--brand-ink); }
.nav__link[aria-current="page"]::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .1rem; height: 2px;
  background: var(--brand);
}
.header-cta { flex: none; margin-left: .6rem; }
/* przycisk CTA w liście nawigacji służy tylko menu mobilnemu */
@media (min-width: 961px) { .nav__list .btn { display: none; } }

.nav-toggle {
  display: none; margin-left: auto; width: 42px; height: 42px; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: #fff; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span { position: relative; display: block; width: 18px; height: 2px; background: var(--ink); transition: background .2s var(--ease); }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink);
  transition: transform .26s var(--ease), top .2s var(--ease);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .nav {
    position: fixed; inset: 68px 0 auto 0; margin: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    max-height: calc(100dvh - 68px); overflow-y: auto;
    clip-path: inset(0 0 100% 0); opacity: 0; pointer-events: none;
    transition: clip-path .32s var(--ease), opacity .22s var(--ease);
  }
  .nav.is-open { clip-path: inset(0 0 0 0); opacity: 1; pointer-events: auto; }
  .nav .nav__list { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1.5rem 1.4rem; }
  .nav__link { padding: .9rem .2rem; font-size: 1.02rem; border-bottom: 1px solid var(--line); }
  .nav__link[aria-current="page"]::after { display: none; }
  .nav__list .btn { margin-top: 1rem; }
}

/* ---------------------------------------------------------------- 7. Hero */
.hero { background: var(--ink); color: #fff; border-bottom: 1px solid var(--line-dark); }
.hero__inner {
  display: grid; gap: clamp(1.75rem, 4vw, 2.75rem); align-items: center;
  padding-block: clamp(3.25rem, 7vw, 5.5rem);
}
@media (min-width: 940px) { .hero__inner { grid-template-columns: 1fr 1.02fr; } }
.hero h1 { color: #fff; }
.hero p.lead { color: #BCC7D3; margin-top: 1.25rem; max-width: 34rem; }

/* pasek parametrów pod hero */
.hero-meta {
  display: grid; gap: 1px; background: var(--line-dark);
  border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}
.hero-meta__item { background: var(--ink); padding: 1.4rem clamp(1rem, 2.5vw, 1.75rem); }
.hero-meta__value {
  font-family: var(--font-sans); font-size: clamp(1.45rem, 1.2rem + 1.1vw, 1.95rem);
  font-weight: 700; color: var(--brand-bright); letter-spacing: -.02em; line-height: 1;
}
.hero-meta__label { margin-top: .55rem; font-size: .85rem; color: var(--muted-dark); line-height: 1.45; }

/* nagłówek strony wewnętrznej */
.page-hero { background: var(--ink); color: #fff; }
.page-hero__inner { padding-block: clamp(2.5rem, 5.5vw, 4.25rem); max-width: 48rem; }
.page-hero h1 { color: #fff; }
.page-hero .lead { color: #BCC7D3; margin-top: 1rem; }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .82rem; color: var(--muted-dark); margin-bottom: 1.2rem; }
.breadcrumbs a { color: var(--muted-dark); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand-bright); }
.breadcrumbs span[aria-current] { color: #fff; }

/* ------------------------------------------------------------- 8. Figury */
.figure { margin: 0; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: #fff; }
.figure img { width: 100%; height: auto; }
.figure figcaption {
  padding: .85rem 1.1rem; border-top: 1px solid var(--line);
  font-size: .82rem; line-height: 1.5; color: var(--muted); background: var(--mist);
}
.figure figcaption b { color: var(--text); font-weight: 700; }
.figure--dark { border-color: var(--line-dark); background: var(--ink-2); }
.figure--dark figcaption { border-top-color: var(--line-dark); background: var(--ink-3); color: var(--muted-dark); }
.figure--dark figcaption b { color: #fff; }
.figure--plain { border: 0; border-radius: 0; }

/* ------------------------------------------------- 9. Sekcja dwukolumnowa */
.split { display: grid; gap: clamp(1.5rem, 3.5vw, 2.75rem); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }
.split--reverse .split__media { order: -1; }
@media (min-width: 900px) { .split--reverse .split__media { order: 1; } }
.split__body h2 + p { margin-top: 1rem; }
.split__body p + p { margin-top: .9rem; }

/* ------------------------------------------------------------- 10. Karty */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: clamp(1.4rem, 2.6vw, 1.85rem);
  transition: border-color .25s var(--ease);
}
.card:hover { border-color: var(--line-strong); }
.card h3 { margin-bottom: .6rem; }
.card p { color: var(--muted); font-size: .97rem; }
.card__num {
  display: block; font-family: var(--font-sans); font-size: .74rem; font-weight: 700;
  letter-spacing: .16em; color: var(--brand-ink); margin-bottom: .9rem;
  font-variant-numeric: tabular-nums;
}
.card--dark { background: var(--ink-2); border-color: var(--line-dark); }
.card--dark:hover { border-color: #384453; }
.card--dark p { color: var(--muted-dark); }
.card--dark .card__num { color: var(--brand-bright); }

/* ------------------------------------------------------------- 11. Listy */
.checklist { display: grid; gap: .8rem; margin-top: 1.6rem; }
.checklist li { display: grid; grid-template-columns: 1.15rem 1fr; gap: .8rem; align-items: start; }
.checklist li::before {
  content: ""; width: 1.15rem; height: 1.15rem; margin-top: .28rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233D6800' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/1.05rem no-repeat;
}
.section--dark .checklist li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238CE902' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

/* lista dyscyplin / obszarów — hairline, bez ramek */
.field-list { display: grid; gap: 0; }
.field-list__item { padding: 1.15rem 0; border-top: 1px solid var(--line); }
.field-list__item:last-child { border-bottom: 1px solid var(--line); }
.field-list__item h4 { margin-bottom: .3rem; }
.field-list__item p { color: var(--muted); font-size: .95rem; }

/* -------------------------------------------------------- 12. Proces / kroki */
.steps { counter-reset: step; display: grid; }
.step {
  counter-increment: step; display: grid; grid-template-columns: 3rem 1fr;
  gap: clamp(.9rem, 2.2vw, 1.75rem); padding: 1.5rem 0; border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-sans); font-size: .95rem; font-weight: 700; color: var(--brand-ink);
  font-variant-numeric: tabular-nums; padding-top: .28rem;
}
.step h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.step p { color: var(--muted); font-size: .97rem; max-width: var(--measure); }
.section--dark .step { border-color: var(--line-dark); }
.section--dark .step::before { color: var(--brand-bright); }

/* ------------------------------------------------------------ 13. Liczniki */
.stats { display: grid; gap: 1px; background: var(--line-dark);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  border: 1px solid var(--line-dark); border-radius: var(--radius-md); overflow: hidden; }
.stat { background: var(--ink-2); padding: clamp(1.5rem, 3vw, 2rem); }
.stat__value {
  font-family: var(--font-sans); font-size: clamp(2.2rem, 1.7rem + 2.1vw, 3.1rem);
  font-weight: 700; letter-spacing: -.03em; line-height: 1; color: var(--brand-bright);
}
.stat__value .suffix { font-size: .5em; margin-left: .08em; vertical-align: .35em; }
.stat__label { margin-top: .8rem; color: var(--muted-dark); font-size: .93rem; line-height: 1.5; }

/* --------------------------------------------------------- 14. Tabela metod */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); }
.datatable { font-size: .93rem; min-width: 46rem; }
.datatable caption {
  caption-side: bottom; padding: .85rem 1.1rem; border-top: 1px solid var(--line);
  font-size: .82rem; color: var(--muted); text-align: left; background: var(--mist);
}
.datatable th, .datatable td { padding: .8rem 1.1rem; text-align: left; vertical-align: top; }
.datatable thead th {
  font-family: var(--font-sans); font-size: .72rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--line-strong); background: var(--mist); white-space: nowrap;
}
.datatable tbody tr + tr th, .datatable tbody tr + tr td { border-top: 1px solid var(--line); }
.datatable a { color: var(--brand-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.datatable tbody th { font-weight: 700; color: var(--ink); font-family: var(--font-sans); }
.datatable td { color: var(--muted); }

/* --------------------------------------------------------------- 15. CTA */
.cta-band {
  border: 1px solid var(--line-dark); border-radius: var(--radius-md);
  background: var(--ink); color: #fff; padding: clamp(1.9rem, 4vw, 3rem);
  display: grid; gap: 1.5rem; align-items: center;
}
@media (min-width: 880px) { .cta-band { grid-template-columns: 1.5fr auto; } }
.cta-band h2 { color: #fff; font-size: clamp(1.45rem, 1.2rem + 1.1vw, 2rem); }
.cta-band p { color: var(--muted-dark); margin-top: .7rem; }
.cta-band .btn-row { margin-top: 0; }

/* ------------------------------------------------------------ 16. Kontakt */
.contact-grid { display: grid; gap: clamp(1.75rem, 4vw, 3rem); align-items: start; }
@media (min-width: 940px) { .contact-grid { grid-template-columns: 1fr 1.1fr; } }

.contact-list { display: grid; gap: 0; margin-top: 1.6rem; }
.contact-item {
  display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; align-items: baseline;
  padding: .95rem 0; border-top: 1px solid var(--line); text-decoration: none;
}
.contact-item:last-child { border-bottom: 1px solid var(--line); }
.contact-item__label {
  font-family: var(--font-sans); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.contact-item__value { font-weight: 600; color: var(--ink); font-size: 1.02rem; }
a.contact-item:hover .contact-item__value { color: var(--brand-ink); }

.form { display: grid; gap: 1rem; }
.form__row { display: grid; gap: 1rem; }
@media (min-width: 620px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: .35rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--ink); }
.field .req { color: var(--brand-ink); }
.field input, .field textarea, .field select {
  width: 100%; padding: .75rem .9rem; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: #fff; font-size: 1rem;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--brand-ink); box-shadow: 0 0 0 3px rgba(61,104,0,.14);
}
.field__hint { font-size: .8rem; color: var(--muted); }
.form__consent { display: grid; grid-template-columns: 1.1rem 1fr; gap: .7rem; align-items: start; font-size: .86rem; color: var(--muted); }
.form__consent input { width: 1.05rem; height: 1.05rem; margin-top: .22rem; accent-color: var(--brand); }
.form__note { font-size: .84rem; color: var(--muted); }
/* Pułapka na boty — niewidoczna dla ludzi, czytelna dla automatów. */
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
/* Komunikat po wysłaniu formularza */
.form__status {
  font-size: .9rem; line-height: 1.5; padding: .8rem 1rem;
  border: 1px solid var(--line-strong); border-left-width: 3px;
  border-radius: var(--radius); background: var(--mist); color: var(--muted);
}
.form__status--ok {
  border-color: var(--brand); border-left-color: var(--brand);
  background: var(--brand-wash); color: var(--ink);
}
.form__status--error {
  border-color: #B23B2E; border-left-color: #B23B2E;
  background: #FCF1EF; color: #7A2318;
}
.btn[disabled] { opacity: .6; cursor: progress; }
.btn[disabled]:hover { background: var(--btn-bg); border-color: var(--btn-bd); color: var(--btn-fg); }

.map-frame { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.map-frame iframe { display: block; width: 100%; height: 340px; border: 0; }
.map-placeholder {
  display: grid; place-items: center; gap: 1rem; text-align: center;
  min-height: 300px; padding: 2rem; border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md); background: var(--mist);
}
.map-placeholder p { color: var(--muted); font-size: .9rem; max-width: 28rem; margin: 0; }

/* ------------------------------------------------------- 17. Słownik pojęć */
.glossary-tools { display: grid; gap: 1rem; margin-bottom: 2rem; }
@media (min-width: 700px) { .glossary-tools { grid-template-columns: 1fr auto; align-items: center; } }
.search-box { position: relative; }
.search-box svg { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search-box input {
  width: 100%; padding: .8rem .9rem .8rem 2.7rem; border: 1px solid var(--line-strong);
  border-radius: var(--radius); font-size: 1rem; background: #fff;
}
.search-box input:focus { outline: none; border-color: var(--brand-ink); box-shadow: 0 0 0 3px rgba(61,104,0,.14); }
.glossary-count { font-size: .87rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

.glossary { display: grid; gap: 0; }
@media (min-width: 780px) { .glossary { grid-template-columns: 1fr 1fr; column-gap: clamp(2rem, 4vw, 3.5rem); } }
.term { padding: 1.2rem 0; border-top: 1px solid var(--line); scroll-margin-top: 6rem; }
.term h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.term p { font-size: .95rem; color: var(--muted); margin: 0; }
.term[hidden] { display: none; }
/* Kotwica do pojedynczego pojęcia — widoczna dopiero przy najechaniu */
.term__anchor {
  color: var(--brand-ink); text-decoration: none; font-weight: 400;
  opacity: 0; transition: opacity .15s var(--ease);
}
.term:hover .term__anchor, .term__anchor:focus-visible { opacity: 1; }
.term:target { background: var(--brand-wash); box-shadow: 0 0 0 .7rem var(--brand-wash); }
.glossary-empty { padding: 2.5rem 0; color: var(--muted); text-align: center; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------- 18. Treść prosta */
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 2.5rem; margin-bottom: .8rem; }
.prose h3 { margin-top: 1.8rem; margin-bottom: .5rem; }
.prose p, .prose ul { color: var(--muted); }
.prose p + p { margin-top: .9rem; }
.prose ul { margin-top: .9rem; padding-left: 1.1rem; list-style: disc; display: grid; gap: .45rem; }
.prose a { color: var(--brand-ink); font-weight: 600; }

/* ------------------------------------------------------------- 19. Stopka */
.site-footer { background: var(--ink); color: var(--muted-dark); padding-block: clamp(2.75rem, 5.5vw, 4rem) 1.75rem; }
.footer-grid { display: grid; gap: 2.25rem clamp(1.5rem, 3vw, 2.5rem); grid-template-columns: minmax(0, 1.7fr) repeat(2, minmax(0, 1fr)); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand img { height: 38px; width: auto; }
.footer-brand p { margin-top: 1rem; font-size: .92rem; max-width: 21rem; line-height: 1.6; }
.footer-col h4 {
  font-family: var(--font-sans); font-size: .72rem; letter-spacing: .16em;
  text-transform: uppercase; color: #fff; margin-bottom: 1rem;
}
.footer-col ul { display: grid; gap: .55rem; list-style: none; padding: 0; margin: 0; }
.footer-col a { text-decoration: none; font-size: .93rem; transition: color .18s var(--ease); }
.footer-col a:hover { color: var(--brand-bright); }
.footer-legal {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line-dark);
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between; font-size: .85rem;
}
.footer-legal a { text-decoration: none; }
.footer-legal a:hover { color: var(--brand-bright); }
.social { display: flex; gap: .5rem; margin-top: 1.3rem; }
.social a {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius);
  border: 1px solid var(--line-dark);
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.social a:hover { background: var(--brand); border-color: var(--brand); color: #0B1400; }
.social svg { width: 17px; height: 17px; }

/* ------------------------------------------------------- 20. Animacje wejścia */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ 21. Narzędzia */
.text-center { text-align: center; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}


/* --------------------------------------------- 22. Mobilny pasek kontaktu */
.mobile-cta { display: none; }
@media (max-width: 720px) {
  .mobile-cta {
    display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: .5rem;
    position: fixed; inset: auto 0 0 0; z-index: 60;
    padding: .55rem .75rem calc(.55rem + env(safe-area-inset-bottom));
    background: rgba(14, 20, 27, .96); border-top: 1px solid var(--line-dark);
    backdrop-filter: saturate(140%) blur(6px);
  }
  .mobile-cta__btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    min-height: 48px; padding: .55rem .6rem; border-radius: var(--radius);
    font-size: .85rem; font-weight: 600; line-height: 1.1; text-decoration: none;
    color: #E8EEF4; border: 1px solid var(--line-dark); background: transparent;
  }
  .mobile-cta__btn svg { width: 18px; height: 18px; flex: none; }
  .mobile-cta__btn--wa { color: var(--brand-bright); border-color: rgba(140, 233, 2, .45); }
  .mobile-cta__btn--primary { background: var(--brand-bright); border-color: var(--brand-bright); color: #0B1400; }
  .mobile-cta__btn:focus-visible { outline: 2px solid var(--brand-bright); outline-offset: 2px; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .nav[data-open="true"] ~ .mobile-cta, .mobile-cta { transition: transform .2s var(--ease); }
}
@media print { .mobile-cta { display: none !important; } }

.footer-legal__note { color: var(--muted-dark); }


/* --------------------------------------------------------- 22b. FAQ */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item > summary {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem;
  padding: 1.15rem 0; cursor: pointer; list-style: none;
  font-family: var(--font-sans); font-weight: 600; font-size: 1.05rem; color: var(--ink);
}
.faq__item > summary::-webkit-details-marker { display: none; }
.faq__item > summary::after {
  content: ""; flex: 0 0 auto; width: 11px; height: 11px; margin-top: .45rem;
  border-right: 2px solid var(--brand-ink); border-bottom: 2px solid var(--brand-ink);
  transform: rotate(45deg); transition: transform .2s var(--ease);
}
.faq__item[open] > summary::after { transform: rotate(-135deg); }
.faq__item > summary:hover { color: var(--brand-ink); }
.faq__item > summary:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 2px; }
.faq__answer { padding: 0 0 1.3rem; max-width: var(--measure); }
.faq__answer p { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .faq__item > summary::after { transition: none; } }

/* ------------------------------------------------------------ 23. Opinie */
.reviews-embed:not(:empty) { margin-bottom: 1.75rem; }
/* Widget Trustindex dopasowany do typografii serwisu */
.reviews-embed .ti-widget { font-family: var(--font-sans) !important; }
.reviews-embed .ti-widget .ti-review-item { border-radius: var(--radius-md) !important; }

/* ------------------------------------------- 24. Baner zgody na cookies */
.cookie-consent {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 300;
  max-width: 42rem; margin-inline: auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.25rem;
  padding: 1rem 1.15rem; background: #fff;
  border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  box-shadow: 0 12px 34px rgba(14, 20, 27, .20);
}
.cookie-consent__text { flex: 1 1 16rem; margin: 0; font-size: .85rem; line-height: 1.55; color: var(--muted); }
.cookie-consent__text a { color: var(--brand-ink); font-weight: 600; }
.cookie-consent__actions { display: flex; gap: .6rem; flex: 0 0 auto; }
@media (max-width: 560px) {
  .cookie-consent { left: .6rem; right: .6rem; bottom: calc(70px + env(safe-area-inset-bottom)); }
  .cookie-consent__actions { width: 100%; }
  .cookie-consent__actions .btn { flex: 1; }
}
