/* Układ na wzór serwisu Gminy Dzwola: pasek usług, nagłówek z logo i kontaktem, menu z ikonami,
   baner, sekcje z podkreślonym tytułem, kafelki „Na skróty”, stopka z kontaktem i godzinami.
   Kolory z Księgi Znaku Gminy Chrzanów (zał. nr 2 do uchwały Rady Gminy z 24 sierpnia 2026 r.):
   zieleń #024018 i #7ba61f, złoto #eaa409, pomarańcz #d98e04 / #d97904, biel.
   Jasna zieleń i złoto mają za mały kontrast dla tekstu na bieli, więc służą jako ozdobniki,
   a tekst i linki używają przyciemnionych odcieni (#456b12, #9a5600) – kontrast co najmniej 4,5:1.
   Jeden, jasny motyw (jak w serwisach JST) + tryb wysokiego kontrastu. */
:root {
  color-scheme: light;
  --navy: #024018;          /* ciemna zieleń logo – menu i stopka */
  --navy-2: #0a5226;
  --accent: #456b12;        /* zieleń logo (#7ba61f) przyciemniona do AA – linki, ikony */
  --accent-line: #eaa409;   /* złoto logo – podkreślenia i ozdobniki */
  --leaf: #7ba61f;          /* jasna zieleń logo – tylko ozdobniki */
  --brand: #9a5600;         /* pomarańcz logo (#d97904) przyciemniony do AA */
  --bg: #ffffff;
  --bg-2: #f4f7f1;
  --fg: #212529;
  --muted: #555c63;
  --line: #dfe6da;
  --on-navy: #ffffff;
  --on-navy-muted: #cfe0c8;
  --focus: #eaa409;
  --font: "Open Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --wrap: 75rem;
  --radius: 8px;
  --shadow: 0 2px 10px rgba(2, 64, 24, .08);
}
:root[data-contrast="high"] {
  color-scheme: dark;
  --navy: #000; --navy-2: #000; --accent: #ffeb00; --accent-line: #ffeb00; --leaf: #ffeb00; --brand: #ffeb00;
  --bg: #000; --bg-2: #000; --fg: #fff; --muted: #fff; --line: #ffeb00; --on-navy: #ffeb00; --on-navy-muted: #fff; --focus: #00e5ff;
  --shadow: none;
}
:root[data-fs="1"] { font-size: 112.5% }
:root[data-fs="2"] { font-size: 125% }

* { box-sizing: border-box }
[hidden] { display: none !important }
html { scroll-behavior: smooth }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto } *, *::before, *::after { transition: none !important; animation: none !important } }
body { background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 1rem; line-height: 1.6 }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--navy) }
h1, h2, h3, h4 { line-height: 1.25; text-wrap: balance; margin: 0; font-weight: 600 }
h1 { font-size: 2rem } h2 { font-size: 1.875rem } h3 { font-size: 1.2rem }
p { margin: 0 }
a { color: var(--accent); text-underline-offset: .18em }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)) }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
.skip { position: absolute; left: 8px; top: -60px; background: var(--navy); color: var(--on-navy); padding: .5rem 1rem; z-index: 60; font-weight: 700 }
.skip:focus { top: calc(8px + env(safe-area-inset-top, 0px)) }
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em }
.ext::after { content: " ↗"; font-size: .85em }

/* Pasek usług */
.utility { background: var(--bg-2); border-bottom: 1px solid var(--line); font-size: .875rem }
.utility .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem; padding-block: .45rem }
.utility ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; align-items: center }
.utility li { display: flex; align-items: center; gap: .35rem; color: var(--fg) }
.utility a { color: var(--fg); text-decoration: none }
.utility a:hover { color: var(--accent); text-decoration: underline }
.utility .ico { color: var(--accent) }
.services a { font-weight: 800; letter-spacing: .02em }
.services .epuap { color: var(--navy) } .services .bip { color: #c41e3a }
.a11y { display: flex; gap: .3rem }
.a11y button { font: inherit; font-size: .85rem; font-weight: 700; min-height: 34px; min-width: 38px; padding: .1rem .55rem; border: 1px solid var(--line); background: var(--bg); color: var(--navy); border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; gap: .3rem }
.a11y button[aria-pressed="true"] { background: var(--navy); color: var(--on-navy) }
:root[data-contrast="high"] .a11y button { color: #ffeb00 }

/* Nagłówek */
.brandbar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-block: 1.1rem }
.logo { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--fg) }
.logo img { height: 92px; width: auto; display: block }
:root[data-contrast="high"] .logo img, :root[data-contrast="high"] .f-brand img { background: #fff; border-radius: 6px; padding: 4px }
.logo-text { line-height: 1.05; text-transform: uppercase }
.logo-text span { display: block; font-size: 1.45rem; font-weight: 500; color: var(--muted) }
.logo-text strong { display: block; font-size: 2rem; font-weight: 800; color: var(--fg) }
.contacts { display: flex; flex-wrap: wrap; gap: 1rem 2rem }
.contact { display: flex; align-items: center; gap: .75rem; font-size: .95rem }
.contact .box { width: 44px; height: 44px; border-radius: 6px; background: var(--bg-2); display: grid; place-items: center; color: var(--navy); flex: none }
:root[data-contrast="high"] .contact .box { border: 1px solid #ffeb00; color: #ffeb00 }
.contact b { display: block; font-weight: 700 }
.contact .ico { width: 1.3rem; height: 1.3rem }
@media (max-width: 720px) { .contacts { display: none } .logo img { height: 68px } .logo-text strong { font-size: 1.6rem } .logo-text span { font-size: 1.15rem } }

/* Menu główne */
.mainnav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 25 }
.mainnav .wrap { position: relative }
.navbar { background: var(--navy); box-shadow: 0 4px 14px rgba(2, 64, 24, .25); display: flex; flex-wrap: wrap; align-items: stretch }
:root[data-contrast="high"] .navbar { border: 2px solid #ffeb00 }
.menu-toggle { display: none; font: inherit; font-weight: 700; color: var(--on-navy); background: transparent; border: 0; padding: .9rem 1rem; cursor: pointer; align-items: center; gap: .5rem; text-transform: uppercase; letter-spacing: .03em }
.menu { list-style: none; margin: 0; padding: 0; display: flex; flex: 1; flex-wrap: nowrap }
.menu > li { position: relative; flex: 1 1 0; min-width: 0; border-right: 1px solid rgba(255, 255, 255, .12) }
.menu > li:last-child { border-right: 0 }
.menu > li > a, .menu > li > button { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; gap: .55rem; padding: .7rem .6rem; color: var(--on-navy); background: transparent; border: 0; font: inherit; font-size: .84rem; font-weight: 600; text-transform: uppercase; text-decoration: none; letter-spacing: .02em; cursor: pointer; line-height: 1.25; text-align: left }
.menu > li > a:hover, .menu > li > button:hover, .menu > li > button[aria-expanded="true"], .menu > li.current > a, .menu > li.current > button { background: var(--navy-2) }
.menu > li.current > a, .menu > li.current > button { box-shadow: inset 0 -4px 0 var(--accent-line) }
.menu .ico { width: 1.25rem; height: 1.25rem; color: var(--on-navy-muted) }
.caret { width: .7rem; height: .7rem; transition: transform .15s }
button[aria-expanded="true"] .caret { transform: rotate(180deg) }
.submenu { list-style: none; margin: 0; padding: .4rem 0; position: absolute; left: 0; top: 100%; min-width: 17rem; background: var(--bg); border-top: 4px solid var(--accent-line); box-shadow: 0 10px 28px rgba(0, 0, 0, .18); z-index: 30 }
:root[data-contrast="high"] .submenu { border: 2px solid #ffeb00 }
.submenu a { display: block; padding: .55rem 1.1rem; color: var(--fg); text-decoration: none; font-size: .95rem }
.submenu a:hover, .submenu a:focus-visible { background: var(--bg-2); color: var(--accent) }
.submenu a[aria-current="page"] { font-weight: 700; color: var(--accent) }
@media (max-width: 1000px) {
  .menu-toggle { display: inline-flex }
  .menu { display: none; flex-direction: column; flex-basis: 100% }
  .menu > li { flex: none }
  .navbar.open .menu { display: flex }
  .menu > li { border-right: 0; border-top: 1px solid rgba(255, 255, 255, .12) }
  .menu > li > a, .menu > li > button { justify-content: flex-start; padding: .8rem 1rem }
  .submenu { position: static; min-width: 0; box-shadow: none; border-top: 0; background: var(--navy-2) }
  .submenu a { color: var(--on-navy); padding-left: 2.9rem }
  .submenu a:hover, .submenu a:focus-visible { background: rgba(255, 255, 255, .08); color: var(--on-navy) }
  .submenu a[aria-current="page"] { color: var(--on-navy); text-decoration: underline }
}

/* Baner */
.banner { position: relative; margin-top: -1.6rem; background: var(--navy); overflow: hidden }
.banner svg.scene { display: block; width: 100%; height: clamp(220px, 32vw, 380px) }
.banner .caption { position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%); width: min(36rem, calc(100% - 32px)); background: var(--navy); color: var(--on-navy); text-align: center; padding: 1rem 1.25rem; font-weight: 600; box-shadow: var(--shadow) }
.banner .caption small { display: block; font-weight: 400; color: var(--on-navy-muted); margin-top: .2rem }
:root[data-contrast="high"] .banner .caption { border: 2px solid #ffeb00 }

/* Sekcje */
main { display: block }
.section { padding-block: 3rem }
.section.alt { background: var(--bg-2) }
.sec-title { margin-bottom: 1.75rem }
.sec-title h2 { font-size: 1.875rem; font-weight: 600; padding-bottom: .6rem; border-bottom: 1px solid var(--line); position: relative }
.sec-title h2::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 3.75rem; height: 3px; background: var(--accent-line) }
.sec-title p { font-style: italic; margin-top: .8rem; color: var(--fg) }
.center { text-align: center; margin-top: 2rem }
.btn { display: inline-flex; align-items: center; gap: .45rem; font: inherit; font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; background: var(--navy); color: var(--on-navy); padding: .7rem 1.1rem; border: 0; border-radius: 3px; text-decoration: none; cursor: pointer; min-height: 44px }
.btn:hover { background: var(--navy-2) }
:root[data-contrast="high"] .btn { border: 2px solid #ffeb00 }
.btn-light { display: inline-flex; align-items: center; gap: .35rem; font-size: .9rem; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: .35rem .8rem; text-decoration: none; box-shadow: 0 1px 4px rgba(0, 0, 0, .06) }
.btn-light:hover { border-color: var(--accent); color: var(--accent) }
.btn-light .ico { color: var(--accent); width: .9em; height: .9em }

/* Karty aktualności */
.cards3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; list-style: none; margin: 0; padding: 0 }
@media (max-width: 900px) { .cards3 { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
@media (max-width: 560px) { .cards3 { grid-template-columns: minmax(0, 1fr) } }
.ncard { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; height: 100% }
.ncard .thumb { aspect-ratio: 16 / 9; max-width: 100%; display: grid; place-items: center; color: #fff; position: relative }
.ncard .thumb svg { width: 3.2rem; height: 3.2rem; opacity: .9 }
.ncard .thumb span { position: absolute; left: .7rem; top: .7rem; background: rgba(0, 0, 0, .35); font-size: .75rem; font-weight: 600; padding: .15rem .5rem; border-radius: 3px; text-transform: uppercase; letter-spacing: .04em }
.th-1 { background: #024018 } .th-2 { background: #9a5600 } .th-3 { background: #456b12 } .th-4 { background: #0a5226 }
:root[data-contrast="high"] .ncard .thumb { background: #000; border-bottom: 1px solid #ffeb00; color: #ffeb00 }
.ncard .body { padding: 1.1rem 1.1rem 1rem; display: flex; flex-direction: column; gap: .7rem; flex: 1 }
.ncard h3 { font-size: 1.1rem; text-align: center }
.ncard h3 a { color: var(--fg); text-decoration: none }
.ncard h3 a:hover { color: var(--accent); text-decoration: underline }
.ncard p { font-size: .92rem; color: var(--fg); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden }
.ncard .foot { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: .6rem }
.ncard time { align-self: flex-end; font-size: .8rem; color: var(--muted); display: flex; gap: .3rem; align-items: center }
.ncard time .ico { color: var(--accent) }

/* Lista aktualności (podstrona) */
.news { list-style: none; margin: 0; padding: 0; display: grid; max-width: 54rem }
.news li { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line) }
.date { text-align: center; line-height: 1; background: var(--navy); color: var(--on-navy); padding: .55rem .3rem; border-radius: 4px; align-self: start }
.date b { display: block; font-size: 1.5rem; font-variant-numeric: tabular-nums }
.date span { display: block; font-size: .72rem; text-transform: uppercase; margin-top: .25rem; color: var(--on-navy-muted) }
.news h3 { font-size: 1.08rem }
.news h3 a { color: var(--fg); text-decoration: none }
.news h3 a:hover { color: var(--accent); text-decoration: underline }
.news p { color: var(--muted); font-size: .92rem; margin-top: .3rem }

/* Na skróty */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; list-style: none; margin: 0; padding: 0 }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
@media (max-width: 480px) { .tiles { grid-template-columns: minmax(0, 1fr) } }
.task { height: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.6rem 1rem 1.3rem; display: flex; flex-direction: column; align-items: center; gap: .7rem; text-align: center; text-decoration: none; color: var(--fg) }
.task:hover { border-color: var(--accent) }
.task svg { width: 2.6rem; height: 2.6rem; color: var(--accent) }
.task b { font-size: .9rem; font-weight: 600; text-transform: uppercase; letter-spacing: .02em }
.task > span > span { display: block; font-size: .85rem; color: var(--muted); margin-top: .25rem; text-transform: none }
.task .btn { pointer-events: none; padding: .45rem .8rem; min-height: 0; text-transform: none; font-size: .82rem; margin-top: auto }

/* Gmina w liczbach */
.stats { background: var(--navy); color: var(--on-navy); position: relative; overflow: hidden }
.stats::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .035) 0 22px, transparent 22px 44px) }
.stats .wrap { position: relative; padding-block: 3rem }
.stats h2 { text-align: center; font-size: 1.875rem; margin-bottom: 2rem }
.stats ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem }
@media (max-width: 760px) { .stats ul { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
.stats li { text-align: center; display: grid; gap: .3rem }
.stats b { font-size: 2.4rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1 }
.stats span { color: var(--on-navy-muted) }

/* Ważne linki */
.important { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.2rem; list-style: none; margin: 0; padding: 0 }
@media (max-width: 760px) { .important { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
.important a { display: grid; justify-items: center; gap: .6rem; text-align: center; color: var(--fg); font-weight: 600; font-size: .92rem; text-decoration: none }
.important a:hover { color: var(--accent); text-decoration: underline }
.important .badge { width: 5.5rem; height: 5.5rem; border-radius: 6px; display: grid; place-items: center; background: var(--navy); color: #fff }
.important .badge.bip { background: #fff; border: 1px solid var(--line); color: #c41e3a; font-weight: 800; font-size: 1.6rem }
.important .badge.epuap { background: #fff; border: 1px solid var(--line); color: var(--navy); font-weight: 800; font-size: 1.1rem }
.important .badge svg { width: 2.6rem; height: 2.6rem }
:root[data-contrast="high"] .important .badge { background: #000; border: 2px solid #ffeb00; color: #ffeb00 }

/* Podstrony */
.crumbbar { background: var(--bg-2); border-bottom: 1px solid var(--line); font-size: .88rem }
.crumbbar .wrap { padding-block: .7rem; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap }
.crumbbar .ico { color: var(--accent) }
.crumbbar a { color: var(--fg) }
.page { padding-block: 2.2rem 3.5rem; display: grid; gap: 2rem }
.page-title h1 { font-size: 2rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); position: relative }
.page-title h1::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 3.75rem; height: 3px; background: var(--accent-line) }
.page-title p { font-style: italic; margin-top: .8rem }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 18rem); gap: 2.5rem; align-items: start }
@media (max-width: 860px) { .cols { grid-template-columns: minmax(0, 1fr) } }
.side { display: grid; gap: 1rem; position: sticky; top: 5rem }
@media (max-width: 860px) { .side { position: static } }
.sidebox { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg) }
.sidebox h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .03em; background: var(--navy); color: var(--on-navy); padding: .7rem 1rem }
.sidebox nav, .sidebox .in { display: grid }
.sidebox .in { padding: 1rem; gap: .6rem; font-size: .92rem }
.sidebox nav a { padding: .6rem 1rem; border-top: 1px solid var(--line); color: var(--fg); text-decoration: none; display: flex; justify-content: space-between; gap: .5rem }
.sidebox nav a:first-child { border-top: 0 }
.sidebox nav a:hover { color: var(--accent); background: var(--bg-2) }
.sidebox nav a[aria-current="page"] { color: var(--accent); font-weight: 700; box-shadow: inset 4px 0 0 var(--accent-line) }
.prose { max-width: 70ch; display: grid; gap: 1rem }
.prose h2 { font-size: 1.4rem; margin-top: .5rem }
.prose ul, .prose ol { margin: 0; padding-left: 1.2rem }
.dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .35rem 1rem; margin: 0; font-size: .92rem }
.dl dt { color: var(--muted) }
.dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; font-variant-numeric: tabular-nums }
.links { list-style: none; margin: 0; padding: 0; display: grid }
.links a { display: block; padding: .55rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--fg) }
.links a:hover { color: var(--accent); text-decoration: underline }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: 1.2rem }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem; display: grid; gap: .55rem; align-content: start }
.card h2, .card h3 { font-size: 1.08rem }
.card h3 a { color: var(--fg); text-decoration: none } .card h3 a:hover { color: var(--accent); text-decoration: underline }
.card .meta { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600 }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius) }
table { border-collapse: collapse; width: 100%; font-size: .93rem }
th, td { text-align: left; padding: .6rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top }
thead th { background: var(--navy); color: var(--on-navy); font-weight: 600 }
tbody th { background: var(--bg-2); font-weight: 600 }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0 }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap }
.filter { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; max-width: 54rem }
.filter label { display: grid; gap: .25rem; font-size: .88rem; font-weight: 600; flex: 1 1 16rem }
.filter input, .filter select { font: inherit; padding: .55rem .75rem; border: 1px solid #aab3bd; border-radius: 4px; background: var(--bg); color: var(--fg); min-height: 44px }
.count { font-size: .88rem; color: var(--muted) }
.copy { font: inherit; font-size: .78rem; border: 1px solid var(--line); background: var(--bg); color: var(--accent); border-radius: 4px; padding: .05rem .45rem; cursor: pointer; margin-left: .35rem }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line) }
.timeline li { padding: 0 0 1.1rem 1.25rem; position: relative }
.timeline li::before { content: ""; position: absolute; left: -7px; top: .45rem; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent-line) }
.timeline b { color: var(--navy); font-variant-numeric: tabular-nums }
:root[data-contrast="high"] .timeline b { color: #ffeb00 }
.note { font-size: .88rem; color: var(--muted); border-left: 3px solid var(--accent-line); padding: .5rem .9rem; background: var(--bg-2) }
.alertbar { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; align-items: center; padding: .9rem 1.1rem; background: var(--bg); border: 1px solid var(--line); border-left: 5px solid #c41e3a; border-radius: 4px }
.alertbar b { color: #a3172e }
:root[data-contrast="high"] .alertbar b { color: #ffeb00 }

/* Stopka */
footer { background: var(--navy); color: var(--on-navy); font-size: .93rem }
:root[data-contrast="high"] footer { border-top: 2px solid #ffeb00 }
footer a { color: var(--on-navy); text-decoration: none }
footer a:hover { text-decoration: underline }
.f-top { border-bottom: 1px solid rgba(255, 255, 255, .12) }
.f-top .wrap { padding-block: 1rem; text-align: center }
.f-brand { text-align: center; padding-block: 2.2rem 1rem; display: grid; justify-items: center; gap: .6rem }
.f-brand img { width: 210px; height: auto; background: #fff; border-radius: 10px; padding: 14px 18px; display: block }
.f-brand b { font-size: 1.6rem; font-weight: 500 }
.f-brand span { color: var(--on-navy-muted) }
.f-brand::after { content: ""; width: 3.75rem; height: 3px; background: var(--accent-line) }
.f-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; padding-block: 1.5rem 2.5rem }
@media (max-width: 760px) { .f-cols { grid-template-columns: minmax(0, 1fr) } }
.f-cols h2 { font-size: 1.2rem; font-weight: 500; display: flex; gap: .5rem; align-items: center; padding-bottom: .6rem; border-bottom: 1px solid rgba(255, 255, 255, .2); margin-bottom: .8rem }
.f-cols h2 .ico { color: var(--accent-line) }
.f-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem }
.f-cols li { display: flex; gap: .55rem; align-items: flex-start }
.f-cols li .ico { color: var(--on-navy-muted); margin-top: .2em }
.f-base { border-top: 1px solid rgba(255, 255, 255, .12) }
.f-base .wrap { padding-block: 1rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; color: var(--on-navy-muted); font-size: .85rem }
.totop { position: fixed; right: max(16px, calc(env(safe-area-inset-right, 0px) + 12px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40; background: var(--navy); color: var(--on-navy); border: 1px solid rgba(255, 255, 255, .3); width: 64px; padding: .45rem .2rem; text-align: center; font-size: .62rem; font-weight: 700; text-transform: uppercase; text-decoration: none; line-height: 1.2; display: grid; justify-items: center; gap: .1rem }
.totop svg { width: 1.4rem; height: 1.4rem }

/* Szablon wielostronicowy */
.banner img.scene { display: block; width: 100%; height: clamp(220px, 32vw, 400px); object-fit: cover }
.ncard .thumb.photo { background: var(--bg-2); display: block; overflow: hidden }
.ncard .thumb.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block }
.years { display: flex; flex-wrap: wrap; gap: .4rem }
.years a { padding: .3rem .75rem; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; color: var(--fg); font-size: .9rem }
.years a[aria-current="page"] { background: var(--navy); color: var(--on-navy); border-color: var(--navy) }
.pager { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem }
.pager a { font-weight: 600 }
.meta-line { display: flex; gap: .4rem; align-items: center; font-style: normal !important; color: var(--muted) }
.meta-line .ico { color: var(--accent) }
.article img { max-width: 100%; height: auto }
.article figure { margin: 0 }
.article iframe, .article video { max-width: 100% }
.article table { display: block; overflow-x: auto }
.article .wp-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr)); gap: .5rem }
.hero-img img { width: 100%; height: auto; border-radius: var(--radius) }
.attach { display: grid; gap: .3rem; padding: 1rem; background: var(--bg-2); border-radius: var(--radius) }
.prose.wide { max-width: none }
.prose { grid-template-columns: minmax(0, 1fr); overflow-wrap: break-word }
.prose a { overflow-wrap: anywhere }

/* Ilustracje dobrane do treści (wpisy i działy bez zdjęć) */
.ncard .thumb.ilu { background: #f6f8ef }
.ncard .thumb.ilu span { z-index: 1; background: var(--navy); color: #fff }
.hero-img.ilu img { aspect-ratio: 21 / 9; object-fit: cover; max-height: 340px }
.page-title.has-ilu .page-ilu { display: block; width: 100%; height: 150px; object-fit: cover; object-position: right center; border-radius: var(--radius); margin-bottom: 1.4rem }
@media (max-width: 640px) { .page-title.has-ilu .page-ilu { height: 96px } }
:root[data-contrast="high"] .page-ilu, :root[data-contrast="high"] .hero-img.ilu { display: none !important }
:root[data-contrast="high"] .ncard .thumb.ilu img { filter: grayscale(1) contrast(1.4) }
@media print { .page-ilu, .hero-img.ilu { display: none } }

/* Pasek ważnych komunikatów i ostrzeżeń (na górze każdej strony) */
.warnbar { background: #fff4d6; border-bottom: 3px solid var(--accent-line) }
.warnbar .wrap { display: grid; gap: .35rem; padding-top: .6rem; padding-bottom: .6rem }
.warnbar .wb { margin: 0; padding-left: 1.9rem; position: relative; line-height: 1.45 }
.warnbar .wb::before { content: "!"; position: absolute; left: 0; top: .05rem; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: #9a5600; color: #fff; font-weight: 800; display: grid; place-items: center; font-size: .85rem }
.warnbar .wb.info::before { content: "i"; background: var(--navy) }
.warnbar .wb.alarm, .warnbar .wb.st3 { color: #7a1010 }
.warnbar .wb.alarm::before, .warnbar .wb.st3::before { background: #b42318 }
.warnbar a { font-weight: 700; color: inherit }
/* Widżet ostrzeżeń */
.ww { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; max-width: 64rem; margin: 0 auto }
@media (min-width: 52rem) { .ww { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch } }
.ww-ostrz, .ww-pogoda { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.15rem; display: flex; flex-direction: column; gap: .8rem }
.ww-ostrz { border-top: 4px solid #2e7d32 } .ww-ostrz.alarm { border-top-color: #b42318 }
.ww-pogoda { border-top: 4px solid #2f6fb0 }
.ww-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem }
.ww h3 { font-size: 1.05rem; display: flex; gap: .45rem; align-items: center; margin: 0 }
.ww h3 .ico { width: 1.3rem; height: 1.3rem; flex: none }
.ww-ostrz h3 .ico { color: #2e7d32 } .ww-ostrz.alarm h3 .ico { color: #b42318 } .ww-pogoda h3 .ico { color: #2f6fb0 }
.ww-czas { font-size: .8rem; color: var(--muted) }
.ww-stan { display: grid; gap: .8rem; flex: 1; align-content: start }
.ww-czekaj, .ww-nd { color: var(--muted); font-size: .9rem; margin: 0 }
.ww-src { font-size: .76rem; color: var(--muted); margin: 0; border-top: 1px solid var(--line); padding-top: .5rem }
/* ostrzeżenia */
.ww-brak { display: flex; gap: .85rem; align-items: center; background: #e9f5ea; border-radius: 8px; padding: 1rem 1.1rem; color: #1e6b23 }
.ww-brak svg { width: 2.6rem; height: 2.6rem; flex: none; color: #2e7d32 }
.ww-brak div { display: grid; gap: .15rem } .ww-brak b { font-size: 1.35rem; color: #1e6b23 } .ww-brak span { font-size: .86rem; color: #2f4f31 }
.ww-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem }
.wo { border-left: 4px solid #e0a100; background: #fff7df; border-radius: 4px; padding: .5rem .75rem; display: grid; gap: .12rem; font-size: .92rem }
.wo.st2 { border-left-color: #d97904; background: #ffeedd } .wo.st3 { border-left-color: #b42318; background: #fde8e6 }
.wo.r-prad { border-left-color: #9a5600 } .wo.r-prognoza { border-left-color: #2f6fb0; background: #eaf2fb }
.wo b { line-height: 1.3 } .wo b a { color: inherit }
.wo-typ { font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #6b3c00 }
.wo.st3 .wo-typ { color: #8f1c13 } .wo.r-prognoza .wo-typ { color: #1f4f80 }
.wo-o { font-size: .84rem; color: var(--muted) } .wo details { font-size: .86rem }
.ww-rcb-inne { font-size: .86rem } .ww-rcb-inne > span { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted) }
.ww-rcb-inne ul { list-style: none; margin: .3rem 0 0; padding: 0; display: grid; gap: .3rem }
.ww-rcb-inne li { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: .4rem } .ww-rcb-inne time { color: var(--muted) }
.ww-rcb-inne a { color: var(--fg) }
.ww-extra { font-size: .84rem; margin: 0; color: var(--muted) } .ww-extra b { font-weight: 700 }
.aq0, .aq1 { color: var(--accent) } .aq2, .aq3 { color: #8a5a00 } .aq4, .aq5 { color: #b42318 }
/* pogoda */
.ww-teraz { display: flex; gap: 1rem; align-items: center; border-radius: 10px; padding: .8rem 1rem; color: #fff; background: linear-gradient(135deg, #3c78b5, #6fa3d6) }
.ww-teraz.n-slonce, .ww-teraz.n-slonce-chmura { background: linear-gradient(135deg, #2f78c4, #7fb7e8) }
.ww-teraz.n-chmura, .ww-teraz.n-mgla { background: linear-gradient(135deg, #546778, #8da0b1) }
.ww-teraz.n-deszcz, .ww-teraz.n-marznacy, .ww-teraz.n-burza { background: linear-gradient(135deg, #34495e, #607d96) }
.ww-teraz.n-snieg { background: linear-gradient(135deg, #5d7f9e, #9fb9cf) }
.ww-teraz div { display: grid; line-height: 1.2 }
.wx { width: 1.7rem; height: 1.7rem; color: #2f6fb0; flex: none } .wx-duza { width: 3.6rem; height: 3.6rem; color: #fff }
.ww-temp { font-size: 2.3rem; font-weight: 800 } .ww-opis { font-weight: 700 } .ww-det { font-size: .84rem; opacity: .95 }
.ww-fig { margin: 0 } .ww-wykres { width: 100%; height: auto; display: block }
.ww-fig figcaption { font-size: .76rem; color: var(--muted); text-align: right }
.w-pole { fill: #e1ecf8 } .w-linia { fill: none; stroke: #d97904; stroke-width: 2.5; stroke-linejoin: round }
.w-pkt { fill: #fff; stroke: #d97904; stroke-width: 2 } .w-t { font-size: 13px; font-weight: 700; text-anchor: middle; fill: #1d2b36 }
.w-h { font-size: 11.5px; text-anchor: middle; fill: #5b6670 } .w-zero { stroke: #9fb3c8; stroke-dasharray: 4 4 }
.w-op { fill: #4a90d9 } .w-ik { color: #2f6fb0 } .w-sn { fill: #a7b9d6 }
i.w-leg { display: inline-block; width: .6rem; height: .6rem; border-radius: 2px; margin: 0 .2rem 0 .35rem; background: #4a90d9 } i.w-leg.w-sn { background: #a7b9d6 }
.ww-dni { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; text-align: center; font-size: .86rem }
.ww-dni li { display: grid; justify-items: center; gap: .15rem; background: #f3f7fb; border-radius: 8px; padding: .5rem .3rem }
.ww-dz { font-weight: 700; text-transform: capitalize } .ww-mm b { font-size: 1.05rem } .ww-mm { color: var(--muted) } .ww-mm b { color: var(--fg) } .ww-op { color: var(--muted); font-size: .78rem }
:root[data-contrast="high"] .warnbar, :root[data-contrast="high"] .ww-ostrz, :root[data-contrast="high"] .ww-pogoda, :root[data-contrast="high"] .wo,
:root[data-contrast="high"] .ww-brak, :root[data-contrast="high"] .ww-teraz, :root[data-contrast="high"] .ww-dni li { background: #000; color: #fff; border-color: #ffeb00 }
:root[data-contrast="high"] .ww-brak b, :root[data-contrast="high"] .ww h3, :root[data-contrast="high"] .wx, :root[data-contrast="high"] .wo-typ, :root[data-contrast="high"] .ww-rcb-inne a { color: #ffeb00 }
:root[data-contrast="high"] .w-pole { fill: #222 } :root[data-contrast="high"] .w-t { fill: #fff }
/* Załączniki we wpisach z panelu */
.zalaczniki { padding-left: 1.1rem } .zalaczniki .meta { color: var(--muted, #4b5446); font-size: .9rem }
@media (max-width: 640px) { .warnbar { font-size: .92rem } }
/* Ilustracje AI: kadr ze środka obrazu i dopisek, że to ilustracja */
.page-title.has-ilu .page-ilu.ai { object-position: center 60% }
.hero-img.ilu.ai { position: relative }
.hero-img.ilu.ai figcaption { position: absolute; right: .6rem; bottom: .6rem; background: rgba(2, 64, 24, .85); color: #fff; font-size: .78rem; padding: .15rem .5rem; border-radius: 3px }

/* Przewijany baner strony głównej */
.b-slajdy { position: relative }
.b-slajd { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility 0s linear .9s }
.b-slajd:first-child { position: relative }
.b-slajd.is-on { opacity: 1; visibility: visible; transition: opacity .9s ease }
.b-ster { position: absolute; top: 2.5rem; right: .75rem; display: flex; align-items: center; gap: .15rem; padding: .25rem .4rem; background: rgba(2, 64, 24, .88); border-radius: 999px }
.b-ster button { width: 28px; height: 28px; padding: 0; border: 0; background: none; color: #fff; cursor: pointer; display: grid; place-items: center; border-radius: 50% }
.b-ster button:focus-visible { outline: 3px solid #fff; outline-offset: 1px }
.b-ster .b-kropka::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-sizing: border-box }
.b-ster .b-kropka[aria-current="true"]::before { background: #fff }
.b-ster .b-pauza svg { width: 16px; height: 16px; fill: currentColor }
:root[data-contrast="high"] .b-ster { background: #000; border: 2px solid #ffeb00 }
@media print { .b-slajd:not(.is-on), .b-ster { display: none } }
