/* PSEV – kierunek „biało-szaro-czerwony, wprost z logo” (DESIGN.md) */
:root {
  --bg: #ffffff;
  --mist: #f3f4f5;
  --line: #d9dcdf;
  --grey: #666666;
  --text: #33373a;
  --ink: #1c1e20;
  --graphite: #2a2d30;
  --red: #c00d0d;
  --red-dark: #9a0a0a;
  --ok: #2f7d4f;

  --sans: "Lato", "Carlito", Calibri, "Segoe UI", Arial, sans-serif;
  --serif: "Brygada 1918", Georgia, "Times New Roman", serif;

  /* skala tekstu: 15 / 17 / 21 / 24 */
  --fs-s: 15px;
  --fs-m: 17px;
  --fs-l: 21px;
  --fs-xl: 24px;

  --content: 1200px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--fs-m)/1.6 var(--sans); }
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; font-family: var(--sans); text-wrap: balance; }
h1 { font-weight: 900; font-size: clamp(30px, 4.6vw, 58px); line-height: 1.04; letter-spacing: -0.01em; }
h2 { font-weight: 700; font-size: clamp(28px, 3vw, 36px); line-height: 1.15; }
h3 { font-weight: 700; font-size: var(--fs-l); line-height: 1.3; }
h4 { font-weight: 700; font-size: var(--fs-xl); line-height: 1.25; }
p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }
a { color: var(--red); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
table { border-collapse: collapse; width: 100%; }

.wrap { width: 100%; max-width: var(--content); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 16px; }
.skip:focus { top: 8px; color: #fff; }
.muted { color: var(--grey); }
.small { font-size: var(--fs-s); line-height: 1.5; }

/* Wersja robocza */
.draft-bar { background: var(--graphite); color: #e6e7e8; font-size: 13px; padding: 6px 0; }
.todo { background: #fff3c4; outline: 1px dashed #c9a400; outline-offset: 1px; color: #5a4a00; border-radius: 2px; padding: 0 3px; font: 400 0.92em var(--sans); }

/* Przyciski */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border-radius: 4px; font: 700 16px/1.2 var(--sans); text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: background-color .15s, color .15s; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-white { background: #fff; color: var(--red); }
.btn-white:hover { background: var(--ink); color: #fff; }
.band-red .btn-white:focus-visible { outline-color: #fff; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-sm { min-height: 40px; padding: 7px 16px; font-size: 15px; }
.text-link { font-weight: 700; }

/* Nagłówek */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 104px; }
.brand img { width: 240px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav ul a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 16px; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav ul a:hover, .nav ul a[aria-current="page"] { border-bottom-color: var(--red); color: var(--ink); }
.menu-toggle { display: none; }

/* Hero: pęcherzyki jako kadr ucięty dolną krawędzią */
.hero { padding: 72px 0 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: start; }
.hero-copy { padding-bottom: 88px; }
.hero-copy h1 { margin-bottom: 28px; max-width: 760px; }
.lead { font-size: var(--fs-l); line-height: 1.5; max-width: 34em; margin-bottom: 36px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.hero-mark { align-self: end; }
.hero-mark svg { width: clamp(280px, 26vw, 360px); margin: 0 0 -56px auto; }
.ring { fill: none; stroke: var(--grey); stroke-width: 6; }
.ring-big { stroke-width: 7; }
.red-fill { fill: var(--red); }

/* Teraz w Towarzystwie */
.now { background: var(--mist); padding: 48px 0 56px; position: relative; }
.now-title { font-size: var(--fs-xl); font-weight: 900; margin-bottom: 24px; }
.now-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; }
.now-label { font-size: var(--fs-m); font-weight: 700; margin-bottom: 12px; }
.news-date { display: flex; align-items: center; gap: 10px; font-size: var(--fs-s); margin-bottom: 6px; }
.bubble-mark { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--grey); background: linear-gradient(#fff 52%, var(--red) 52%); flex: none; }
.news h4 { margin-bottom: 8px; }
.events { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; color: var(--ink); }

/* Sekcje */
.section { padding: 80px 0; }
.section-tight { padding: 64px 0 80px; }
.band-mist { background: var(--mist); }

/* O Towarzystwie */
#o-nas h2 { margin-bottom: 24px; }
.intro { font-size: var(--fs-l); line-height: 1.55; color: var(--ink); max-width: 44em; margin-bottom: 24px; }
.mission { font-weight: 700; font-size: var(--fs-xl); line-height: 1.4; color: var(--ink); max-width: 38em; margin-bottom: 40px; }
.goals-title { margin-bottom: 14px; }
.bullets { margin: 0; padding-left: 1.2em; }
.bullets li { margin-bottom: 8px; }
.bullets li::marker { color: var(--grey); }
.goals { columns: 2; column-gap: 56px; max-width: 1000px; }
.goals li { break-inside: avoid; }

/* Wiedza – zajawka (białe tło, wykres na mist) */
.section-ev { padding-top: 0; }
.ev-teaser { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 64px; align-items: start; border-top: 1px solid var(--line); padding-top: 72px; }
.ev-text h2 { margin-bottom: 20px; }
.ev-lead { font-size: 19px; line-height: 1.6; }

/* Wykres zakresów */
.ranges { margin: 0; background: var(--mist); padding: 24px 28px 20px; border-radius: 4px; }
.ranges-title { font-weight: 700; color: var(--ink); font-size: var(--fs-s); margin-bottom: 14px; }
.range-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 76px; gap: 16px; align-items: center; padding: 7px 0; }
.range-name { font-weight: 700; color: var(--ink); font-size: var(--fs-s); }
.range-val { font-size: var(--fs-s); color: var(--grey); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.track { position: relative; height: 14px; background: linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat; }
.bar { position: absolute; top: 1px; height: 12px; border-radius: 6px; background: var(--grey); }
.axis .track { height: 24px; background: none; border-top: 1px solid var(--grey); }
.tick { position: absolute; top: 0; transform: translateX(-50%); font-size: 13px; color: var(--grey); padding-top: 6px; white-space: nowrap; }
.tick::before { content: ""; position: absolute; top: -1px; left: 50%; width: 1px; height: 5px; background: var(--grey); }
.ranges-note { font-size: var(--fs-s); color: var(--grey); margin-top: 10px; }

/* Ostrzeżenie: czerwona linia u góry, bez tła */
.warning { border-top: 2px solid var(--red); padding-top: 16px; margin-top: 28px; max-width: 46em; font-size: var(--fs-m); }
.warning strong { color: var(--red-dark); }

/* Współpraca */
.partners-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 64px; align-items: start; }
.partners-grid h2 { margin-bottom: 16px; }
.partners { list-style: none; margin: 0; padding: 0; }
.partners li { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.partners li:first-child { padding-top: 0; }
.partner { font-weight: 700; font-size: var(--fs-m); color: var(--ink); }
.partner:hover { color: var(--red); }

/* Członkostwo */
.band-red { background: var(--red); color: #fff; padding: 56px 0; }
.red-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px 48px; align-items: end; }
.band-red h2 { color: #fff; margin-bottom: 12px; }
.band-red a:not(.btn) { color: #fff; }
.red-lead { font-size: var(--fs-l); line-height: 1.5; max-width: 32em; margin-bottom: 24px; }
.fees { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 32px; }
.fee { display: flex; flex-direction: column; margin: 0; }
.fee-amount { font-weight: 900; font-size: clamp(36px, 4vw, 48px); line-height: 1; }
.fee-who { font-size: var(--fs-s); margin-top: 6px; }
.fee-note { grid-column: 1 / -1; font-size: var(--fs-s); margin: 0; }

.join-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 64px; align-items: start; }
.join-info h3 { margin-bottom: 14px; }
.join-info h3:not(:first-child) { margin-top: 40px; }
.steps { margin: 0 0 24px; padding-left: 1.3em; }
.steps li { margin-bottom: 12px; padding-left: 4px; }
.steps li::marker { font-weight: 700; color: var(--ink); }
.steps strong { color: var(--ink); }
.bank { background: var(--mist); border-radius: 4px; padding: 22px 24px; margin-top: 36px; font-size: var(--fs-s); }
.bank-title { font-weight: 700; color: var(--ink); font-size: var(--fs-m); margin-bottom: 8px; }
.account { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-weight: 700; font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }
.copy { font: 700 14px var(--sans); background: var(--bg); border: 2px solid var(--ink); border-radius: 4px; padding: 4px 12px; cursor: pointer; color: var(--ink); min-height: 34px; }
.copy:hover { background: var(--ink); color: #fff; }

.form { background: var(--mist); border-radius: 4px; padding: 32px; }
.form h3 { margin-bottom: 22px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: var(--fs-s); font-weight: 700; color: var(--ink); margin-bottom: 6px; }
input, select, textarea { width: 100%; font: 400 16px/1.4 var(--sans); color: var(--ink); background: var(--bg); border: 1px solid #b4b8bc; border-radius: 4px; padding: 10px 12px; min-height: 46px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--red); }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; font-size: var(--fs-s); margin-bottom: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; accent-color: var(--ink); }
.form-error { color: var(--red-dark); font-weight: 700; font-size: var(--fs-s); }
.form .btn { margin-top: 6px; }
.form-note { margin-top: 12px; }

/* Władze i dokumenty */
#towarzystwo h2 { margin-bottom: 8px; }
.gov { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; }
.group-title { margin: 32px 0 8px; }
.people { list-style: none; margin: 0; padding: 0; max-width: 720px; }
.people li { display: grid; grid-template-columns: 180px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.role { font-size: var(--fs-s); color: var(--grey); }
.name { font-weight: 700; font-size: var(--fs-l); line-height: 1.3; color: var(--ink); }
.doc-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 10px; }
.doc-list .muted { font-size: var(--fs-s); margin-left: 6px; }

/* Podstrona Wiedza */
.article { display: grid; grid-template-columns: 200px minmax(0, 720px); gap: 0 72px; align-items: start; }
.toc { position: sticky; top: 128px; display: flex; flex-direction: column; gap: 8px; padding-top: 10px; }
.toc-title { font-size: var(--fs-s); color: var(--grey); margin-bottom: 4px; }
.toc a { color: var(--ink); font-weight: 700; text-decoration: none; }
.toc a:hover { color: var(--red); text-decoration: underline; }
.page-title { font-size: clamp(32px, 4.4vw, 52px); font-weight: 900; margin-bottom: 32px; }
.article-main > h2 { margin: 64px 0 18px; }
.reading { font-family: var(--serif); font-size: 19px; line-height: 1.65; }
.reading p { margin-bottom: 18px; }
.article-main .ranges { margin: 28px 0; }
.types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 8px 0 28px; }
.types h3 { font-size: var(--fs-m); margin-bottom: 6px; }
.types p { font-size: var(--fs-s); }
.note-grey { color: var(--grey); }
.table-wrap { margin: 24px 0 28px; }
.methods { font-size: var(--fs-s); }
.methods caption { text-align: left; font-weight: 700; color: var(--ink); padding-bottom: 10px; font-size: var(--fs-m); }
.methods th { text-align: left; font-weight: 700; color: var(--ink); padding: 10px 16px 10px 0; border-bottom: 2px solid var(--ink); }
.methods td { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.methods td:first-child { font-weight: 700; color: var(--ink); }
.qa h3 { font-family: var(--sans); font-size: var(--fs-l); margin: 28px 0 6px; }
.qa h3:first-child { margin-top: 0; }
.back { margin-top: 64px; }

/* Stopka */
.site-footer { background: var(--graphite); color: #cfd2d4; padding: 64px 0 32px; font-size: var(--fs-s); }
.footer-grid { display: grid; grid-template-columns: 5fr 4fr 3fr; gap: 40px; }
.site-footer img { width: 170px; margin-bottom: 16px; }
.f-org { color: #fff; font-weight: 700; font-size: 16px; max-width: 18em; }
.f-head { color: #fff; font-size: var(--fs-s); font-weight: 700; margin-bottom: 12px; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #fff; text-decoration-thickness: 2px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer :focus-visible { outline-color: #fff; }
.f-bottom { margin-top: 48px; padding-top: 20px; border-top: 1px solid #44484c; font-size: 13px; color: #a9adb0; }

/* Tablet */
@media (max-width: 1000px) {
  .menu-toggle { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; font: 700 15px var(--sans); color: var(--ink); background: transparent; border: 2px solid var(--ink); border-radius: 4px; cursor: pointer; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 16px; background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px var(--gutter) 24px; }
  .nav.open { display: flex; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav ul a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav ul a:hover, .nav ul a[aria-current="page"] { border-bottom-color: var(--line); color: var(--red); }
  .header-inner { min-height: 88px; }
  .brand img { width: 200px; }
  .hero { padding-top: 56px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) 210px; gap: 24px; }
  .hero-copy { padding-bottom: 64px; }
  .hero-mark svg { width: 200px; margin-bottom: -32px; }
  .ev-teaser { grid-template-columns: 1fr; }
  .partners-grid { grid-template-columns: 1fr; }
  .red-grid { grid-template-columns: 1fr; align-items: start; }
  .fees { max-width: 520px; }
  .join-grid { grid-template-columns: 1fr; gap: 48px; }
  .gov { grid-template-columns: 1fr; gap: 0; }
  .article { grid-template-columns: 1fr; }
  .toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 8px 24px; padding: 14px 0; margin-bottom: 32px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); grid-row: 2; }
  .toc-title { display: none; }
  .article-main { display: contents; }
  .page-title { grid-row: 1; margin-bottom: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Telefon */
@media (max-width: 720px) {
  :root { --gutter: 16px; --fs-l: 19px; --fs-xl: 21px; }
  body { font-size: 16px; }
  .header-inner { min-height: 76px; }
  .brand img { width: 168px; }
  h1 { font-size: clamp(27px, 7.6vw, 40px); }
  .hero { padding: 32px 0 0; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-mark { display: none; }
  .hero-copy { padding-bottom: 48px; }
  .actions .btn { width: 100%; }
  .now { padding: 32px 0 40px; }
  .now-grid { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 56px 0; }
  .section-ev { padding-top: 0; }
  .ev-teaser { padding-top: 48px; }
  .goals { columns: 1; }
  .ranges { padding: 18px 16px 16px; }
  .range-row { grid-template-columns: minmax(0, 1fr) 72px; gap: 2px 10px; }
  .range-row .range-name { grid-column: 1 / -1; }
  .axis .range-name { display: none; }
  .tick { font-size: 11px; }
  .tick:nth-child(4) { display: none; }
  .band-red { padding: 40px 0; }
  .fees { grid-template-columns: 1fr 1fr; gap: 12px 20px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .form { padding: 22px 16px; }
  .people li, .partners li { grid-template-columns: 1fr; gap: 2px; }
  .types { grid-template-columns: 1fr; gap: 18px; }
  .reading { font-size: 18px; }
  /* tabela metod jako lista bloków */
  .methods thead { display: none; }
  .methods tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .methods td { display: block; border: 0; padding: 2px 0; }
  .methods td:nth-child(2)::before { content: "Zasada: "; color: var(--grey); }
  .methods td:nth-child(3)::before { content: "Uwagi: "; color: var(--grey); }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
