/* Wykresy w treści — moduł .plw (Pewny Lokal, pilot 2026-11-19).
   Wzorzec: „Grafiki w treści artykułów” — role kolorów z karty strony, formy z katalogu.
   Każdy selektor zaczyna się od B = :is(.plw,#plw#plw): pasuje do .plw, a waga dwóch id
   przebija stare reguły typu `.wa-m6 #contents li` i globalne p/li/td ze style.css. */

/* ---------- Karta strony: Pewny Lokal (podstrony /odbior-mieszkania-<miasto>, szablon lp-miejskie) ---------- */
:is(.plw,#plw#plw) {
	--plw-a: #0b66a3;        /* akcent A: wyróżniony problem — granat „taśmy usterek” z systemu Sprawdź Dewelopera (blue-700), 6,1:1 */
	--plw-b: #329a64;        /* akcent B (pole): lepiej niż średnio — zieleń, 3,5:1; jaśniejsza od A (1,7:1), więc rozróżnialna bez barw */
	--plw-b-text: #1d7348;   /* akcent B jako tekst (sd-ok), 5,8:1 */
	--plw-t1: #413d4b;       /* tekst główny = nagłówki LP, 10,5:1 */
	--plw-t2: #4d4c4e;       /* tekst drugi = akapity LP, 8,5:1 */
	--plw-t3: #55666f;       /* tekst trzeci (źródło), 6,0:1 */
	--plw-line: #768893;     /* linie, osie, dane bez oceny: 3:1 do bieli i do toru */
	--plw-track: #ecf1f4;    /* tło danych (tor) — nigdy dana */
	--plw-fill: #e8f2f7;     /* pole neutralne = jasnoniebieskie sekcje LP */
	--plw-b-bg: #e4f3ea;     /* jasne tło B — tylko pod tekstem */
	--plw-pick: #413d4b;     /* kolor wyboru (zaznaczona opcja, ramka modułu) — grafit, inny niż akcent A */
	--plw-radius: 5px;       /* promień przycisków i pól LP */
	--plw-font: Ubuntu, "Segoe UI", system-ui, -apple-system, sans-serif; /* LP ładuje Ubuntu 300/500/700 */
	display: block; margin: 32px 0; padding: 0; border: 0;
	font-family: var(--plw-font); font-size: 16px; line-height: 1.45; font-weight: 300; color: var(--plw-t1);
	-webkit-font-smoothing: antialiased;
}
:is(.plw,#plw#plw) :is(p, li, ol, ul, b, span, a, td, th, label, summary, figcaption, table, div):not(.btn) {
	font-family: var(--plw-font); letter-spacing: 0; text-transform: none;
}
:is(.plw,#plw#plw) :is(ol, ul) { list-style: none; margin: 0; padding: 0; }
:is(.plw,#plw#plw) :is(p) { margin: 0; font-size: 14px; font-weight: 300; line-height: 1.45; color: var(--plw-t2); }
:is(.plw,#plw#plw) :is(li) { margin: 0; padding: 0; font-size: 16px; font-weight: 300; line-height: 1.35; color: var(--plw-t1); }
:is(.plw,#plw#plw) b { font-weight: 700; color: var(--plw-t1); }

/* ---------- Ramka: tytuł-wniosek, legenda, uwaga, źródło, dane ---------- */
:is(.plw,#plw#plw) .plw-title { display: block; margin: 0 0 16px; font-size: 20px; font-weight: 500; line-height: 1.35; text-wrap: balance; color: var(--plw-t1); caption-side: top; text-align: left; }
:is(.plw,#plw#plw) .plw-eyebrow { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--plw-pick); text-transform: uppercase; letter-spacing: .06em; }
:is(.plw,#plw#plw) .plw-eyebrow svg { width: 20px; height: 20px; flex: none; }
:is(.plw,#plw#plw) .plw-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 14px 0 0; font-size: 14px; line-height: 1.4; color: var(--plw-t2); }
:is(.plw,#plw#plw) .plw-legend > span { display: inline-flex; align-items: center; white-space: nowrap; }
:is(.plw,#plw#plw) .plw-key { display: inline-block; width: 14px; height: 14px; flex: none; vertical-align: -2px; margin-right: 6px; }
:is(.plw,#plw#plw) .plw-key--a { background: var(--plw-a); }
:is(.plw,#plw#plw) .plw-key--b { background: var(--plw-b); }
:is(.plw,#plw#plw) .plw-key--n { background: var(--plw-line); }
:is(.plw,#plw#plw) .plw-key--tick { width: 3px; height: 18px; background: var(--plw-t1); margin: 0 8px 0 5px; vertical-align: -4px; }
:is(.plw,#plw#plw) .plw-note { margin: 10px 0 0; font-size: 14px; color: var(--plw-t2); }
:is(.plw,#plw#plw) .plw-src { margin: 8px 0 0; font-size: 14px; color: var(--plw-t3); }
:is(.plw,#plw#plw) .plw-data { margin: 8px 0 0; }
:is(.plw,#plw#plw) .plw-data summary { display: inline-flex; align-items: center; min-height: 48px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--plw-t1); text-decoration: underline; text-underline-offset: 3px; }
:is(.plw,#plw#plw) .plw-data table { width: 100%; margin: 4px 0 0; border-collapse: collapse; font-size: 14px; }
:is(.plw,#plw#plw) .plw-data :is(thead, tbody, tr) { background: none; }
:is(.plw,#plw#plw) .plw-data :is(th, td) { padding: 6px 8px; border: 0; border-bottom: 1px solid var(--plw-track); background: none; font-size: 14px; font-weight: 300; line-height: 1.35; color: var(--plw-t1); text-align: right; width: auto; }
:is(.plw,#plw#plw) .plw-data :is(th[scope="row"], thead th:first-child) { text-align: left; }
:is(.plw,#plw#plw) .plw-data thead th { font-weight: 500; color: var(--plw-t2); }
:is(.plw,#plw#plw) .plw-data :is(th, td) { word-break: normal; overflow-wrap: normal; hyphens: manual; }
:is(.plw,#plw#plw) .plw-data thead th:not(:first-child) { white-space: nowrap; }

/* ---------- #1 Odchylenie od średniej Polski (.plw-dv) ---------- */
:is(.plw,#plw#plw) .plw-dv { display: grid; gap: 14px; }
:is(.plw,#plw#plw) .plw-dv__row { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; row-gap: 2px; }
:is(.plw,#plw#plw) .plw-dv__row > .plw-dv__lab { flex: 1 1 auto; }
:is(.plw,#plw#plw) .plw-dv__row > .plw-dv__val { margin-left: auto; }
:is(.plw,#plw#plw) .plw-dv__row > .plw-dv__bar { flex: 0 0 100%; order: 3; }
:is(.plw,#plw#plw) .plw-dv__lab { font-size: 16px; font-weight: 500; color: var(--plw-t1); }
:is(.plw,#plw#plw) .plw-dv__bar { position: relative; display: block; height: 24px; }
:is(.plw,#plw#plw) .plw-dv__bar::before { content: ""; position: absolute; left: calc(50% - 1px); top: 0; bottom: 0; width: 2px; background: var(--plw-line); }
:is(.plw,#plw#plw) .plw-dv__bar::after { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 2px; background: var(--plw-track); }
:is(.plw,#plw#plw) .plw-dv__fill { position: absolute; top: 4px; height: 16px; width: var(--w); z-index: 1; }
:is(.plw,#plw#plw) .is-minus .plw-dv__fill { right: 50%; background: var(--plw-a); }
:is(.plw,#plw#plw) .is-plus .plw-dv__fill { left: 50%; background: var(--plw-b); }
:is(.plw,#plw#plw) .plw-dv__val { font-size: 16px; color: var(--plw-t1); }
:is(.plw,#plw#plw) .plw-dv__val b { font-variant-numeric: tabular-nums; }
:is(.plw,#plw#plw) .is-minus .plw-dv__val b, :is(.plw,#plw#plw) .is-minus .plw-dv__word { color: var(--plw-a); }
:is(.plw,#plw#plw) .is-plus .plw-dv__val b, :is(.plw,#plw#plw) .is-plus .plw-dv__word { color: var(--plw-b-text); }
:is(.plw,#plw#plw) .plw-dv__word { font-size: 14px; font-weight: 500; }
:is(.plw,#plw#plw) .plw-dv__abs { font-size: 14px; color: var(--plw-t3); white-space: nowrap; }
:is(.plw,#plw#plw) .plw-dv__axis { display: flex; justify-content: space-between; margin: 6px 0 0; font-size: 13px; color: var(--plw-t3); }
:is(.plw,#plw#plw) .plw-dv__axis span:first-child::before { content: "\2190\00a0"; }
:is(.plw,#plw#plw) .plw-dv__axis span:last-child::after { content: "\00a0\2192"; }
@media (min-width: 600px) {
	:is(.plw,#plw#plw) .plw-dv__row { display: grid; grid-template-columns: 150px 1fr 230px; align-items: center; gap: 12px; }
	:is(.plw,#plw#plw) .plw-dv__row > .plw-dv__bar { order: 0; }
	:is(.plw,#plw#plw) .plw-dv__row > .plw-dv__val { margin-left: 0; }
	:is(.plw,#plw#plw) .plw-dv__axis { margin-left: 162px; margin-right: 242px; }
}

/* ---------- Moduł do klikania: ramka wyboru + pigułki (.plw--pick) ---------- */
:is(.plw,#plw#plw).plw--pick { padding: 18px 16px 16px; border: 2px solid var(--plw-pick); border-radius: var(--plw-radius); background: var(--plw-fill); }
:is(.plw,#plw#plw) .plw-pick__cmd { margin: 0 0 10px; font-size: 14px; font-weight: 500; color: var(--plw-t1); }
:is(.plw,#plw#plw) .plw-pills { display: none; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
:is(.plw,#plw#plw) .plw-pills input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:is(.plw,#plw#plw) .plw-pills label { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; margin: 0; padding: 0 16px 0 12px; border: 1px solid var(--plw-line); border-radius: var(--plw-radius); background: #fff; box-shadow: 0 1px 2px rgba(45, 49, 54, .18);
	font-size: 15px; font-weight: 500; line-height: 1.2; color: var(--plw-t1); cursor: pointer; user-select: none; }
:is(.plw,#plw#plw) .plw-pills label::before { content: ""; width: 16px; height: 16px; flex: none; border: 2px solid var(--plw-line); border-radius: 50%; background: #fff; box-sizing: border-box; }
:is(.plw,#plw#plw) .plw-pills label:hover { border-color: var(--plw-pick); }
:is(.plw,#plw#plw) .plw-pills input:checked + label { background: var(--plw-pick); border-color: var(--plw-pick); color: #fff; box-shadow: none; }
:is(.plw,#plw#plw) .plw-pills input:checked + label::before { border-color: #fff; background: #fff; box-shadow: inset 0 0 0 3px var(--plw-pick); }
:is(.plw,#plw#plw) .plw-pills input:focus-visible + label { outline: 3px solid var(--plw-a); outline-offset: 2px; }
:is(.plw,#plw#plw) .plw-rk__panel + .plw-rk__panel { margin-top: 20px; }
:is(.plw,#plw#plw) .plw-rk__now { margin: 0 0 8px; font-size: 14px; color: var(--plw-t2); }
@supports selector(:has(*)) {
	:is(.plw,#plw#plw) .plw-pills { display: flex; }
	:is(.plw,#plw#plw) .plw-rk__panel { display: none; }
	:is(.plw,#plw#plw) .plw-rk__panel + .plw-rk__panel { margin-top: 0; }
	:is(.plw,#plw#plw) .plw-rk:has(input[value="ogolna"]:checked) .plw-rk__panel[data-k="ogolna"],
	:is(.plw,#plw#plw) .plw-rk:has(input[value="failuresNo"]:checked) .plw-rk__panel[data-k="failuresNo"],
	:is(.plw,#plw#plw) .plw-rk:has(input[value="failuresImportance"]:checked) .plw-rk__panel[data-k="failuresImportance"],
	:is(.plw,#plw#plw) .plw-rk:has(input[value="service"]:checked) .plw-rk__panel[data-k="service"],
	:is(.plw,#plw#plw) .plw-rk:has(input[value="tynki"]:checked) .plw-rk__panel[data-k="tynki"],
	:is(.plw,#plw#plw) .plw-rk:has(input[value="wylewki"]:checked) .plw-rk__panel[data-k="wylewki"],
	:is(.plw,#plw#plw) .plw-rk:has(input[value="okna"]:checked) .plw-rk__panel[data-k="okna"],
	:is(.plw,#plw#plw) .plw-rk:has(input[value="zawilgocenia"]:checked) .plw-rk__panel[data-k="zawilgocenia"] { display: block; }
}

/* ---------- #2 Ranking (.plw-rk) ---------- */
:is(.plw,#plw#plw) .plw-rk__list { display: grid; gap: 10px; }
:is(.plw,#plw#plw) .plw-rk__row { display: grid; grid-template-columns: 28px 1fr auto; grid-template-areas: "pos name val" ". bar bar"; align-items: baseline; column-gap: 8px; row-gap: 4px; }
:is(.plw,#plw#plw) .plw-rk__pos { grid-area: pos; font-size: 16px; font-weight: 700; color: var(--plw-t3); font-variant-numeric: tabular-nums; }
:is(.plw,#plw#plw) .plw-rk__name { grid-area: name; font-size: 16px; font-weight: 500; color: var(--plw-t1); text-decoration: underline; text-decoration-color: var(--plw-line); text-underline-offset: 3px; overflow-wrap: anywhere; }
:is(.plw,#plw#plw) .plw-rk__name:hover { color: var(--plw-a); text-decoration-color: currentColor; }
:is(.plw,#plw#plw) .plw-rk__bar { grid-area: bar; position: relative; display: block; height: 12px; background: var(--plw-track); }
:is(.plw,#plw#plw) .plw-rk__bar span { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); background: var(--plw-line); }
:is(.plw,#plw#plw) .plw-rk__val { grid-area: val; display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap; }
:is(.plw,#plw#plw) .plw-rk__val b { font-size: 17px; font-variant-numeric: tabular-nums; }
:is(.plw,#plw#plw) .plw-rk__n { font-size: 13px; color: var(--plw-t3); }
@media (min-width: 600px) {
	:is(.plw,#plw#plw) .plw-rk__row { grid-template-columns: 28px minmax(140px, 230px) 1fr 150px; grid-template-areas: "pos name bar val"; align-items: center; column-gap: 12px; }
}

/* ---------- #6 Odsetek z kreską Polski (.plw-hb) ---------- */
:is(.plw,#plw#plw) .plw-hb { display: grid; gap: 14px; }
:is(.plw,#plw#plw) .plw-hb__row { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; row-gap: 2px; }
:is(.plw,#plw#plw) .plw-hb__row > .plw-hb__lab { flex: 1 1 auto; }
:is(.plw,#plw#plw) .plw-hb__row > .plw-hb__val { margin-left: auto; white-space: nowrap; }
:is(.plw,#plw#plw) .plw-hb__row > .plw-hb__bar { flex: 0 0 100%; order: 3; }
:is(.plw,#plw#plw) .plw-hb__lab { font-size: 16px; font-weight: 500; color: var(--plw-t1); }
:is(.plw,#plw#plw) .plw-hb__bar { position: relative; display: block; height: 24px; }
:is(.plw,#plw#plw) .plw-hb__bar::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 16px; background: var(--plw-track); }
:is(.plw,#plw#plw) .plw-hb__fill { position: absolute; left: 0; top: 4px; height: 16px; width: var(--w); background: var(--plw-line); }
:is(.plw,#plw#plw) .is-hl .plw-hb__fill { background: var(--plw-a); }
:is(.plw,#plw#plw) .plw-hb__pl { position: absolute; top: 0; bottom: 0; left: calc(var(--w) - 1.5px); width: 3px; background: var(--plw-t1); box-shadow: 0 0 0 2px #fff; z-index: 1; }
:is(.plw,#plw#plw) .plw-hb__val { font-size: 16px; color: var(--plw-t1); }
:is(.plw,#plw#plw) .plw-hb__val b { font-size: 17px; font-variant-numeric: tabular-nums; }
:is(.plw,#plw#plw) .is-hl .plw-hb__val b { color: var(--plw-a); }
:is(.plw,#plw#plw) .plw-hb__flag { display: inline-block; margin-left: 8px; padding: 1px 6px; border: 1px solid var(--plw-a); font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--plw-a); white-space: nowrap; vertical-align: 1px; }
@media (min-width: 600px) { B .plw-hb__flag { display: block; width: max-content; margin: 2px 0 0; } }
:is(.plw,#plw#plw) .plw-hb__ref { margin-left: 6px; font-size: 14px; color: var(--plw-t3); white-space: nowrap; }
:is(.plw,#plw#plw) .plw-hb__axis { position: relative; display: flex; justify-content: space-between; margin: 6px 0 0; font-size: 13px; color: var(--plw-t3); }
@media (min-width: 600px) {
	:is(.plw,#plw#plw) .plw-hb__row { display: grid; grid-template-columns: 200px 1fr 170px; align-items: center; gap: 12px; }
	:is(.plw,#plw#plw) .plw-hb__row > .plw-hb__bar { order: 0; }
	:is(.plw,#plw#plw) .plw-hb__row > .plw-hb__val { margin-left: 0; }
	:is(.plw,#plw#plw) .plw-hb__axis { margin-left: 212px; margin-right: 182px; }
}

/* ---------- Blok usługi (jeden na stronę); przycisk to .btn.btn-primary.btn-cta strony ---------- */
:is(.plw,#plw#plw) .plw-offer { margin: 20px 0 0; padding: 16px; background: var(--plw-fill); border-radius: var(--plw-radius); }
:is(.plw,#plw#plw) .plw-offer__name { margin: 0 0 4px; font-size: 18px; font-weight: 500; color: var(--plw-t1); }
:is(.plw,#plw#plw) .plw-offer__txt { margin: 0 0 14px; font-size: 16px; font-weight: 300; line-height: 1.45; color: var(--plw-t2); }
:is(.plw,#plw#plw) .plw-offer__btn { min-height: 48px; display: inline-flex; align-items: center; }

/* ---------- Sekcja na LP: nagłówek jak „Galeria usterek” (Ubuntu 500, 2rem, środek) ---------- */
:is(.plw-sekcja,#plw#plw) { padding-block: 40px 16px; }
:is(.plw-sekcja,#plw#plw) .plw-sekcja__head { max-width: 900px; margin: 0 auto; padding: 0 16px; text-align: center; }
:is(.plw-sekcja,#plw#plw) .plw-sekcja__head h2 { margin: 0 0 12px; font-family: Ubuntu, "Segoe UI", system-ui, sans-serif; font-size: 2rem; font-weight: 500; line-height: 1.2; color: #413d4b; text-transform: none; letter-spacing: 0; }
:is(.plw-sekcja,#plw#plw) .plw-sekcja__head p { margin: 0; font-family: Ubuntu, "Segoe UI", system-ui, sans-serif; font-size: 1.25rem; font-weight: 500; line-height: 1.3; color: #413d4b; }
:is(.plw-sekcja,#plw#plw) .plw-sekcja__col { max-width: 760px; margin: 0 auto; padding: 0 16px; }
@media (max-width: 599px) { :is(.plw-sekcja,#plw#plw) .plw-sekcja__head h2 { font-size: 1.6rem; } :is(.plw-sekcja,#plw#plw) .plw-sekcja__head p { font-size: 1.05rem; } }
