/* Odpowiedzialna Gra — arkusz stylów v5
   Prosto i szybko: Public Sans, niebieski zaufania, kąty proste, zwarte odstępy, bez animacji */

@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url(/fonts/ps-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url(/fonts/ps-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #f4f6fa;
  --paper: #ffffff;
  --surface: #e7ecf5;
  --line: #d5dce8;
  --ink: #0e1a33;
  --muted: #46526a;
  --accent: #1f4fd1;
  --accent-dark: #163a9e;
  --navy: #0e1a33;
  --pale: #dbe5f8;
  --sun: #ffd45c;

  --step-small: 0.9375rem;
  --step-body: clamp(1.0625rem, 1rem + 0.2vw, 1.125rem);
  --step-lead: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem);
  --step-head: clamp(1.625rem, 1.35rem + 1.2vw, 2.25rem);
  --step-display: clamp(2.25rem, 1.6rem + 3vw, 3.75rem);

  --pad: max(1rem, calc((100% - 1000px) / 2));
  --gap: clamp(2.5rem, 1.9rem + 2.4vw, 4rem);
  --r: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Public Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: var(--step-body); line-height: 1.6; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
p { margin: 0 0 .85em; text-wrap: pretty; }
strong { font-weight: 700; }
.skip { position: absolute; left: 1rem; top: -100px; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 10; }
.skip:focus { top: .5rem; }
.in { padding-inline: var(--pad); }

/* ---------- Nagłówek ---------- */
.helpbar { background: var(--accent); text-align: center; padding: .45rem 1rem; font-size: var(--step-small); }
.helpbar a { color: #fff; font-weight: 600; text-decoration: none; }
.helpbar a:hover { text-decoration: underline; color: #fff; }
.site-head { background: var(--paper); border-bottom: 1px solid var(--line); position: relative; }
.site-head .in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); font-size: 1.125rem; font-weight: 800; }
.brand:hover { color: var(--ink); }
.brand svg, .brand img { width: 1.9rem; height: 1.9rem; color: var(--accent); flex: none; }
.nav { display: flex; align-items: center; gap: 1.25rem; font-size: var(--step-small); font-weight: 600; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .6rem 1.25rem; background: var(--accent); color: #fff !important; text-decoration: none !important; border: 0; border-radius: var(--r); font: inherit; font-weight: 700; cursor: pointer; }
.btn:hover { background: var(--accent-dark); }
.btn--sm { min-height: 40px; padding: .4rem 1rem; }
.btn--sun { background: var(--sun); color: var(--ink) !important; }
.btn--sun:hover { background: #ffc729; }
.btn--ghost { background: rgba(255, 255, 255, .16); }
.btn--ghost:hover { background: rgba(255, 255, 255, .28); }
.menu { display: none; }
.menu summary { list-style: none; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; padding: 0 1rem; border-radius: var(--r); background: var(--ink); color: #fff; font-weight: 700; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--accent); }
.menu:not([open]) nav { display: none; }
.menu nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); padding: .25rem 1rem 1rem; z-index: 5; display: grid; font-weight: 700; }
.menu nav a { color: var(--ink); text-decoration: none; padding: .7rem 0; border-bottom: 1px solid var(--surface); }
@media (max-width: 960px) { .nav { display: none; } .menu { display: block; } }

/* ---------- Baner ---------- */
.page-head { position: relative; overflow: hidden; background: var(--navy); color: #fff; padding: clamp(2rem, 4vw, 3.25rem) var(--pad) clamp(2.25rem, 4.5vw, 3.5rem); }
.page-head::after { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(9, 18, 40, .76); }
.ph-pic { position: absolute; inset: 0; z-index: 0; }
.ph-pic img { width: 100%; height: 100%; object-fit: cover; filter: blur(2px); transform: scale(1.04); }
.ph-txt { position: relative; z-index: 2; max-width: 46rem; }
.page-head h1 { font-size: var(--step-display); color: var(--sun); letter-spacing: -0.03em; line-height: 1.05; }
.page-head--home { padding-block: clamp(2.75rem, 6vw, 4.5rem); }
.sub-title { font-size: var(--step-lead); font-weight: 800; margin: .6rem 0 0; line-height: 1.3; }
.page-head .lead { color: #e3e9f6; margin: .75rem 0 0; }
.page-head .meta { color: #b9c4dd; font-size: var(--step-small); margin: .75rem 0 0; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.crumbs { font-size: var(--step-small); color: #b9c4dd; margin-bottom: .9rem; }
.crumbs a { color: #fff; }

/* ---------- Sekcje strony głównej ---------- */
.sec { padding-block: var(--gap); }
.sec--white { background: var(--paper); border-block: 1px solid var(--line); }
.sec h2 { font-size: var(--step-head); margin-bottom: .5rem; }
.sec .intro { color: var(--muted); max-width: 46rem; margin-bottom: 1.5rem; }
.grid { display: grid; gap: 1rem; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.25rem; }
.sec--white .box { background: var(--bg); }
.box h3 { font-size: 1.125rem; margin-bottom: .35rem; }
.box p { margin: 0 0 .5rem; }
.box p:last-child { margin-bottom: 0; }
.box--link { display: block; text-decoration: none; color: var(--ink); border-left: 4px solid var(--accent); }
.box--link:hover { border-color: var(--accent-dark); background: var(--pale); color: var(--ink); }
.box--link .go { color: var(--accent); font-weight: 700; font-size: var(--step-small); }
.fig-num { font-size: clamp(2rem, 1.6rem + 1.8vw, 3rem); font-weight: 800; color: var(--accent); letter-spacing: -0.03em; line-height: 1; margin-bottom: .4rem; }
.stage { background: var(--accent); border-radius: var(--r); padding: 1.25rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.stage--one { grid-template-columns: minmax(0, 320px); justify-content: center; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.steps { counter-reset: s; display: grid; gap: .75rem; }
.steps .box { position: relative; padding-left: 3.5rem; }
.steps .box::before { counter-increment: s; content: counter(s); position: absolute; left: 1rem; top: 1rem; width: 1.8rem; height: 1.8rem; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 800; border-radius: var(--r); font-size: .95rem; }
.helpband { background: var(--sun); }
.helpband .in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.5rem; }
.helpband p { margin: 0; max-width: 40rem; }
.helpband .num { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem); font-weight: 800; color: var(--ink); text-decoration: none; white-space: nowrap; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .grid--3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid--2, .grid--3, .stage { grid-template-columns: 1fr; } }
.phone, .slip { min-width: 0; overflow-wrap: anywhere; }

/* ---------- Podstrony ---------- */
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2rem; padding: var(--gap) var(--pad); }
.doc--wide { grid-template-columns: minmax(0, 1fr); }
.doc aside { font-size: var(--step-small); }
.doc aside .stick { position: sticky; top: 1rem; display: grid; gap: .35rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; }
.doc aside p { margin: 0 0 .25rem; font-weight: 800; }
.doc aside a { text-decoration: none; line-height: 1.35; padding: .15rem 0; }
.doc aside a:hover { text-decoration: underline; }
.body { min-width: 0; max-width: 46rem; }
.body > h2 { font-size: var(--step-head); margin: 2.25rem 0 .75rem; padding-top: 1.25rem; border-top: 2px solid var(--line); scroll-margin-top: 1rem; }
.body > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.body h3 { font-size: 1.1875rem; margin: 1.35rem 0 .45rem; }
.body ul, .body ol { padding-left: 1.25em; margin: 0 0 1em; }
.body li { margin-bottom: .35em; }
.body li::marker { color: var(--accent); font-weight: 700; }
.body figure { margin: 1.5rem 0; }
.body figure img { width: 100%; border-radius: var(--r); aspect-ratio: 16 / 9; object-fit: cover; }
.body figcaption { font-size: var(--step-small); color: var(--muted); margin-top: .4rem; }
.src { font-size: var(--step-small); color: var(--muted); }
.note { background: var(--pale); border-left: 4px solid var(--accent); padding: .9rem 1.1rem; margin: 1rem 0; border-radius: 0 var(--r) var(--r) 0; }
.note p:last-child { margin: 0; }
.body .stage { margin: 1rem 0; }
@media (max-width: 860px) {
  .doc { grid-template-columns: 1fr; gap: 0; }
  .doc aside { order: 2; margin-top: 2rem; }
  .doc aside .stick { position: static; }
}

/* tabele */
.table-wrap { overflow-x: auto; margin: .75rem 0 1rem; }
.data { width: 100%; border-collapse: collapse; background: var(--paper); font-size: 1rem; font-variant-numeric: tabular-nums; }
.data th, .data td { text-align: left; padding: .6rem .75rem; border: 1px solid var(--line); vertical-align: top; }
.data th { background: var(--surface); font-size: var(--step-small); }
.data td.n, .data th.n { text-align: right; white-space: nowrap; }

/* ---------- Fragmenty interfejsu ---------- */
.phone, .slip { background: #fff; border-radius: 10px; padding: 1rem; color: var(--ink); font-size: var(--step-small); line-height: 1.35; }
.phone { border: 5px solid var(--navy); border-radius: 18px; }
.phone .bar { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: .75rem; }
.phone .h, .slip .h { margin: 0 0 .6rem; font-weight: 800; font-size: 1rem; }
.phone .row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.phone .row:last-child { border-bottom: 0; }
.phone small, .slip small { display: block; color: var(--muted); font-size: .8125rem; }
.phone .val { font-weight: 700; color: var(--accent); white-space: nowrap; }
.sw { width: 2.4rem; height: 1.35rem; border-radius: 1rem; background: var(--accent); position: relative; flex: none; }
.sw::after { content: ""; position: absolute; right: .18rem; top: .18rem; width: 1rem; height: 1rem; border-radius: 50%; background: #fff; }
.sw--off { background: #c5ccd8; }
.sw--off::after { right: auto; left: .18rem; }
.slip .ev { padding-bottom: .6rem; margin-bottom: .5rem; border-bottom: 1px dashed var(--line); }
.slip dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: .3rem 1rem; font-variant-numeric: tabular-nums; }
.slip dt { color: var(--muted); }
.slip dd { margin: 0; text-align: right; font-weight: 600; }
.slip .tax { color: #b3261e; }
.slip .win { color: var(--accent); font-weight: 800; }

/* ---------- Test PGSI (bez JS: liczniki CSS) ---------- */
.pgsi { counter-reset: pkt; }
.pgsi fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; margin: 0 0 .75rem; background: var(--paper); min-width: 0; }
.pgsi legend { float: left; width: 100%; font-weight: 700; margin-bottom: .6rem; padding: 0; }
.pgsi legend small { display: block; color: var(--accent); font-size: var(--step-small); }
.opts { clear: both; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
.opts label { position: relative; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 46px; padding: .4rem; background: var(--surface); border-radius: var(--r); cursor: pointer; font-weight: 600; font-size: var(--step-small); }
.opts label:hover { background: var(--pale); }
.opts input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opts label:has(input:checked) { background: var(--accent); color: #fff; }
.opts label:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.pgsi input[value="1"]:checked { counter-increment: pkt 1; }
.pgsi input[value="2"]:checked { counter-increment: pkt 2; }
.pgsi input[value="3"]:checked { counter-increment: pkt 3; }
.score { position: sticky; bottom: 0; background: var(--navy); color: #fff; padding: .7rem 1rem; border-radius: var(--r); display: flex; align-items: center; justify-content: space-between; gap: 1rem; z-index: 2; }
.score .num { font-weight: 700; }
.score .num::after { content: counter(pkt) " pkt"; color: var(--sun); font-size: 1.5rem; font-weight: 800; margin-left: .5rem; }
.score button { background: transparent; color: #fff; border: 0; text-decoration: underline; font: inherit; cursor: pointer; min-height: 44px; }
@media (max-width: 560px) { .opts { grid-template-columns: 1fr 1fr; } }

/* ---------- Autor, powiązane, formularz, słownik ---------- */
.byline { display: flex; gap: .9rem; align-items: center; margin-top: 2rem; padding: .9rem 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.byline img { width: 3.5rem; height: 3.5rem; border-radius: 50%; object-fit: cover; flex: none; }
.byline p { margin: 0; font-size: var(--step-small); }
.author-card { display: flex; gap: 1rem; align-items: flex-start; }
.author-card img { width: 6rem; height: 6rem; border-radius: 50%; object-fit: cover; flex: none; }
.related { background: var(--paper); border-top: 1px solid var(--line); padding-block: var(--gap); }
.related h2 { font-size: var(--step-head); margin-bottom: 1rem; }
.related ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.related li { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r); padding: .9rem 1rem; display: grid; gap: .25rem; background: var(--bg); }
.related a { font-weight: 800; text-decoration: none; color: var(--ink); }
.related a:hover { color: var(--accent); text-decoration: underline; }
.related span { color: var(--muted); font-size: var(--step-small); }
@media (max-width: 760px) { .related ul { grid-template-columns: 1fr; } }
.contact label { display: block; font-size: var(--step-small); font-weight: 700; margin-bottom: .35rem; }
.contact input, .contact select, .contact textarea { width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid #b9c3d6; border-radius: var(--r); padding: .65rem .8rem; min-height: 46px; }
.contact input:focus, .contact select:focus, .contact textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.terms { list-style: none; padding: 0 !important; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.terms li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: .8rem 1rem; margin: 0 !important; }
.terms a { font-weight: 800; text-decoration: none; }
.terms span { display: block; color: var(--muted); font-size: var(--step-small); }
@media (max-width: 640px) { .terms { grid-template-columns: 1fr; } }

/* ---------- Stopka ---------- */
.site-foot { background: var(--navy); color: #cfd8ea; font-size: var(--step-small); padding-block: 2.5rem 1.5rem; }
.site-foot a { color: #fff; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; color: #fff; }
.site-foot .brand { color: #fff; margin-bottom: .75rem; }
.site-foot .brand svg { color: var(--sun); }
.foot-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 1.5rem; }
.foot-cols nav { display: grid; gap: .35rem; align-content: start; }
.foot-cols nav p { margin: 0 0 .25rem; color: #fff; font-weight: 800; }
.badge18 { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--sun); color: var(--ink); font-weight: 800; font-size: .8125rem; margin-right: .5rem; vertical-align: middle; }
.foot-meta span { max-width: 75ch; }
.foot-meta { display: grid; gap: .4rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #2a3a5c; color: #aab6cf; }
@media (max-width: 860px) { .foot-cols { grid-template-columns: 1fr 1fr; } .foot-cols .about { grid-column: 1 / -1; } }

/* pasek autora pod banerem */
.author-strip { background: var(--paper); border-bottom: 1px solid var(--line); }
.author-strip .in { display: flex; align-items: center; gap: .75rem; padding-block: .7rem; }
.author-strip img { width: 2.75rem; height: 2.75rem; border-radius: 50%; object-fit: cover; flex: none; }
.author-strip p { margin: 0; display: grid; line-height: 1.35; }
.author-strip a { font-weight: 800; color: var(--ink); text-decoration: none; }
.author-strip a:hover { color: var(--accent); text-decoration: underline; }
.author-strip span { font-size: var(--step-small); color: var(--muted); }
