/* ==========================================================================
   SimpleBIP - arkusz stylow czesci publicznej
   Motywy: theme-granat / theme-bordowy / theme-szmaragd / theme-grafit
   Uklad: staly, z menu bocznym. Kontrasty WCAG 2.1 AA (wysoki kontrast 7:1+).
   ========================================================================== */

/* ------------------------------------------------------------------ motywy */
:root {
  --radius-l: 16px;
  --radius: 12px;
  --radius-s: 8px;
  --shadow-1: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .07);
  --shadow-2: 0 2px 6px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .09);
  --shadow-3: 0 4px 10px rgba(15, 23, 42, .08), 0 18px 44px rgba(15, 23, 42, .14);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --c-mark: #ffe9a8;
  --c-focus: #b35c00;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* Urzedowy granat (domyslny) */
.theme-granat {
  --c-bg: #eef1f7;
  --c-bg-grad: linear-gradient(180deg, #e8edf5 0%, #eef1f7 240px);
  --c-surface: #ffffff;
  --c-text: #16233c;
  --c-text-soft: #43506b;
  --c-primary: #10305e;
  --c-primary-dark: #0a2144;
  --c-primary-soft: #e7edf7;
  --c-accent: #c0912a;
  --c-accent-ink: #7a5a12;
  --c-link: #0b4ea2;
  --c-link-visited: #5b3a8f;
  --c-border: #d9dfea;
  --c-head-bg: radial-gradient(120% 180% at 85% -40%, #1d4d8f 0%, #12356a 45%, #0d2a55 100%);
  --c-head-text: #ffffff;
  --c-head-soft: #b9c6de;
  --c-foot-bg: #0e2342;
  --c-foot-text: #cdd8ea;
  --c-foot-link: #9ec5ff;
  --c-govbar-bg: #ffffff;
  --c-govbar-text: #16233c;
}

/* Klasyczny bordowy */
.theme-bordowy {
  --c-bg: #f7f4f1;
  --c-bg-grad: linear-gradient(180deg, #f3eeea 0%, #f7f4f1 240px);
  --c-surface: #ffffff;
  --c-text: #241a1a;
  --c-text-soft: #5b4a4a;
  --c-primary: #8d1a2c;
  --c-primary-dark: #6d1120;
  --c-primary-soft: #f7e9ec;
  --c-accent: #8d1a2c;
  --c-accent-ink: #6d1120;
  --c-link: #0b4ea2;
  --c-link-visited: #5b3a8f;
  --c-border: #e5dcd4;
  --c-head-bg: radial-gradient(120% 180% at 85% -40%, #a92b40 0%, #8d1a2c 45%, #741322 100%);
  --c-head-text: #ffffff;
  --c-head-soft: #eec4cc;
  --c-foot-bg: #2c161c;
  --c-foot-text: #e3d5d8;
  --c-foot-link: #ffb3c0;
  --c-govbar-bg: #ffffff;
  --c-govbar-text: #241a1a;
}

/* Jasny szmaragd */
.theme-szmaragd {
  --c-bg: #f1f5f2;
  --c-bg-grad: linear-gradient(180deg, #ecf2ee 0%, #f1f5f2 240px);
  --c-surface: #ffffff;
  --c-text: #182b23;
  --c-text-soft: #41564c;
  --c-primary: #14624a;
  --c-primary-dark: #0d4634;
  --c-primary-soft: #e6f1ec;
  --c-accent: #ad8434;
  --c-accent-ink: #7a5a12;
  --c-link: #0b5aa2;
  --c-link-visited: #5b3a8f;
  --c-border: #d9e2dc;
  --c-head-bg: radial-gradient(120% 180% at 85% -40%, #1e7c5f 0%, #14624a 45%, #0e4b38 100%);
  --c-head-text: #ffffff;
  --c-head-soft: #b5d6c9;
  --c-foot-bg: #12362a;
  --c-foot-text: #cfe0d7;
  --c-foot-link: #9be0c4;
  --c-govbar-bg: #ffffff;
  --c-govbar-text: #182b23;
}

/* Nocny grafit */
.theme-grafit {
  --c-bg: #edeff3;
  --c-bg-grad: linear-gradient(180deg, #e7eaef 0%, #edeff3 240px);
  --c-surface: #ffffff;
  --c-text: #191c22;
  --c-text-soft: #4a5160;
  --c-primary: #23272f;
  --c-primary-dark: #14171c;
  --c-primary-soft: #eaecf0;
  --c-accent: #c0912a;
  --c-accent-ink: #7a5a12;
  --c-link: #0b4ea2;
  --c-link-visited: #5b3a8f;
  --c-border: #dadde3;
  --c-head-bg: radial-gradient(120% 180% at 85% -40%, #343a45 0%, #23272f 45%, #181b21 100%);
  --c-head-text: #ffffff;
  --c-head-soft: #aab2c0;
  --c-foot-bg: #1b1f26;
  --c-foot-text: #c9cfd9;
  --c-foot-link: #9ec5ff;
  --c-govbar-bg: #ffffff;
  --c-govbar-text: #191c22;
}

/* ------------------------------------------------- wysoki kontrast (7:1+) */
.high-contrast, .high-contrast * {
  --c-bg: #000000;
  --c-bg-grad: #000000;
  --c-surface: #000000;
  --c-text: #ffffff;
  --c-text-soft: #ffffff;
  --c-primary: #ffd700;
  --c-primary-dark: #ffd700;
  --c-primary-soft: #000000;
  --c-accent: #ffd700;
  --c-accent-ink: #ffd700;
  --c-link: #4dc3ff;
  --c-link-visited: #e6b3ff;
  --c-border: #ffffff;
  --c-focus: #ffd700;
  --c-mark: #ffd700;
  --c-head-bg: #000000;
  --c-head-text: #ffffff;
  --c-head-soft: #ffffff;
  --c-foot-bg: #000000;
  --c-foot-text: #ffffff;
  --c-foot-link: #4dc3ff;
  --c-govbar-bg: #000000;
  --c-govbar-text: #ffffff;
  --shadow-1: none;
  --shadow-2: none;
  --shadow-3: none;
}
.high-contrast body { background: #000; }
.high-contrast .site-header { border-bottom: 2px solid #ffd700; }
.high-contrast .gov-bar { border-bottom: 2px solid #fff; }
.high-contrast .bip-badge { background: #ffd700; color: #000; box-shadow: none; }
.high-contrast .gov-biplogo img { filter: invert(1); background: transparent; }
.high-contrast mark { color: #000; }
.high-contrast .search-form button,
.high-contrast .nav-toggle { background: #ffd700; color: #000; border-color: #ffd700; }
.high-contrast .a11y-btn[aria-pressed="true"], .high-contrast .a11y-btn.active { background: #ffd700; border-color: #ffd700; color: #000; }
.high-contrast .archival-banner { background: #000; border-color: #ffd700; color: #ffd700; }
.high-contrast .data-table thead th { background: #ffd700; color: #000; border-color: #fff; }
.high-contrast .data-table tbody tr:nth-child(even) { background: #000; }
.high-contrast .zal-type { background: #ffd700; color: #000; }
.high-contrast .cookie-note { border-top: 2px solid #fff; }
.high-contrast .nav-cta { background: #000; color: #ffd700; border: 2px solid #ffd700; }
.high-contrast .site-footer h2 { color: #ffd700; }

/* ----------------------------------------------------- skalowanie tekstu */
html { font-size: 100%; scroll-behavior: smooth; }
html.font-1 { font-size: 112.5%; }
html.font-2 { font-size: 131.25%; }

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--c-text);
  background: var(--c-bg);
  background-image: var(--c-bg-grad);
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- helpers */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px; top: 0;
  z-index: 100;
  padding: .8rem 1.4rem;
  background: var(--c-primary);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 var(--radius-s) 0;
  box-shadow: var(--shadow-3);
}
.skip-link:focus { left: 0; top: 0; outline: 3px solid var(--c-focus); }

a { color: var(--c-link); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .15s var(--ease); }
a:visited { color: var(--c-link-visited); }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
  border-radius: 3px;
}

.wrap { max-width: 78rem; margin: 0 auto; padding: 0 1.5rem; }

/* ------------------------------------------------------------ pas urzedowy */
.gov-bar {
  background: var(--c-govbar-bg);
  color: var(--c-govbar-text);
  border-bottom: 1px solid var(--c-border);
  font-size: .85rem;
}
.gov-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.2rem;
  padding-top: .35rem;
  padding-bottom: .35rem;
}
.gov-ident { display: flex; align-items: center; gap: .7rem; }
.gov-godlo { height: 2rem; width: auto; }
.gov-text {
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: .74rem;
}
.gov-biplogo { display: inline-flex; align-items: center; padding: .2rem 0; transition: opacity .15s; }
.gov-biplogo img { height: 2.3rem; width: auto; display: block; }
.gov-biplogo:hover { opacity: .72; }

/* ---------------------------------------------------------------- naglowek */
.site-header {
  background: var(--c-head-bg);
  color: var(--c-head-text);
  position: relative;
}
.site-header::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--c-accent) 0%, color-mix(in srgb, var(--c-accent) 40%, transparent) 60%, transparent 100%);
}
.high-contrast .site-header::after { background: #ffd700; }

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1.6rem;
  padding-bottom: 1.6rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  text-decoration: none;
  color: inherit;
}
.brand-logo {
  max-height: 3.9rem;
  max-width: 15rem;
  width: auto; height: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .25));
}
.bip-badge {
  display: grid;
  place-items: center;
  width: 3.7rem; height: 3.7rem;
  flex: none;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c-accent) 88%, #fff) 0%, var(--c-accent) 55%, color-mix(in srgb, var(--c-accent) 70%, #000) 100%);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: .04em;
  border-radius: var(--radius-s);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}

.brand-text { display: flex; flex-direction: column; gap: .1rem; }
.brand-kicker {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--c-head-soft);
  font-weight: 700;
}
.brand-name {
  font-size: clamp(1.2rem, 1.05rem + .8vw, 1.55rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--c-head-text);
  letter-spacing: -.01em;
}
.brand-link:hover .brand-name { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }

.header-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem;
}

.a11y-tools {
  display: flex;
  gap: .3rem;
  padding: .3rem;
  background: rgba(255, 255, 255, .08);
  border-radius: calc(var(--radius-s) + .3rem);
  backdrop-filter: blur(2px);
}
.high-contrast .a11y-tools { background: transparent; border: 1px solid #fff; }
.a11y-btn {
  min-width: 2.45rem; min-height: 2.45rem;
  padding: .25rem .5rem;
  font: inherit; font-weight: 700; font-size: .88rem;
  background: transparent;
  color: var(--c-head-text);
  border: 2px solid transparent;
  border-radius: var(--radius-s);
  cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.a11y-btn:hover { border-color: color-mix(in srgb, var(--c-head-text) 55%, transparent); }
.a11y-btn[aria-pressed="true"], .a11y-btn.active {
  background: var(--c-head-text);
  border-color: var(--c-head-text);
  color: var(--c-primary-dark);
}

.search-form { display: flex; gap: 0; box-shadow: 0 6px 18px rgba(0, 0, 0, .22); border-radius: var(--radius-s); }
.search-form input[type="search"] {
  min-height: 2.75rem;
  padding: .3rem 1rem;
  font: inherit;
  border: 2px solid transparent;
  border-right: 0;
  border-radius: var(--radius-s) 0 0 var(--radius-s);
  background: var(--c-surface);
  color: var(--c-text);
  min-width: 15.5rem;
  transition: box-shadow .15s var(--ease);
}
.search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--c-accent);
}
.search-form button {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.75rem;
  padding: .3rem 1.25rem;
  font: inherit; font-weight: 700;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c-accent) 90%, #fff) 0%, var(--c-accent) 100%);
  color: #fff;
  border: 0;
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  cursor: pointer;
  transition: filter .15s var(--ease);
}
.theme-granat .search-form button, .theme-grafit .search-form button { color: #1b1405; text-shadow: none; }
.search-form button:hover { filter: brightness(1.07); }
.search-ico {
  width: 1em; height: 1em;
  border: 2px solid currentColor;
  border-radius: 50%;
  position: relative;
  display: inline-block;
  flex: none;
}
.search-ico::after {
  content: "";
  position: absolute;
  width: 2px; height: .45em;
  background: currentColor;
  transform: rotate(-45deg);
  bottom: -.38em; right: -.12em;
  border-radius: 2px;
}

/* ------------------------------------------------------------------ layout */
.layout {
  display: grid;
  grid-template-columns: 19rem minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
  padding-top: 1.75rem;
  padding-bottom: 3rem;
  flex: 1;
  width: 100%;
}

/* ------------------------------------------------------------- menu boczne */
.site-nav {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-2);
  padding: 1.35rem 1.15rem;
  position: sticky;
  top: 1rem;
}
.site-nav .nav-toggle { display: none; }

.nav-heading {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 .7rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--c-text-soft);
  font-weight: 800;
}
.nav-heading::before {
  content: "";
  width: 1.1rem; height: .22rem;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
  flex: none;
}
.nav-tree + .nav-heading, .nav-static + .nav-heading { margin-top: 1.6rem; }

.site-nav .nav-tree, .nav-static {
  list-style: none;
  margin: 0 0 .5rem;
  padding: 0;
}
.site-nav .nav-tree a, .nav-static a {
  position: relative;
  display: block;
  padding: .52rem .8rem;
  color: var(--c-text);
  text-decoration: none;
  border-radius: var(--radius-s);
  transition: background .15s var(--ease), color .15s var(--ease), transform .15s var(--ease);
}
.site-nav .nav-tree a:hover, .nav-static a:hover {
  background: var(--c-primary-soft);
  color: var(--c-primary);
  transform: translateX(3px);
}
.site-nav .nav-tree a[aria-current], .nav-static a[aria-current] {
  background: var(--c-primary);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--c-primary) 35%, transparent);
}
.high-contrast .site-nav .nav-tree a[aria-current],
.high-contrast .nav-static a[aria-current] { background: #ffd700; color: #000; }

.site-nav .nav-tree ul {
  list-style: none;
  margin: .15rem 0 .3rem;
  padding-left: .95rem;
  border-left: 2px solid var(--c-border);
  margin-left: .8rem;
}
.site-nav .nav-tree ul a { font-size: .93rem; padding: .4rem .7rem; color: var(--c-text-soft); }
.site-nav .nav-tree ul a:hover { color: var(--c-primary); }
.site-nav .caret { display: none; }
.menu-separator hr { border: 0; border-top: 1px solid var(--c-border); margin: .55rem .3rem; }

.nav-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-top: 1.4rem;
  padding: .7rem .95rem;
  background: linear-gradient(135deg, var(--c-primary) 0%, color-mix(in srgb, var(--c-primary) 75%, #000) 100%);
  color: #fff !important;
  font-weight: 700;
  font-size: .92rem;
  text-decoration: none;
  border-radius: var(--radius-s);
  box-shadow: 0 6px 14px color-mix(in srgb, var(--c-primary) 30%, transparent);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 20px color-mix(in srgb, var(--c-primary) 38%, transparent); }

/* -------------------------------------------------------------------- main */
.site-main {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-2);
  padding: 2.25rem 2.5rem 2.5rem;
  min-width: 0;
  animation: sbFadeIn .3s var(--ease);
}
@keyframes sbFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

h1 {
  font-size: clamp(1.55rem, 1.3rem + 1vw, 1.95rem);
  line-height: 1.22;
  margin: 0 0 1.25rem;
  letter-spacing: -.015em;
  font-weight: 800;
}
.content-article > h1, .site-main > h1 {
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--c-border);
  position: relative;
}
.content-article > h1::after, .site-main > h1::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 4.5rem; height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
}
h2 { font-size: 1.32rem; margin: 2rem 0 .8rem; font-weight: 750; letter-spacing: -.01em; }
h3 { font-size: 1.12rem; }

/* -------------------------------------------------------------- breadcrumbs */
.breadcrumbs { margin: -.4rem 0 1.1rem; font-size: .88rem; }
.breadcrumbs ol {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  color: var(--c-text-soft);
}
.breadcrumbs li { display: flex; align-items: center; gap: .25rem; }
.breadcrumbs li + li::before {
  content: "›";
  color: var(--c-text-soft);
  opacity: .6;
  margin-right: .1rem;
}
.breadcrumbs a { color: var(--c-text-soft); text-decoration: none; }
.breadcrumbs a:hover { color: var(--c-primary); text-decoration: underline; }
.breadcrumbs [aria-current] { font-weight: 600; color: var(--c-text); }

.content-body { overflow-wrap: break-word; font-size: 1.02rem; }
.content-body img { max-width: 100%; height: auto; border-radius: var(--radius-s); }
.content-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.1rem 0;
}
.content-body th, .content-body td {
  border: 1px solid var(--c-border);
  padding: .55rem .75rem;
  text-align: left;
}
.content-body th { background: var(--c-primary-soft); }
.content-body a { font-weight: 550; }
.content-body li { margin-bottom: .25rem; }

.article-lead { font-size: 1.13rem; color: var(--c-text-soft); font-weight: 500; line-height: 1.6; }

.notice {
  padding: 1.05rem 1.3rem;
  background: var(--c-primary-soft);
  border-left: 4px solid var(--c-primary);
  border-radius: var(--radius-s);
}

.archival-banner {
  display: flow-root;
  padding: 1rem 1.3rem;
  margin-bottom: 1.6rem;
  background: linear-gradient(180deg, #fdf6e7, #fdf3e0);
  border: 1px solid #e3b04a;
  border-left-width: 6px;
  border-radius: var(--radius-s);
  color: #5c4400;
  box-shadow: var(--shadow-1);
}
.archival-banner a { color: inherit; font-weight: 700; }

/* -------------------------------------------------------------- zalaczniki */
.zalaczniki { margin-top: 2.4rem; }
.zalaczniki h2 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: .55rem;
}
.zalaczniki h2::before {
  content: "";
  width: 1.15rem; height: 1.15rem;
  flex: none;
  background: currentColor;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.2" stroke-linecap="round"><path d="M21 12.5l-8.5 8.5a6 6 0 0 1-8.5-8.5L12.6 4a4 4 0 0 1 5.7 5.7L9.8 18.2a2 2 0 0 1-2.8-2.8l7.8-7.8"/></svg>') center / contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.2" stroke-linecap="round"><path d="M21 12.5l-8.5 8.5a6 6 0 0 1-8.5-8.5L12.6 4a4 4 0 0 1 5.7 5.7L9.8 18.2a2 2 0 0 1-2.8-2.8l7.8-7.8"/></svg>') center / contain no-repeat;
}
.zalaczniki-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: .6rem;
}
.zalaczniki-list a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .8rem 1rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--c-text);
  box-shadow: var(--shadow-1);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), border-color .16s var(--ease);
}
.zalaczniki-list a::after {
  content: "";
  width: 1.15rem; height: 1.15rem;
  flex: none;
  margin-left: auto;
  background: var(--c-text-soft);
  opacity: .55;
  transition: opacity .16s, transform .16s var(--ease), background .16s;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3v13m0 0l-5-5m5 5l5-5M4 21h16"/></svg>') center / contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3v13m0 0l-5-5m5 5l5-5M4 21h16"/></svg>') center / contain no-repeat;
}
.zalaczniki-list a:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--c-primary) 45%, var(--c-border));
  box-shadow: var(--shadow-2);
}
.zalaczniki-list a:hover::after { opacity: 1; background: var(--c-primary); transform: translateY(2px); }
.zal-type {
  flex: none;
  display: grid;
  place-items: center;
  min-width: 3.1rem;
  padding: .45rem .3rem;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c-primary) 82%, #fff) 0%, var(--c-primary) 100%);
  color: #fff;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .05em;
  border-radius: 7px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.zal-name { font-weight: 650; overflow-wrap: anywhere; }
.zal-meta { flex: none; font-size: .84rem; color: var(--c-text-soft); }

/* ----------------------------------------------------------------- metryka */
.metryka {
  margin-top: 2.4rem;
  background: color-mix(in srgb, var(--c-bg) 55%, var(--c-surface));
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem 1.2rem;
}
.high-contrast .metryka { background: #000; }
.metryka h2 {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--c-text-soft);
  margin: 0 0 .7rem;
  display: flex;
  align-items: center;
  gap: .55rem;
  font-weight: 800;
}
.metryka h2::before {
  content: "";
  width: 1.05rem; height: 1.05rem;
  flex: none;
  background: currentColor;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.2" stroke-linecap="round"><circle cx="12" cy="12" r="9"/><path d="M12 8h.01M11 12h1v4h1"/></svg>') center / contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.2" stroke-linecap="round"><circle cx="12" cy="12" r="9"/><path d="M12 8h.01M11 12h1v4h1"/></svg>') center / contain no-repeat;
}
.metryka table { border-collapse: collapse; width: 100%; font-size: .93rem; }
.metryka th, .metryka td {
  text-align: left;
  padding: .42rem .5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--c-border) 65%, transparent);
  vertical-align: top;
}
.metryka tr:last-child th, .metryka tr:last-child td { border-bottom: 0; }
.metryka th { width: 16rem; font-weight: 600; color: var(--c-text-soft); }
.metryka-links { display: flex; gap: 1rem; align-items: center; margin-top: .9rem; flex-wrap: wrap; }
.metryka-links a { font-weight: 650; }
.print-btn {
  font: inherit; font-weight: 600;
  padding: .42rem 1rem;
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-s);
  color: var(--c-text);
  cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: border-color .15s, transform .15s var(--ease);
}
.print-btn:hover { border-color: var(--c-primary); transform: translateY(-1px); }

/* -------------------------------------------------------------- listy/tabele */
.news-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.news-list li {
  padding: 1rem 1.2rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), border-color .16s var(--ease);
}
.news-list li:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  border-color: color-mix(in srgb, var(--c-primary) 40%, var(--c-border));
}
.news-list a { font-size: 1.08rem; font-weight: 700; text-decoration: none; }
.news-list a:hover { text-decoration: underline; }
.news-date {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .84rem;
  color: var(--c-text-soft);
  margin-top: .3rem;
}
.news-date::before {
  content: "";
  width: .95rem; height: .95rem;
  background: currentColor;
  opacity: .7;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.1" stroke-linecap="round"><rect x="3.5" y="5" width="17" height="16" rx="2.5"/><path d="M3.5 10h17M8 3v4m8-4v4"/></svg>') center / contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.1" stroke-linecap="round"><rect x="3.5" y="5" width="17" height="16" rx="2.5"/><path d="M3.5 10h17M8 3v4m8-4v4"/></svg>') center / contain no-repeat;
}
.news-lead { margin: .45rem 0 0; color: var(--c-text-soft); font-size: .96rem; }
.more-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 700;
  text-decoration: none;
  padding: .55rem 1.1rem;
  border: 1.5px solid var(--c-border);
  border-radius: 99px;
  box-shadow: var(--shadow-1);
  transition: border-color .15s, transform .15s var(--ease);
}
.more-link::after { content: "→"; transition: transform .15s var(--ease); }
.more-link:hover { border-color: var(--c-primary); transform: translateY(-1px); text-decoration: none; }
.more-link:hover::after { transform: translateX(3px); }

.home-news { margin-top: 2.4rem; }

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .94rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.data-table th, .data-table td {
  padding: .65rem .8rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--c-border);
}
.data-table td + td, .data-table th + th { border-left: 1px solid color-mix(in srgb, var(--c-border) 60%, transparent); }
.data-table thead th {
  background: var(--c-primary);
  color: #fff;
  font-weight: 700;
  font-size: .86rem;
  letter-spacing: .03em;
  border-bottom: 0;
}
.data-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--c-bg) 45%, var(--c-surface)); }
.data-table tbody tr:hover { background: var(--c-primary-soft); }
.high-contrast .data-table tbody tr:hover { background: #000; }
.data-table tbody tr:last-child td { border-bottom: 0; }

.search-results { padding-left: 1.3rem; }
.search-results li { margin-bottom: 1.2rem; }
.search-results a { font-weight: 700; font-size: 1.05rem; }
.result-kind {
  display: inline-block;
  margin-left: .5rem;
  padding: .08rem .6rem;
  font-size: .76rem;
  font-weight: 600;
  background: var(--c-primary-soft);
  border: 1px solid color-mix(in srgb, var(--c-primary) 25%, transparent);
  border-radius: 999px;
  color: var(--c-primary);
}
.high-contrast .result-kind { background: #000; color: #ffd700; border-color: #ffd700; }
.result-snippet { margin: .3rem 0 0; color: var(--c-text-soft); }
mark { background: var(--c-mark); padding: 0 .18em; border-radius: 3px; font-weight: 600; }

.search-form-page { margin: 1rem 0 2rem; align-items: end; box-shadow: none; }
.search-form-page label { display: block; font-weight: 650; margin-bottom: .35rem; }
.search-form-page input[type="search"] { border: 2px solid var(--c-border); border-right: 0; }

.stat-total {
  font-size: 1.05rem;
  padding: 1.1rem 1.3rem;
  background: var(--c-primary-soft);
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--c-primary) 20%, transparent);
}
.stat-total strong { font-size: 1.5rem; color: var(--c-primary); margin-left: .3rem; }
.high-contrast .stat-total { background: #000; }
.high-contrast .stat-total strong { color: #ffd700; }

/* ------------------------------------------------------------- stronicowanie */
.pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  list-style: none;
  margin: 1.9rem 0 0;
  padding: 0;
}
.pagination a, .pagination span {
  display: inline-block;
  min-width: 2.55rem;
  padding: .48rem .8rem;
  text-align: center;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-s);
  text-decoration: none;
  font-weight: 600;
  box-shadow: var(--shadow-1);
  transition: border-color .15s, transform .15s var(--ease);
}
.pagination a:hover { border-color: var(--c-primary); transform: translateY(-1px); }
.pagination span[aria-current] {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
  font-weight: 800;
}
.pagination .ellipsis { border: 0; box-shadow: none; }

/* ------------------------------------------------------------------- stopka */
.site-footer {
  background: var(--c-foot-bg);
  color: var(--c-foot-text);
  margin-top: auto;
  position: relative;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset-inline: 0; top: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--c-accent), transparent 70%);
}
.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2.25rem;
  padding-top: 2.5rem;
  padding-bottom: 2.25rem;
}
.site-footer h2 {
  font-size: .84rem;
  margin: 0 0 .85rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 800;
  padding-bottom: .45rem;
  border-bottom: 2px solid var(--c-accent);
  display: inline-block;
}
.site-footer a { color: var(--c-foot-link); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer a:visited { color: var(--c-foot-link); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer p { margin: 0 0 .4rem; }

.footer-bottom {
  border-top: 1px solid color-mix(in srgb, var(--c-foot-text) 22%, transparent);
  font-size: .87rem;
}
.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.footer-biplink {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  opacity: .92;
  transition: opacity .15s;
}
.footer-biplink:hover { opacity: 1; }
/* w stopce biala (achromatyczna) odmiana logo BIP - bez zadnych plakietek */
.footer-biplink img { height: 2.2rem; width: auto; }
.footer-bottom p { margin: 0; opacity: .9; }

/* ------------------------------------------------------------------ cookies */
.cookie-note[hidden] { display: none !important; }
.cookie-note {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.25rem;
  background: color-mix(in srgb, var(--c-primary-dark) 96%, #000);
  color: #fff;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, .3);
}
.cookie-note p { margin: 0; }
.cookie-note a { color: #ffd88a; }
.cookie-note button {
  font: inherit; font-weight: 700;
  padding: .5rem 1.3rem;
  background: #fff;
  color: var(--c-primary-dark);
  border: 0;
  border-radius: var(--radius-s);
  cursor: pointer;
  transition: transform .15s var(--ease);
}
.cookie-note button:hover { transform: translateY(-1px); }

/* ------------------------------------------------------------------- mobile */
@media (max-width: 56rem) {
  .layout { grid-template-columns: 1fr; }
  .site-nav { position: static; }

  .nav-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    font: inherit; font-weight: 800;
    min-height: 2.9rem;
    background: var(--c-primary);
    color: #fff;
    border: 0;
    border-radius: var(--radius-s);
    cursor: pointer;
    box-shadow: var(--shadow-1);
  }
  .nav-list { display: none; }
  .nav-list.open { display: block; margin-top: 1.1rem; }
  .no-js .nav-list { display: block; margin-top: 1.1rem; }

  .gov-text { font-size: .64rem; letter-spacing: .06em; }
  .site-main { padding: 1.5rem 1.2rem; }
  .search-form input[type="search"] { min-width: 0; flex: 1; }
  .header-tools { width: 100%; }
  .search-form { flex: 1 1 100%; }
  .metryka th { width: auto; }
  .data-table { display: block; overflow-x: auto; border-radius: var(--radius-s); }
  .brand-name { font-size: 1.12rem; }
  .zal-meta { display: none; }
  .header-inner { padding-top: 1.1rem; padding-bottom: 1.1rem; }
  .wrap { padding: 0 1rem; }
}

/* -------------------------------------------------------------------- motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------- druk */
@media print {
  .site-header, .site-nav, .site-footer, .cookie-note,
  .skip-link, .pagination, .print-btn, .a11y-tools, .search-form,
  .breadcrumbs, .nav-cta { display: none !important; }
  body { background: #fff; color: #000; display: block; }
  .layout { display: block; padding: 0; }
  .site-main { border: 0; box-shadow: none; padding: 0; animation: none; }
  a { color: #000; text-decoration: none; }
  .content-body a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; }
  .metryka, .zalaczniki { break-inside: avoid; }
  .zalaczniki-list a { border: 1px solid #999; box-shadow: none; }
  .news-list li { box-shadow: none; }
}

/* ------------------------------------------------------- kafle strony glownej */
.home-blocks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr));
  gap: 1rem;
  margin: 2.2rem 0 .5rem;
}
.home-block {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.15rem 1.25rem 1.05rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--c-text);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), border-color .16s var(--ease);
}
.home-block::before {
  content: "";
  position: absolute;
  inset-inline: 0; top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
}
.home-block:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
  border-color: color-mix(in srgb, var(--c-primary) 40%, var(--c-border));
}
.home-block-title { font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em; }
.home-block-desc { font-size: .88rem; color: var(--c-text-soft); }
.home-block-more {
  margin-top: auto;
  align-self: flex-end;
  font-weight: 800;
  color: var(--c-primary);
  transition: transform .16s var(--ease);
}
.home-block:hover .home-block-more { transform: translateX(4px); }
.high-contrast .home-block::before { background: #ffd700; }
.high-contrast .home-block-more { color: #ffd700; }

/* ------------------------------------------------------------- przetargi */
.muted-lead { color: var(--c-text-soft); margin-top: -.6rem; }
.tender-list { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: .65rem; }
.tender-link {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: .95rem 1.15rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--c-text);
  box-shadow: var(--shadow-1);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), border-color .16s var(--ease);
}
.tender-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  border-color: color-mix(in srgb, var(--c-primary) 40%, var(--c-border));
}
.status-trwa .tender-link { border-left-color: #1d6f3f; }
.status-ogloszony .tender-link { border-left-color: var(--c-primary); }
.status-zakonczony .tender-link { border-left-color: #9aa3b5; opacity: .88; }
.status-rozstrzygniety .tender-link { border-left-color: var(--c-accent); }
.tender-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.tender-title { font-weight: 700; font-size: 1.03rem; }
.tender-meta { font-size: .87rem; color: var(--c-text-soft); }
.tender-status {
  flex: none;
  padding: .28rem .85rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
  background: var(--c-primary-soft);
  color: var(--c-primary);
  border: 1px solid color-mix(in srgb, var(--c-primary) 25%, transparent);
}
.status-trwa .tender-status { background: #e8f5ed; color: #1d6f3f; border-color: rgba(29, 111, 63, .35); }
.status-zakonczony .tender-status { background: #eef0f5; color: var(--c-text-soft); border-color: var(--c-border); }
.status-rozstrzygniety .tender-status { background: #fdf3dd; color: #6b4d00; border-color: #e3b04a; }
.high-contrast .tender-status { background: #000 !important; color: #ffd700 !important; border-color: #ffd700 !important; }

.tender-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1.1rem;
  padding: .85rem 1.15rem;
  margin-bottom: 1.4rem;
  border-radius: var(--radius-s);
  border: 1px solid var(--c-border);
  border-left-width: 5px;
  background: color-mix(in srgb, var(--c-bg) 55%, var(--c-surface));
}
.tender-banner-status { font-weight: 800; }
.tender-banner-meta { color: var(--c-text-soft); font-size: .92rem; }
.tender-banner.status-trwa { border-left-color: #1d6f3f; }
.tender-banner.status-trwa .tender-banner-status { color: #1d6f3f; }
.tender-banner.status-ogloszony { border-left-color: var(--c-primary); }
.tender-banner.status-zakonczony { border-left-color: #9aa3b5; }
.tender-banner.status-rozstrzygniety { border-left-color: var(--c-accent); }
.tender-banner.status-rozstrzygniety .tender-banner-status { color: var(--c-accent-ink); }
.high-contrast .tender-banner { background: #000; border-color: #ffd700; }

.tender-result {
  margin-top: 1.8rem;
  padding: 1.1rem 1.3rem;
  background: #fdf6e7;
  border: 1px solid #e3b04a;
  border-left-width: 5px;
  border-radius: var(--radius-s);
}
.tender-result h2 { margin: 0 0 .5rem; font-size: 1.1rem; color: #6b4d00; }
.high-contrast .tender-result { background: #000; border-color: #ffd700; }
.high-contrast .tender-result h2 { color: #ffd700; }

@media (max-width: 56rem) {
  .tender-link { flex-direction: column; align-items: flex-start; gap: .5rem; }
}
