/* ============================================================
   publication.css - styl podstron opracowan (analizy, raporty,
   stanowiska). Odwzorowuje dokument, ktory wysylamy adresatowi:
   ten sam title-band tytulowy, ta sama typografia, te same bloki. Nie
   ma nic wspolnego z doc.css - statut i regulamin to dokumenty
   ustrojowe i rzadza sie inna szata.

   Zrodlem prawdy jest sheet opracowania w md2html. Tu te same
   proporcje przeliczone z cm i pt na jednostki ekranowe.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}
@media (max-width: 860px) { html { scroll-padding-top: 72px; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: 1.62;
  color: var(--ink);
  background: var(--slate-100);
  /* the menu bar is pinned, so the sheet starts below it */
  padding-top: 68px;
}
@media (max-width: 860px) { body { padding-top: 60px; } }
a { color: inherit; }

/* ---------------------- Arkusz dokumentu ----------------------
   Wszystkie reguly tresci wisza na .sheet, nie na klasie body:
   menu i stopka sa poza arkuszem i wlasny styl biora z chrome.css.
   Selektor .publication h4 wygrywal specyficznoscia z .footer__col h4
   i gasil naglowki w stopce.
   Odpowiednik #dokument z PDF-a: bialy blok na szarym tle. Na
   waskim ekranie cien i marginesy znikaja, zostaje sama tresc. */
.sheet {
  max-width: 880px;
  margin: 0 auto;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0, 21, 54, 0.06), 0 12px 40px rgba(0, 21, 54, 0.08);
}
.sheet__body {
  padding: clamp(28px, 5vw, 60px) clamp(20px, 5.5vw, 76px) clamp(48px, 7vw, 88px);
}
@media (min-width: 940px) {
  .sheet { margin: var(--space-7) auto var(--space-10); }
}
@media (max-width: 939px) {
  body { background: var(--white); }
  .sheet { box-shadow: none; }
}

/* ------------------------ Pas tytulowy ------------------------
   Kopia pasa z dokumentu: granat, czerwony edge przy lewej
   krawedzi, znak wodny wychodzacy poza prawy gorny rog. Pas
   siedzi pod paskiem menu, ktory jest przypiety do gory. */
.title-band {
  position: relative;
  overflow: hidden;
  background: var(--granat);
  color: var(--white);
  padding: clamp(34px, 5vw, 58px) clamp(20px, 5.5vw, 76px) clamp(40px, 6vw, 62px);
}
.title-band .edge {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 8px;
  background: var(--czerwien);
}
.title-band .wm {
  position: absolute;
  right: -13%;
  top: -34%;
  width: min(560px, 62%);
  height: auto;
  opacity: 0.6;
  pointer-events: none;
}
.title-band .brand {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 0 clamp(36px, 6vw, 64px);
}
.title-band .brand .logo { width: clamp(150px, 26vw, 200px); height: auto; }
.title-band .eyebrow {
  position: relative;
  margin: 0 0 var(--space-4);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--red-400);
}
.title-band h1 {
  position: relative;
  font-family: var(--font-body);
  font-size: clamp(27px, 4.6vw, 42px);
  line-height: 1.16;
  font-weight: var(--weight-bold);
  letter-spacing: -0.005em;
  color: var(--white);
  margin: 0;
  max-width: 19ch;
  max-width: 640px;
  text-wrap: balance;
}

/* --------------------------- Metryka ---------------------------
   Pasek miedzy pasem tytulowym a trescia: komu i kiedy dokument
   trafil oraz odnosnik do PDF-a. W samym dokumencie tego nie ma,
   bo adresat wie, co dostal - to jest wylacznie dla czytelnika
   ze strony. */
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3) var(--space-5);
  margin: 0 0 clamp(24px, 3.4vw, 34px);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--slate-500);
}
.meta__file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--granat);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur-base) var(--ease-standard);
}
.meta__file:hover { color: var(--czerwien); }
.meta__file svg { flex: none; }

/* ---------------------------- Tekst ---------------------------- */
.sheet__body > p:not(.doc-meta),
.sheet__body > ol li,
.sheet__body > ul li {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  hyphenate-limit-chars: 7 4 3;
}
@media (max-width: 620px) {
  .sheet__body > p:not(.doc-meta),
  .sheet__body > ol li,
  .sheet__body > ul li { text-align: left; }
}
.sheet h1, .sheet h2, .sheet h3, .sheet h4,
.sheet .title-band, .sheet .title-band p,
.sheet p.proposal > strong:first-child {
  hyphens: none;
  -webkit-hyphens: none;
}
.sheet p { margin: 0 0 1em; }
.sheet ol, .sheet ul { margin: 0 0 1em; padding-left: 1.6em; }
.sheet li { margin-bottom: 0.45em; }
.sheet strong { font-weight: var(--weight-bold); }

/* Lead: the first paragraph under the title band, on grey with a navy rule */
.sheet p.lead {
  background: var(--cloud);
  border-top: 3px solid var(--granat);
  padding: clamp(18px, 3vw, 26px) clamp(18px, 3vw, 28px);
  margin: 0 0 clamp(28px, 4vw, 38px);
  font-size: var(--text-base);
}

/* --------------------------- Naglowki --------------------------- */
.sheet h2, .sheet h3, .sheet h4 {
  font-family: var(--font-body);
  font-weight: var(--weight-bold);
  letter-spacing: 0;
  line-height: 1.28;
  scroll-margin-top: 92px;
}
.sheet h2 {
  display: flex;
  /* the square sticks to the first line: with a wrapped title (narrow
     ekran) wysrodkowanie w pionie zostawialoby go w powietrzu */
  align-items: flex-start;
  gap: clamp(12px, 2vw, 16px);
  font-size: clamp(22px, 3.4vw, 28px);
  line-height: 1.2;
  color: var(--granat);
  margin: clamp(48px, 7vw, 72px) 0 clamp(18px, 2.6vw, 26px);
}
/* numer czesci w granatowym kwadracie, jak w dokumencie */
.sheet h2 .nr {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(38px, 5.6vw, 46px);
  height: clamp(38px, 5.6vw, 46px);
  background: var(--granat);
  color: var(--white);
  font-size: clamp(19px, 2.8vw, 23px);
  font-weight: var(--weight-bold);
  line-height: 1;
  margin-top: -0.22em;
}
.sheet h3 {
  font-size: clamp(18px, 2.4vw, 21px);
  color: var(--granat);
  margin: clamp(34px, 4.6vw, 46px) 0 var(--space-3);
}
.sheet h4 {
  font-size: var(--text-base);
  color: var(--ink);
  margin: clamp(28px, 3.6vw, 36px) 0 var(--space-2);
}
.sheet h4 .nr { color: var(--czerwien); }
.sheet h2 + h3 { margin-top: var(--space-5); }
.sheet h3 + h4 { margin-top: var(--space-4); }

/* Odnosniki w tresci: czarne, z cienkim szarym podkresleniem -
   tak jak w dokumencie, zeby nie rozbijaly kolumny kolorem. */
.sheet__body > p:not(.doc-meta) a,
.sheet__body > ol a,
.sheet__body > ul a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-decoration-color: var(--slate-300);
  text-underline-offset: 0.16em;
  transition: text-decoration-color var(--dur-base) var(--ease-standard);
}
.sheet__body > p:not(.doc-meta) a:hover,
.sheet__body > ol a:hover,
.sheet__body > ul a:hover { text-decoration-color: var(--czerwien); }

/* Reference to a piece of legislation outside the site */
a.akt { white-space: nowrap; }
a.akt::after {
  content: "↗";
  font-size: 0.72em;
  margin-left: 0.15em;
  vertical-align: 0.25em;
  text-decoration: none;
  color: var(--slate-400);
}

/* ----------------------- Blok propozycji ----------------------- */
.sheet p.proposal {
  background: var(--cloud);
  border-left: 3px solid var(--granat);
  padding: clamp(14px, 2.2vw, 18px) clamp(16px, 2.6vw, 22px);
  margin: 1.1em 0 1.9em;
}
.sheet p.proposal > strong:first-child {
  display: block;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.06em;
  color: var(--granat);
  margin-bottom: var(--space-2);
}

/* ------------------ Cytowany przepis: ustepy i punkty ------------------
   Numer wypelnia pudelko o szerokosci wciecia, bez spacji po nim. */
.sheet p.subsection { padding-left: 2.1em; text-indent: -2.1em; }
.sheet p.point { margin-left: 2.1em; padding-left: 2.1em; text-indent: -2.1em; }
.sheet p.subsection .nr,
.sheet p.point .nr {
  display: inline-block;
  width: 2.1em;
  text-indent: 0;
  color: var(--granat);
  font-weight: var(--weight-bold);
}
@media (max-width: 560px) { .sheet p.point { margin-left: 1em; } }

/* --------------------------- Spis tresci ---------------------------
   W dokumencie go nie ma - PDF ma 19 stron i numeracje, na stronie
   trzeba dac czytelnikowi skrot. Utrzymany w typografii dokumentu. */
.contents {
  margin: 0 0 clamp(34px, 5vw, 48px);
  padding: clamp(20px, 3vw, 28px) clamp(20px, 3vw, 30px);
  background: var(--cloud);
  border-left: 3px solid var(--slate-300);
}
.contents__title {
  margin: 0 0 var(--space-4);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--slate-500);
}
.contents ol { margin: 0; padding: 0; list-style: none; }
.contents > ol > li { margin: 0 0 var(--space-3); }
.contents > ol > li:last-child { margin-bottom: 0; }
.contents a {
  color: var(--granat);
  text-decoration: none;
  font-weight: var(--weight-bold);
}
/* number in its own column, so a wrapped title does not run underneath it */
.contents > ol > li > a { display: flex; align-items: baseline; }
.contents__num {
  flex: none;
  width: 1.9em;
  color: var(--czerwien);
  font-weight: var(--weight-bold);
}
.contents__text { border-bottom: 1px solid transparent; }
.contents > ol > li > a:hover .contents__text { border-bottom-color: var(--czerwien); }
.contents ul { margin: var(--space-2) 0 0 1.9em; padding: 0; list-style: none; }
.contents ul li { margin: 0 0 6px; }
.contents ul a {
  font-weight: var(--weight-regular);
  color: var(--slate-700);
  font-size: var(--text-sm);
  border-bottom: 1px solid transparent;
}
.contents ul a:hover { border-bottom-color: var(--czerwien); }

/* ---------------------------- Podpisy ---------------------------- */
.founder-signatures {
  display: flex;
  gap: clamp(24px, 5vw, 64px);
  margin: clamp(56px, 8vw, 88px) 0 0;
}
.founder-signature {
  flex: 1;
  text-align: center;
  border-top: 1px dotted var(--slate-400);
  padding-top: var(--space-3);
}
.founder-signature__name { font-weight: var(--weight-bold); color: var(--granat); }
.founder-signature__role {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--slate-500);
  margin-top: 3px;
}
@media (max-width: 560px) {
  .founder-signatures { flex-direction: column; gap: var(--space-6); }
}

/* --------------------- Back to the list of publications --------------------- */
.back {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5.5vw, 76px) clamp(48px, 7vw, 80px);
  text-align: center;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}
.back a {
  color: var(--navy-600);
  text-decoration: none;
  border-bottom: 2px solid var(--czerwien);
  padding-bottom: 2px;
  transition: color var(--dur-base) var(--ease-standard);
}
.back a:hover { color: var(--czerwien); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .meta__file, .back a, .sheet__body a { transition: none; }
}

/* --- Brzmienie projektu ministerstwa -------------------------------------
   Blok istnieje tylko na stronie. Dokument wyslany do resortu go nie ma, bo
   adresat zna wlasny projekt; czytelnik strony pyta o niego w pierwszej
   kolejnosci. Cytat idzie bez skrotow, razem z luka w numeracji ustepow. */
.ministry-draft {
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--czerwien);
  background: #fff;
  padding: clamp(20px, 3.2vw, 30px) clamp(18px, 3vw, 32px) clamp(14px, 2.4vw, 22px);
  margin: 0 0 clamp(28px, 4vw, 38px);
}
.ministry-draft__label {
  margin: 0 0 var(--space-2);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--czerwien);
}
.sheet .ministry-draft__title {
  margin: 0 0 var(--space-3);
  font-size: clamp(19px, 2.6vw, 25px);
  line-height: 1.25;
  border: 0;
  padding: 0;
}
.ministry-draft__source {
  margin: 0 0 clamp(18px, 2.6vw, 26px);
  font-size: var(--text-sm);
  color: var(--color-fg-muted);
}
.ministry-draft__act + .ministry-draft__act { margin-top: clamp(20px, 3vw, 30px); }
.sheet .ministry-draft__act h3 {
  margin: 0 0 var(--space-3);
  font-size: clamp(16px, 2vw, 19px);
  color: var(--granat);
  border: 0;
  padding: 0;
}
.ministry-draft .subsection, .ministry-draft .point, .ministry-draft .letter { margin-bottom: 0.55em; }
.sheet p.letter { margin-left: 4.2em; padding-left: 2.1em; text-indent: -2.1em; }
.sheet p.letter .nr {
  display: inline-block;
  width: 2.1em;
  text-indent: 0;
  color: var(--granat);
  font-weight: var(--weight-bold);
}
@media (max-width: 560px) {
  .sheet p.letter { margin-left: 2em; }
}

/* --- Call to action under a publication ----------------------------------
   This block exists only on the website; the document sent to the addressee
   does not carry it. Hierarchy: the newsletter signup is the real call, the
   donation a quiet footnote - two equal asks compete and both lose. */
.signup {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5.5vw, 76px) clamp(32px, 5vw, 56px);
}
.signup__card {
  text-align: center;
  background: var(--granat);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4.5vw, 44px) clamp(20px, 4.5vw, 48px);
}
.signup__eyebrow {
  margin: 0 0 var(--space-3);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}
.signup__title {
  /* Lato bold, tak jak naglowki w samym opracowaniu - Cormorant wprowadzalby
     trzeci krok typograficzny na stronie, ktora caly czas stoi na Lato. */
  margin: 0 0 var(--space-3);
  font-family: var(--font-body);
  font-size: clamp(20px, 2.9vw, 26px);
  font-weight: var(--weight-bold);
  line-height: 1.28;
  color: var(--white);
}
.signup__intro {
  max-width: 62ch;
  margin: 0 auto clamp(20px, 3vw, 28px);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}
.signup__fields { display: grid; gap: var(--space-4); max-width: 620px; margin: 0 auto; }
@media (min-width: 620px) { .signup__fields { grid-template-columns: 1fr 1fr; } }
.signup__field { display: flex; flex-direction: column; gap: var(--space-2); }
.signup__label {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.72);
}
.signup__input {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--ink);
  background: var(--white);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
}
.signup__input:focus-visible { outline: 2px solid var(--czerwien); outline-offset: 2px; }
.signup__consent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  max-width: 620px;
  margin: clamp(18px, 2.6vw, 24px) auto 0;
  /* the consent text stays left-aligned: a centred legal paragraph breaks into a
     ragged block and reads worse than the card gains from the symmetry */
  text-align: left;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.74);
}
.signup__consent input { margin-top: 3px; flex: 0 0 auto; accent-color: var(--czerwien); }
.signup__consent a { color: var(--white); text-decoration: underline; }
.signup__btn {
  margin-top: clamp(18px, 2.6vw, 24px);
  padding: 13px 30px;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--white);
  background: var(--czerwien);
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: opacity var(--dur-base) var(--ease-standard);
}
.signup__btn:hover { opacity: 0.88; }
.signup__btn[disabled] { opacity: 0.6; cursor: default; }
.signup__error {
  margin: var(--space-3) 0 0;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: #ffb3c0;
}
.signup__support {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin: clamp(20px, 3vw, 28px) 0 0;
  text-align: center;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-fg-muted);
}
.signup__support-btn {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--navy-600);
  text-decoration: none;
  padding: 10px 22px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--white);
  transition: color var(--dur-base) var(--ease-standard), border-color var(--dur-base) var(--ease-standard);
}
.signup__support-btn:hover { color: var(--czerwien); border-color: var(--czerwien); }
.signup .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .signup__btn, .signup__support-btn { transition: none; }
}
