/* energometr — system wizualny „edytorski dataviz” (2026-10).
   Papier + tusz, szeryfowy Newsreader w nagłówkach i liczbach, Public Sans w interfejsie i tabelach.
   Jedyny kolor marki to „wskazówka” (--signal); zieleń→czerwień zarezerwowana dla skali EP.
   Fonty samohostowane, przycięte do polskiej łaciny; zero bibliotek, wszystko działa bez JS. */

@font-face {
  font-family: "Newsreader Display";
  src: url("../fonts/newsreader-display.woff2") format("woff2");
  font-weight: 400 650;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader Text";
  src: url("../fonts/newsreader-text.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
/* zastępczy krój o zbliżonych metrykach — ogranicza przeskok układu przy podmianie fontu */
@font-face {
  font-family: "Serif Fallback";
  src: local("Georgia"), local("Times New Roman");
  size-adjust: 96%;
  ascent-override: 92%;
}

:root {
  --paper: #F3EFE6;
  --paper-2: #EAE4D6;
  --paper-3: #FBF9F4;
  --ink: #1B1A16;
  --ink-2: #545047;
  --ink-3: #857F72;
  --rule: #D5CDBB;
  --rule-strong: #1B1A16;
  --signal: #C8441B;
  --signal-ink: #A63612;
  --on-ink: #F3EFE6;
  --pl: #A39C8C;
  /* skala EP: od bardzo niskiego (dobrze) do bardzo wysokiego zapotrzebowania */
  --b1: #2F6B50;
  --b2: #7C9F5E;
  --b3: #D3B95E;
  --b4: #D7884C;
  --b5: #A9412E;
  /* aliasy dla wykresu SVG renderowanego po stronie serwera */
  --acc: var(--ink);
  --tx: var(--ink);
  --tx2: var(--ink-2);
  --line: var(--rule);

  --serif: "Newsreader Display", "Serif Fallback", Georgia, serif;
  --serif-text: "Newsreader Text", "Serif Fallback", Georgia, serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: 16px;
  --max: 1200px;
  --measure: 66ch;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 900px) { :root { --gutter: 40px; } }

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15140F;
    --paper-2: #1E1C17;
    --paper-3: #1A1914;
    --ink: #EDE7D9;
    --ink-2: #B5AE9E;
    --ink-3: #888172;
    --rule: #35322A;
    --rule-strong: #EDE7D9;
    --signal: #F0713F;
    --signal-ink: #F48A5E;
    --on-ink: #15140F;
    --pl: #6F695C;
    --b1: #4C9A74;
    --b2: #93B46F;
    --b3: #DCC36B;
    --b4: #E0915A;
    --b5: #CF5C45;
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  font-variant-numeric: lining-nums;
  text-rendering: optimizeLegibility;
}
@media (min-width: 900px) { body { font-size: 18px; } }

::selection { background: var(--signal); color: var(--paper-3); }

a { color: inherit; text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }
a:hover { color: var(--signal-ink); }

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

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

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.08; letter-spacing: -0.015em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(36px, 9vw, 72px); letter-spacing: -0.025em; }
h2 { font-size: clamp(26px, 5.4vw, 38px); }
h3 { font-size: 22px; line-height: 1.2; }
p { margin: 0 0 1em; text-wrap: pretty; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: var(--measure); }
.muted { color: var(--ink-2); }
.tiny, small { font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.lead { font-size: clamp(19px, 2.6vw, 23px); line-height: 1.45; color: var(--ink-2); max-width: 40ch; margin: 18px 0 0; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* drobne kapitaliki nad nagłówkiem — „etykieta działu” jak w gazecie */
.kicker { display: block; font: 600 13px/1.3 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 14px; }
.kicker a { color: inherit; }

/* --- nagłówek strony --------------------------------------------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--rule-strong); background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }

.logo { display: inline-flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); padding: 8px 0; }
.logo__word { font: 600 25px/1 var(--serif); letter-spacing: -0.02em; }
.logo__word em { font-style: normal; color: var(--ink-3); font-weight: 400; }
.logo__scale { display: flex; gap: 2px; height: 4px; width: 100%; }
.logo__scale i { flex: 1; background: var(--b1); }
.logo__scale i:nth-child(2) { background: var(--b2); }
.logo__scale i:nth-child(3) { background: var(--b3); }
.logo__scale i:nth-child(4) { background: var(--b4); }
.logo__scale i:nth-child(5) { background: var(--b5); }
.logo:hover { color: var(--ink); }

.site-nav { display: none; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 16px; font-weight: 500; padding: 10px 12px; }
.site-nav a:hover, .site-nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.site-nav a.nav-cta { margin-left: 8px; color: var(--on-ink); text-decoration: none; }
.site-nav a.nav-cta:hover { color: #fff; }

.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 2px 0 14px; font: 600 15px var(--sans); letter-spacing: 0.04em; text-transform: uppercase; }
.menu summary::-webkit-details-marker { display: none; }
.menu__icon { width: 22px; height: 12px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; position: relative; }
.menu__icon::after { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 2px solid currentColor; }
.menu[open] .menu__icon { border-color: transparent; }
.menu[open] .menu__icon::before, .menu[open] .menu__icon::after { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 2px solid var(--ink); transform: rotate(45deg); }
.menu[open] .menu__icon::before { transform: rotate(-45deg); }
.menu__panel { position: absolute; right: calc(-1 * var(--gutter)); top: calc(100% + 11px); width: 100vw; max-width: 420px; background: var(--paper-3); border-bottom: 1px solid var(--rule-strong); border-left: 1px solid var(--rule); padding: 8px var(--gutter) 20px; z-index: 20; box-shadow: 0 24px 40px -24px rgb(0 0 0 / 0.35); }
.menu__panel a { display: flex; justify-content: space-between; align-items: center; min-height: 52px; border-bottom: 1px solid var(--rule); font: 500 22px/1.2 var(--serif); color: var(--ink); text-decoration: none; }
.menu__panel a::after { content: "→"; font-family: var(--sans); font-size: 18px; color: var(--ink-3); }
.menu__panel a.nav-cta { border: 0; margin-top: 16px; justify-content: center; font: 600 17px var(--sans); color: var(--on-ink); }
.menu__panel a.nav-cta::after { content: none; }

@media (min-width: 960px) {
  .site-nav { display: flex; align-items: center; }
  .menu { display: none; }
}

/* --- stopka ------------------------------------------------------------------------------------------------ */
.site-footer { margin-top: 96px; background: var(--ink); color: var(--paper); }
.site-footer .wrap { display: grid; gap: 32px; padding-top: 48px; padding-bottom: 40px; }
@media (min-width: 800px) { .site-footer .wrap { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer .logo { color: var(--paper); }
.site-footer .logo__word em { color: var(--pl); }
.site-footer p { color: var(--pl); font-size: 15px; max-width: 46ch; margin-top: 14px; }
.site-footer h2 { font: 600 13px/1.3 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--pl); margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a { display: inline-block; padding: 7px 0; color: var(--paper); font-size: 16px; text-decoration-color: transparent; }
.site-footer li a:hover { text-decoration-color: var(--signal); color: var(--paper); }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid rgb(255 255 255 / 0.14); padding-top: 18px; font-size: 13px; color: var(--pl); max-width: none; }
@media (prefers-color-scheme: dark) { .site-footer { background: #0D0C09; color: var(--ink); } .site-footer .logo, .site-footer li a { color: var(--ink); } }

/* --- przyciski i pola -------------------------------------------------------------------------------------- */
.btn, a.cta, button.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  background: var(--ink); color: var(--on-ink); border: 1.5px solid var(--ink); border-radius: 0;
  font: 600 16px/1.2 var(--sans); letter-spacing: 0.01em; text-decoration: none; cursor: pointer;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease);
}
.btn::after, a.cta::after, button.cta::after { content: "→"; transition: transform 0.45s var(--ease); }
.btn:hover, a.cta:hover, button.cta:hover { background: var(--signal); border-color: var(--signal); color: #fff; }
.btn:hover::after, a.cta:hover::after, button.cta:hover::after { transform: translateX(4px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn.block { width: 100%; }
.btn.small { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn.no-arrow::after { content: none; }

input, select { font: inherit; font-size: 18px; min-height: 52px; padding: 10px 14px; width: 100%; max-width: 100%; background: var(--paper-3); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 0; }
input::placeholder { color: var(--ink-3); }
input:focus-visible, select:focus-visible { outline-offset: 0; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; }
.form-group .hint { display: block; font-size: 14px; color: var(--ink-2); font-weight: 400; margin-top: 2px; }
fieldset { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
legend { font: 500 24px/1.2 var(--serif); margin-bottom: 12px; padding: 0; }

.choices { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--rule-strong); }
@media (min-width: 640px) { .choices { grid-template-columns: repeat(2, 1fr); column-gap: 24px; } }
.choices label { position: relative; display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 10px 4px; border-bottom: 1px solid var(--rule); cursor: pointer; font-size: 18px; }
.choices input { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; min-height: 0; padding: 0; margin: 0; border: 1.5px solid var(--ink); border-radius: 50%; background: var(--paper-3); display: grid; place-content: center; }
.choices input::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--signal); transform: scale(0); transition: transform 0.3s var(--ease); }
.choices input:checked::before { transform: scale(1); }
.choices label:has(input:checked) { font-weight: 600; }
.choices label:hover { background: var(--paper-2); }

/* wyszukiwarka gmin — jedno pole, jeden przycisk, zszyte w całość */
.search { display: flex; max-width: 620px; margin-top: 28px; }
.search input { border-right: 0; font-size: 19px; }
.search .btn { flex: none; padding: 0 20px; }
.search .btn::after { content: none; }
.search-label { display: block; font: 600 13px/1.3 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-2); margin: 32px 0 0; }
.search-label + .search { margin-top: 8px; }

/* --- układ stron ------------------------------------------------------------------------------------------- */
main { display: block; }
.page-head { padding: 28px 0 8px; }
@media (min-width: 900px) { .page-head { padding: 56px 0 16px; } }
.page-head h1 { max-width: 18ch; }

.section { margin-top: 64px; }
@media (min-width: 900px) { .section { margin-top: 96px; } }
.section > h2 { margin-bottom: 20px; }
.section-head { display: grid; gap: 8px; border-top: 1px solid var(--rule-strong); padding-top: 18px; margin-bottom: 28px; }
@media (min-width: 900px) { .section-head { grid-template-columns: 4fr 8fr; gap: 40px; align-items: start; } }
.section-head h2 { max-width: 16ch; }
.section-head p { color: var(--ink-2); margin: 0; max-width: 52ch; }

.split { display: grid; gap: 40px; }
.split > * { min-width: 0; }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 64px; }
  .split > aside { position: sticky; top: 24px; align-self: start; }
  .split--head > aside { margin-top: 56px; }
}

.source-line { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--ink-2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 10px 0; margin: 24px 0 0; }
.source-line strong { color: var(--ink); font-weight: 600; }

/* --- okruszki ---------------------------------------------------------------------------------------------- */
.crumb { font-size: 14px; color: var(--ink-2); margin-top: 20px; }
.crumb ol { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0; }
.crumb li { display: inline-flex; align-items: center; }
.crumb li + li::before { content: "/"; color: var(--ink-3); margin: 0 8px; }
.crumb a { color: var(--ink-2); text-decoration-color: var(--rule); display: inline-block; padding: 8px 0; }
.crumb a:hover { color: var(--ink); text-decoration-color: var(--signal); }

/* --- SKALA EP: wskaźnik jako bohater (podpis serwisu) --------------------------------------------------------
   Pasma mają szerokość proporcjonalną do progów krajowych; wskazówka = mediana jednostki, znacznik = Polska. */
.meter { margin: 0; padding-top: 4px; }
.meter__value { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.meter__big { font: 500 clamp(96px, 30vw, 208px)/0.8 var(--serif); letter-spacing: -0.045em; font-variant-numeric: lining-nums; margin-left: -0.04em; }
.meter__unit { font-size: 15px; color: var(--ink-2); line-height: 1.35; padding-bottom: 0.4em; max-width: 15ch; }
.meter__unit b { display: block; color: var(--ink); font-weight: 600; }

.meter__track { position: relative; margin: 40px 0 0; padding: 0; }
.meter__bands { display: flex; height: 14px; gap: 2px; clip-path: inset(0 0 0 0); animation: meter-in 1.1s var(--ease) both; }
.meter__bands i { display: block; height: 100%; }
.meter__bands i:nth-child(1) { background: var(--b1); }
.meter__bands i:nth-child(2) { background: var(--b2); }
.meter__bands i:nth-child(3) { background: var(--b3); }
.meter__bands i:nth-child(4) { background: var(--b4); }
.meter__bands i:nth-child(5) { background: var(--b5); }
.meter__needle { position: absolute; top: -26px; height: 48px; width: 0; border-left: 3px solid var(--ink); transform-origin: bottom; animation: needle-in 0.9s 0.35s var(--ease) both; }
.meter__needle::before { content: ""; position: absolute; top: -6px; left: -7.5px; width: 12px; height: 12px; background: var(--signal); border-radius: 50%; }
.meter__mark { position: absolute; top: 18px; transform: translateX(-50%); font-size: 13px; color: var(--ink-2); white-space: nowrap; padding-top: 10px; }
.meter__mark::before { content: ""; position: absolute; top: 0; left: 50%; height: 8px; border-left: 1.5px solid var(--ink-2); }
.meter__mark--pl { top: -34px; padding: 0 0 8px; }
.meter__mark--pl::before { top: auto; bottom: -6px; height: 10px; border-left: 2px dotted var(--ink-2); }
.meter__ticks { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); margin-top: 8px; font-variant-numeric: tabular-nums; }
.meter__ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-top: 12px; border-top: 1px solid var(--rule); padding-top: 8px; }
.meter figcaption { font-size: 15px; color: var(--ink-2); margin-top: 18px; max-width: 58ch; }
.meter--compact .meter__track { margin-top: 10px; padding-bottom: 0; }
.meter--compact .meter__bands { height: 8px; }
.meter--compact .meter__needle { top: -8px; height: 24px; border-left-width: 2px; }
.meter--compact .meter__needle::before { width: 8px; height: 8px; top: -4px; left: -5px; }

@keyframes meter-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes needle-in { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }

/* --- nagłówek danych jednostki: liczba + fakty --------------------------------------------------------------- */
.unit-hero { display: grid; gap: 40px; margin-top: 32px; }
@media (min-width: 960px) { .unit-hero { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 72px; margin-top: 48px; align-items: end; } }

.facts { margin: 0; border-top: 1px solid var(--rule-strong); }
.facts div { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.facts dt { color: var(--ink-2); font-size: 15px; line-height: 1.35; }
.facts dd { margin: 0; font: 500 30px/1 var(--serif); font-variant-numeric: tabular-nums lining-nums; text-align: right; white-space: nowrap; }
.facts dd small { font: 400 14px var(--sans); color: var(--ink-2); margin-left: 4px; }

/* --- następny krok / oferty ------------------------------------------------------------------------------- */
.next { background: var(--paper-3); border-top: 3px solid var(--ink); padding: 24px 20px; }
@media (min-width: 900px) { .next { padding: 28px; } }
.next h2 { font-size: 28px; margin-bottom: 10px; }
.next p { color: var(--ink-2); font-size: 16px; }
.next ul { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.next li a { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.next li a::after { content: "→"; grid-row: 1 / span 2; grid-column: 2; transition: transform 0.45s var(--ease); }
.next li a:hover::after { transform: translateX(4px); color: var(--signal); }
.next li b { font-weight: 600; }
.next li span { font-size: 14px; color: var(--ink-2); }

.offer { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 16px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.offer .price { font: 500 30px/1 var(--serif); font-variant-numeric: tabular-nums; text-align: right; }
.offer .btn { grid-column: 1 / -1; min-height: 46px; }
.code { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.92em; background: var(--paper-2); padding: 1px 6px; }
.disclosure { font-size: 13px; color: var(--ink-2); margin-top: 12px; }

/* --- tabele ------------------------------------------------------------------------------------------------ */
table { border-collapse: collapse; width: 100%; font-size: 16px; }
caption { text-align: left; font: 600 13px/1.3 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-2); padding: 0 0 10px; }
th, td { text-align: left; padding: 12px 10px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
thead th { font-size: 13px; font-weight: 600; color: var(--ink-2); border-bottom: 1.5px solid var(--rule-strong); }
th a { color: inherit; }
th a[aria-current="true"] { color: var(--ink); text-decoration-thickness: 2px; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; padding-right: 0; padding-left: 10px; white-space: nowrap; }
tbody tr:hover { background: var(--paper-2); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; background: linear-gradient(to right, var(--paper) 30%, transparent), linear-gradient(to left, var(--paper) 30%, transparent) right, linear-gradient(to right, rgb(0 0 0 / 0.12), transparent 70%), linear-gradient(to left, rgb(0 0 0 / 0.12), transparent 70%) right; background-repeat: no-repeat; background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%; background-attachment: local, local, scroll, scroll; }
.rank { color: var(--ink-3); font-size: 14px; width: 2.5em; }

/* lista jednostek z mini-skalą (województwa, powiaty, miasta) */
.unit-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); }
@media (min-width: 760px) { .unit-list.cols { columns: 2; column-gap: 48px; } .unit-list.cols li { break-inside: avoid; } }
.unit-list li { border-bottom: 1px solid var(--rule); }
.unit-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 14px 0 12px; text-decoration: none; color: var(--ink); }
.unit-list .name { font: 500 21px/1.2 var(--serif); }
.unit-list a:hover .name { text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 0.15em; }
.unit-list .val { font: 500 21px/1.2 var(--serif); font-variant-numeric: tabular-nums; text-align: right; }
.unit-list .sub { grid-column: 1 / -1; font-size: 14px; color: var(--ink-2); }
.unit-list .bar { grid-column: 1 / -1; position: relative; height: 4px; background: var(--paper-2); margin-top: 6px; }
.unit-list .bar i { position: absolute; top: -4px; width: 2px; height: 12px; background: var(--ink); }
.unit-list .bar s { position: absolute; top: -2px; width: 1px; height: 8px; border-left: 1.5px dotted var(--ink-3); text-decoration: none; }

.link-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); column-gap: 32px; border-top: 1px solid var(--rule); }
.link-list li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--rule); }
.link-list a { padding: 11px 0; display: block; }
.link-list .n { color: var(--ink-2); font-size: 15px; font-variant-numeric: tabular-nums; align-self: center; }

.inline-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 4px; font-size: 18px; }
.inline-list li:not(:last-child)::after { content: "·"; color: var(--ink-3); margin-left: 6px; }
.inline-list a { display: inline-block; padding: 8px 0; }

/* tekst danych: akapity bezpośrednio pod nagłówkiem, pierwszy jako lead */
.data-text h2 { margin-bottom: 20px; }
.data-text p { max-width: var(--measure); }
.data-text h2 + p { font: 400 clamp(21px, 2.8vw, 25px)/1.45 var(--serif); color: var(--ink); }

/* --- wykres rozkładu EP (SVG z serwera) ---------------------------------------------------------------------- */
figure { margin: 0; }
figure svg rect { rx: 0; }
figcaption, figure .tiny { font-size: 14px; color: var(--ink-2); margin-top: 10px; }
.chart { border-top: 1px solid var(--rule-strong); padding-top: 20px; }

/* --- pytania i odpowiedzi ---------------------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--rule-strong); }
details { margin: 0; }
.faq details, .prose details { border-bottom: 1px solid var(--rule); }
.faq summary, .prose summary { cursor: pointer; list-style: none; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: baseline; padding: 18px 0; font: 500 21px/1.3 var(--serif); }
.faq summary::-webkit-details-marker, figure summary::-webkit-details-marker { display: none; }
.faq summary::after, .prose summary::after { content: "+"; font: 400 26px/1 var(--sans); color: var(--ink-2); transition: transform 0.4s var(--ease); }
.faq details[open] summary::after, .prose details[open] summary::after { transform: rotate(45deg); color: var(--signal); }
.faq details > :not(summary) { max-width: var(--measure); color: var(--ink-2); }
.faq details[open] > :last-child { margin-bottom: 20px; }
figure summary { cursor: pointer; font: 600 14px var(--sans); padding: 10px 0; }

/* --- treść redakcyjna (poradniki, strony serwisu) ----------------------------------------------------------- */
.article-head { padding: 28px 0 0; max-width: 860px; }
@media (min-width: 900px) { .article-head { padding-top: 56px; } }
.prose img { display: block; max-width: 100%; height: auto; margin: 24px 0; }
.article-hero { max-width: 860px; margin: 28px 0 0; }
.article-hero img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; }
.article-head h1 { font-size: clamp(36px, 7.4vw, 64px); }
.byline { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; color: var(--ink-2); margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--rule); }

.prose { max-width: var(--measure); font-family: var(--serif-text); font-size: 20px; line-height: 1.62; }
.prose > * + * { margin-top: 1em; }
.prose p, .prose ul, .prose ol { margin: 0; }
.prose h2 { font-size: clamp(26px, 4.6vw, 34px); margin-top: 1.9em; }
.prose h3 { font-size: 23px; margin-top: 1.6em; }
.prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
.prose li + li { margin-top: 0.35em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li::marker { color: var(--ink-3); }
.prose strong { font-weight: 600; }
.prose blockquote { margin: 1.4em 0; padding: 0 0 0 20px; border-left: 3px solid var(--signal); font-size: 20px; line-height: 1.45; color: var(--ink); }
.prose blockquote p { margin: 0 0 0.5em; }
.prose blockquote p:last-child:not(:first-child) { font: 14px/1.4 var(--sans); color: var(--ink-2); margin: 0; }
.prose .table-scroll { margin: 1.4em 0; }
.prose table { font-family: var(--sans); font-size: 16px; margin: 0; min-width: 540px; }
.prose td, .prose th { padding-right: 16px; }
.prose > p:first-child::first-line { font-variant: small-caps; letter-spacing: 0.03em; }
.prose .tiny { font-family: var(--sans); }

/* --- strona główna ----------------------------------------------------------------------------------------- */
.home-hero { display: grid; gap: 48px; padding: 36px 0 0; }
@media (min-width: 960px) { .home-hero { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 72px; padding-top: 72px; align-items: end; } }
.home-hero h1 { font-size: clamp(44px, 11.5vw, 100px); line-height: 0.98; letter-spacing: -0.035em; max-width: 14.5ch; }
.home-hero h1 em { font-style: normal; color: var(--ink-3); }

.personas { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--rule-strong); }
@media (min-width: 760px) { .personas { grid-template-columns: repeat(2, 1fr); column-gap: 48px; } }
.personas li { border-bottom: 1px solid var(--rule); }
.personas a { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; padding: 22px 0; text-decoration: none; color: var(--ink); }
.personas b { font: 500 clamp(24px, 4vw, 30px)/1.15 var(--serif); }
.personas span { grid-column: 1; color: var(--ink-2); font-size: 16px; max-width: 42ch; }
.personas a::after { content: "→"; grid-column: 2; grid-row: 1; font-size: 22px; transition: transform 0.45s var(--ease); }
.personas a:hover b { text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 0.15em; }
.personas a:hover::after { transform: translateX(6px); color: var(--signal); }

.guides { list-style: none; margin: 0; padding: 0; counter-reset: guide; border-top: 1px solid var(--rule-strong); }
@media (min-width: 760px) { .guides { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 48px; } }
.guides li { border-bottom: 1px solid var(--rule); }
.guides a { display: block; padding: 18px 0; text-decoration: none; color: var(--ink); }
.guides b { display: block; font: 500 22px/1.25 var(--serif); }
.guides span { display: block; margin-top: 6px; font-size: 15px; color: var(--ink-2); }
.guides a:hover b { text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 0.15em; }

.note { border-left: 3px solid var(--signal); padding: 4px 0 4px 18px; color: var(--ink-2); max-width: 62ch; }
.note strong { color: var(--ink); }

/* --- narzędzia i formularze ---------------------------------------------------------------------------------- */
.tabs { display: flex; gap: 0; margin: 28px 0 32px; padding-bottom: 1px; box-shadow: inset 0 -1px 0 var(--rule-strong); overflow-x: auto; overflow-y: hidden; }
.tabs a { flex: none; padding: 14px 18px 12px; text-decoration: none; color: var(--ink-2); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a:first-child { padding-left: 0; }
.tabs a[aria-current] { color: var(--ink); border-bottom-color: var(--signal); }
.tool { max-width: 720px; }
.result { margin-top: 40px; border-top: 3px solid var(--ink); padding-top: 24px; }
.result h2 { font-size: clamp(28px, 5vw, 40px); }
.result .ep-band__track { display: none; }
.result .ep-band__label { margin-top: 28px; }

.stepper { display: flex; gap: 4px; margin: 0 0 6px; }
.stepper i { flex: 1; height: 4px; background: var(--rule); }
.stepper i.on { background: var(--ink); }
.step-count { font-size: 14px; color: var(--ink-2); margin: 0 0 24px; }
.back { display: inline-block; font-size: 15px; padding: 8px 0; margin-bottom: 12px; }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 56px 1fr; gap: 0 12px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.steps > li::before { content: counter(step); font: 500 44px/0.9 var(--serif); color: var(--ink-3); }
.steps h3 { font-size: 23px; margin-bottom: 6px; }
.steps p { margin: 0; color: var(--ink-2); }

ul.check { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
ul.check li { position: relative; padding: 12px 0 12px 34px; border-bottom: 1px solid var(--rule); }
ul.check li::before { content: ""; position: absolute; left: 0; top: 15px; width: 18px; height: 18px; border: 1.5px solid var(--ink); }

.definitions { margin: 0; border-top: 1px solid var(--rule); }
.definitions div { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.definitions dt { font-weight: 600; }
.definitions dd { margin: 4px 0 0; color: var(--ink-2); }

[role="alert"] { color: var(--signal-ink); font-weight: 600; border-left: 3px solid var(--signal); padding-left: 14px; }

/* --- pasmo EP w kalkulatorze ------------------------------------------------------------------------------- */
.ep-band { margin: 20px 0; }
.ep-band__track { display: flex; gap: 2px; height: 14px; }
.ep-band__seg { flex: 1; opacity: 0.28; }
.ep-band__seg--active { opacity: 1; box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.ep-band__seg--1 { background: var(--b1); }
.ep-band__seg--2 { background: var(--b2); }
.ep-band__seg--3 { background: var(--b3); }
.ep-band__seg--4 { background: var(--b4); }
.ep-band__seg--5 { background: var(--b5); }
.ep-band__label { font: 500 24px/1.2 var(--serif); margin-top: 14px; }

/* --- strona błędu ------------------------------------------------------------------------------------------ */
.error-page { padding: 48px 0 0; }
.error-page .code-big { font: 500 clamp(120px, 34vw, 260px)/0.8 var(--serif); letter-spacing: -0.05em; color: var(--ink-3); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  .site-header nav, .menu, .site-footer, .next, .search { display: none; }
  body { background: #fff; }
}
