/* projektruchu.pl – baza wiedzy o znakach drogowych
   Identyfikacja wg brandbooka Velum City (Traffic Red RAL 3020, Lexend). */
:root {
  --zm-red: #D00B11;
  --zm-red-dark: #A8080D;
  --zm-red-soft: #FBE7E8;
  --zm-black: #000000;
  --zm-white: #FFFFFF;
  --zm-bg: #F2F2F2;
  --zm-surface: #FFFFFF;
  --zm-surface-2: #F7F7F7;
  --zm-border: #D9D9D9;
  --zm-text: #000000;
  --zm-text-muted: #5C5C5C;
  --zm-correct: #1B7A3A;
  --zm-amend: #1B7A3A;
  --zm-amend-soft: #E8F3EC;
  --zm-mark: #FFE9A8;
  --zm-font: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --zm-radius: 8px;
  --zm-space: 8px;
  --maxw: 1240px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.05);
  --accent-text: #D00B11;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --zm-bg: #000000; --zm-surface: #141414; --zm-surface-2: #1C1C1C; --zm-border: #333333;
    --zm-text: #FFFFFF; --zm-text-muted: #A3A3A3; --zm-correct: #4CC27A; --zm-amend: #4CC27A;
    --zm-amend-soft: #10261A; --zm-red-soft: #2A0A0B; --zm-mark: #5A4A12;
    --shadow: none; --accent-text: #FFFFFF;
  }
}
:root[data-theme="dark"] {
  --zm-bg: #000000; --zm-surface: #141414; --zm-surface-2: #1C1C1C; --zm-border: #333333;
  --zm-text: #FFFFFF; --zm-text-muted: #A3A3A3; --zm-correct: #4CC27A; --zm-amend: #4CC27A;
  --zm-amend-soft: #10261A; --zm-red-soft: #2A0A0B; --zm-mark: #5A4A12;
  --shadow: none; --accent-text: #FFFFFF;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0; font-family: var(--zm-font); font-weight: 400; font-size: 16px; line-height: 1.55;
  color: var(--zm-text); background: var(--zm-bg); -webkit-font-smoothing: antialiased;
}
@media (min-width: 900px) { body { font-size: 17px; } }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, select:focus-visible {
  outline: 3px solid var(--zm-red); outline-offset: 2px; border-radius: 4px;
}
h1, h2, h3, h4 { font-weight: 700; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: 32px; } h2 { font-size: 24px; } h3 { font-size: 19px; }
@media (min-width: 900px) { h1 { font-size: 44px; } h2 { font-size: 30px; } h3 { font-size: 21px; } }
small, .muted { color: var(--zm-text-muted); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--zm-black); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- nagłówek */
.topbar { background: var(--zm-surface); border-bottom: 1px solid var(--zm-border); position: sticky; top: 0; z-index: 50; }
.topbar .wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; white-space: nowrap; }
.brand-word { font-weight: 700; font-size: 22px; letter-spacing: -0.02em; color: var(--zm-text); }
.brand-word b, .brand-word .bw-red { color: var(--zm-red); font-weight: 700; }
.brand-sub { font-size: 12px; color: var(--zm-text-muted); display: none; }
@media (min-width: 1380px) { .brand-sub { display: inline; } }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { white-space: nowrap; text-decoration: none; padding: 8px 12px; border-radius: 6px; font-weight: 600; font-size: 15px; }
.nav a:hover { background: var(--zm-surface-2); }
.nav a.on { color: var(--accent-text); box-shadow: inset 0 -3px 0 var(--zm-red); border-radius: 6px 6px 0 0; }
.search-top { position: relative; flex: 0 1 300px; }
.search-top input, .search-big input, .filter input {
  width: 100%; font: inherit; font-size: 15px; padding: 10px 14px 10px 38px; border-radius: 8px;
  border: 1px solid var(--zm-border); background: var(--zm-surface-2); color: var(--zm-text);
}
.search-top svg, .search-big svg, .filter svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--zm-text-muted); }
.icon-btn { background: none; border: 1px solid var(--zm-border); border-radius: 8px; width: 40px; height: 40px; cursor: pointer; color: var(--zm-text); display: grid; place-items: center; flex: none; }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .topbar .wrap { flex-wrap: wrap; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .menu-btn { display: grid; margin-left: auto; }
  .nav { order: 3; width: 100%; display: none; flex-direction: column; }
  .nav.open { display: flex; }
  .search-top { order: 4; flex: 1 1 100%; }
}

/* ---------- hero */
.hero { background: var(--zm-red); color: #fff; position: relative; overflow: hidden; }
.hero .wrap { padding-top: 56px; padding-bottom: 56px; position: relative; z-index: 1; }
.hero h1 { max-width: 22ch; font-size: 38px; }
@media (min-width: 900px) { .hero h1 { font-size: 60px; } }
.hero p.lead { font-weight: 300; font-size: 20px; max-width: 46ch; margin: 0 0 28px; }
@media (min-width: 900px) { .hero p.lead { font-size: 24px; } }
.hero-art { position: absolute; right: -60px; bottom: -120px; width: 560px; height: 560px; pointer-events: none; }
@media (max-width: 900px) { .hero-art { width: 320px; height: 320px; right: -90px; bottom: -90px; opacity: .8; } }
main.flush { padding-top: 0; }
.search-big { position: relative; max-width: 640px; }
.search-big input { font-size: 18px; padding: 16px 18px 16px 48px; background: #fff; color: #000; border: 0; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.search-big svg { left: 16px; width: 20px; height: 20px; color: #5C5C5C; }
.hero .chips { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.hero .chips a { color: #fff; border: 1px solid rgba(255,255,255,.55); border-radius: 999px; padding: 4px 12px; font-size: 14px; text-decoration: none; }
.hero .chips a:hover { background: rgba(255,255,255,.12); }

/* ---------- sekcje / karty */
main { padding: 32px 0 64px; min-height: 60vh; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 40px 0 16px; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; font-size: 15px; color: var(--accent-text); text-decoration: none; }
.card { background: var(--zm-surface); border: 1px solid var(--zm-border); border-radius: var(--zm-radius); box-shadow: var(--shadow); }
.pad { padding: 20px; }
@media (min-width: 900px) { .pad { padding: 28px 32px; } }
.grid { display: grid; gap: 14px; }
.cats { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.cat-tile { display: flex; gap: 14px; align-items: center; padding: 16px; text-decoration: none; transition: border-color .15s, transform .15s; }
.cat-tile:hover { border-color: var(--zm-red); transform: translateY(-1px); }
.cat-tile .thumb { width: 64px; height: 64px; flex: none; background: #fff; border-radius: 6px; display: grid; place-items: center; padding: 6px; }
.cat-tile .thumb img { max-width: 100%; max-height: 100%; }
.cat-tile .thumb .letter { font-weight: 700; font-size: 26px; color: #000; }
.cat-tile b { display: block; font-size: 16px; line-height: 1.2; }
.cat-tile small { font-size: 13px; }
.topics { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.topic-tile { padding: 20px; text-decoration: none; display: flex; flex-direction: column; gap: 6px; border-top: 4px solid var(--zm-red); }
.topic-tile:hover { border-color: var(--zm-red); }
.topic-tile b { font-size: 18px; line-height: 1.25; }
.topic-tile small { font-size: 13px; }

.signs { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.sign-tile { text-decoration: none; display: flex; flex-direction: column; overflow: hidden; transition: border-color .15s, transform .15s; }
.sign-tile:hover { border-color: var(--zm-red); transform: translateY(-1px); }
.sign-tile .img { background: #fff; aspect-ratio: 1 / 1; display: grid; place-items: center; padding: 14px; border-bottom: 1px solid var(--zm-border); }
.sign-tile .img img { max-width: 100%; max-height: 100%; }
.sign-tile .img .noimg, .sign-hero .img .noimg { font-weight: 700; color: #9a9a9a; font-size: 13px; text-align: center; }
.sign-tile .meta { padding: 10px 12px 12px; }
.sign-tile .code { font-weight: 700; font-size: 16px; }
.sign-tile .nm { font-size: 13px; color: var(--zm-text-muted); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 4px; background: var(--zm-surface-2); border: 1px solid var(--zm-border); color: var(--zm-text-muted); }
.tag.red { background: var(--zm-red); color: #fff; border-color: var(--zm-red); }
.tag.green { background: var(--zm-amend-soft); color: var(--zm-amend); border-color: transparent; }

.filter { position: relative; max-width: 420px; margin: 0 0 18px; }
.cat-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; }
.cat-nav a { text-decoration: none; font-weight: 600; font-size: 14px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--zm-border); background: var(--zm-surface); }
.cat-nav a.on, .cat-nav a:hover { background: var(--zm-black); color: #fff; border-color: var(--zm-black); }
:root[data-theme="dark"] .cat-nav a.on { background: var(--zm-red); border-color: var(--zm-red); }

.crumbs { font-size: 14px; color: var(--zm-text-muted); margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- karta znaku */
.sign-hero { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 800px) { .sign-hero { grid-template-columns: 340px 1fr; gap: 32px; } }
.sign-hero .img { background: #fff; border-radius: var(--zm-radius); border: 1px solid var(--zm-border); aspect-ratio: 1/1; display: grid; place-items: center; padding: 28px; }
.sign-hero .img img { max-width: 100%; max-height: 100%; }
.variants { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.variants button { background: #fff; border: 1px solid var(--zm-border); border-radius: 6px; padding: 4px; width: 64px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.variants button img { width: 52px; height: 40px; object-fit: contain; }
.variants button span { font-size: 9px; color: #5C5C5C; line-height: 1.1; text-align: center; font-family: var(--zm-font); }
.variants button.on { border-color: var(--zm-red); box-shadow: 0 0 0 1px var(--zm-red); }
.img-note { font-size: 12px; color: var(--zm-text-muted); margin-top: 8px; }
.sign-code { font-size: 56px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; margin: 4px 0 10px; }
@media (min-width: 900px) { .sign-code { font-size: 72px; } }
.sign-name { font-size: 22px; font-weight: 600; line-height: 1.3; margin: 0 0 6px; }
.sign-name q { quotes: none; }
.src { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--zm-text-muted); }
.src a { text-decoration: none; border-bottom: 1px solid var(--zm-border); }
.src a:hover { color: var(--zm-red); border-color: var(--zm-red); }
.facts { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 0; border-top: 1px solid var(--zm-border); }
.facts li { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--zm-border); font-size: 15px; }
.facts li > span:first-child { color: var(--zm-text-muted); font-size: 14px; }
@media (max-width: 560px) { .facts li { grid-template-columns: 1fr; gap: 2px; } }
.notice { border-radius: var(--zm-radius); padding: 14px 16px; margin: 16px 0 0; font-size: 15px; }
.notice.red { background: var(--zm-red-soft); border: 1px solid var(--zm-red); }
.notice.green { background: var(--zm-amend-soft); border: 1px solid var(--zm-amend); }
.notice .label { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; display: block; margin-bottom: 4px; }

.toc-sticky { display: flex; flex-wrap: wrap; gap: 6px; margin: 26px 0 0; }
.toc-sticky a { font-size: 14px; font-weight: 600; text-decoration: none; padding: 6px 12px; border-radius: 999px; background: var(--zm-surface); border: 1px solid var(--zm-border); }
.toc-sticky a:hover { border-color: var(--zm-red); color: var(--zm-red); }
.toc-sticky a .n { color: var(--zm-text-muted); font-weight: 400; margin-left: 4px; }

.block-h { display: flex; align-items: baseline; gap: 12px; margin: 44px 0 14px; scroll-margin-top: 90px; }
.block-h h2 { margin: 0; }
.block-h .cnt { color: var(--zm-text-muted); font-size: 15px; }

/* ---------- tekst rozporządzenia */
.reg { background: var(--zm-surface); border: 1px solid var(--zm-border); border-radius: var(--zm-radius); margin: 0 0 16px; box-shadow: var(--shadow); overflow: hidden; }
.reg-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 14px 20px; background: var(--zm-surface-2); border-bottom: 1px solid var(--zm-border); }
.reg-head .t { font-weight: 700; font-size: 16px; line-height: 1.3; }
.reg-head .t .num { color: var(--accent-text); margin-right: 6px; }
.reg-head .t a { text-decoration: none; }
.reg-head .t a:hover { text-decoration: underline; }
.reg-body { padding: 18px 20px 6px; }
@media (min-width: 900px) { .reg-body { padding: 22px 28px 8px; } .reg-head { padding: 14px 28px; } }
.reg-body p { margin: 0 0 12px; max-width: 78ch; }
.reg-body p.li { padding-left: 22px; text-indent: -16px; }
.reg-body p.li.sub { padding-left: 40px; }
.reg-body p.li.bul { position: relative; padding-left: 26px; text-indent: 0; }
.reg-body p.li.bul.sub { padding-left: 50px; }
.reg-body p.li.bul::before { content: ""; position: absolute; left: 8px; top: .68em; width: 7px; height: 7px; border-radius: 50%; background: var(--zm-red); }
.reg-body p.li.bul.sub::before { left: 32px; width: 6px; height: 6px; background: transparent; border: 1.5px solid var(--zm-red); box-sizing: border-box; }
.reg-body p.li .dash { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: pre; }
.reg-body h4 { font-size: 16px; margin: 14px 0 10px; }
.reg-body mark { background: var(--zm-mark); color: inherit; padding: 0 2px; border-radius: 3px; font-weight: 600; }
.reg-body a.code { font-weight: 600; text-decoration: none; border-bottom: 1px dotted currentColor; white-space: nowrap; }
.reg-body a.code:hover { color: var(--zm-red); }
.reg-body a.pkt { text-decoration: none; border-bottom: 1px dotted var(--zm-text-muted); }
.fig { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 14px; padding: 10px 12px; border: 1px dashed var(--zm-border); border-radius: 6px; font-size: 14px; color: var(--zm-text-muted); max-width: 78ch; }
.fig svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--zm-text-muted); }
.fig .ft { flex: 1; }
.fig a.pg { white-space: nowrap; font-weight: 600; color: var(--zm-text); text-decoration: none; border-bottom: 1px solid var(--zm-border); }
.fig a.pg:hover { color: var(--zm-red); border-color: var(--zm-red); }
.figimg { margin: 4px 0 18px; display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; }
.figimg > a { display: block; background: #fff; border: 1px solid var(--zm-border); border-radius: var(--zm-radius); padding: 16px; line-height: 0; }
.figimg > a > img { width: 360px; max-width: 100%; height: auto; display: block; }
.figimg figcaption { flex: 1 1 220px; font-size: 14px; color: var(--zm-text-muted); max-width: 46ch; }
.figimg .figsrc { display: block; margin-top: 8px; font-size: 13px; }
.tbl-wrap { margin: 6px 0 16px; overflow-x: auto; }
.tbl-cap { font-weight: 600; font-size: 14px; margin: 0 0 8px; max-width: 78ch; }
table.t { border-collapse: collapse; font-size: 14px; min-width: 60%; background: var(--zm-surface); }
table.t th, table.t td { border: 1px solid var(--zm-border); padding: 7px 10px; text-align: left; vertical-align: top; }
table.t th { background: var(--zm-surface-2); font-weight: 600; }
table.t td:not(:first-child) { font-variant-numeric: tabular-nums; }
table.t sup { font-size: 10px; }
.tbl-note { font-size: 12px; color: var(--zm-text-muted); margin: 6px 0 0; }
pre.raw { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; line-height: 1.45; background: var(--zm-surface-2); border: 1px solid var(--zm-border); border-radius: 6px; padding: 12px 14px; overflow-x: auto; margin: 0; white-space: pre; }
.fn { margin: 6px 0 16px; padding: 12px 14px; background: var(--zm-surface-2); border-radius: 6px; font-size: 13px; color: var(--zm-text-muted); }
.fn b { color: var(--zm-text); font-weight: 600; }
.fn p { margin: 4px 0 0 !important; }

.amend { border: 1px solid var(--zm-amend); border-radius: 6px; margin: 4px 0 18px; overflow: hidden; }
.amend-h { background: var(--zm-amend-soft); padding: 10px 14px; font-size: 13px; }
.amend-h .tag { margin-right: 6px; }
.amend-h b { font-weight: 600; }
.amend-h .where { display: block; margin-top: 4px; color: var(--zm-text-muted); font-style: italic; }
.amend-b { padding: 14px 16px 2px; }
details.old { margin: 0 0 16px; border: 1px solid var(--zm-border); border-radius: 6px; }
details.old > summary { cursor: pointer; padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--zm-text-muted); }
details.old[open] > summary { border-bottom: 1px solid var(--zm-border); }
details.old .inner { padding: 14px 16px 4px; opacity: .8; }
details.old .inner p { text-decoration: none; }

.cite-btn { background: none; border: 1px solid var(--zm-border); border-radius: 6px; font: inherit; font-size: 12px; padding: 3px 8px; cursor: pointer; color: var(--zm-text-muted); }
.cite-btn:hover { color: var(--zm-red); border-color: var(--zm-red); }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pdf { font-size: 13px; font-weight: 600; text-decoration: none; color: var(--zm-text); border: 1px solid var(--zm-border); padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.pdf:hover { border-color: var(--zm-red); color: var(--zm-red); }

.mention-group { margin-bottom: 10px; }
.more-btn { display: block; margin: 8px auto 0; font: inherit; font-weight: 600; font-size: 15px; background: var(--zm-surface); border: 1px solid var(--zm-border); padding: 10px 18px; border-radius: 8px; cursor: pointer; color: var(--zm-text); }
.more-btn:hover { border-color: var(--zm-red); color: var(--zm-red); }

.pager { display: flex; justify-content: space-between; gap: 12px; margin: 36px 0 0; }
.pager a { flex: 1; text-decoration: none; padding: 14px 16px; }
.pager a:hover { border-color: var(--zm-red); }
.pager a small { display: block; }
.pager a b { font-size: 16px; }
.pager .next { text-align: right; }

/* ---------- przepisy (spis treści) */
.layout-2 { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 1000px) { .layout-2 { grid-template-columns: 360px 1fr; } .layout-2 aside { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; } }
.toc { font-size: 14px; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc ul ul { padding-left: 14px; margin-left: 10px; border-left: 1px solid var(--zm-border); }
.toc .row { display: flex; align-items: flex-start; gap: 2px; }
.toc .tg, .toc .tg-sp { flex: none; width: 22px; height: 26px; }
.toc .tg { display: grid; place-items: center; background: none; border: 0; padding: 0; cursor: pointer; color: var(--zm-text-muted); border-radius: 4px; }
.toc .tg:hover { color: var(--zm-text); background: var(--zm-surface-2); }
.toc .tg svg { transition: transform .15s; }
.toc .tg[aria-expanded="true"] svg { transform: rotate(90deg); }
.toc .row a { flex: 1; display: block; padding: 4px 8px; border-radius: 6px; text-decoration: none; line-height: 1.3; }
.toc .row a:hover { background: var(--zm-surface-2); }
.toc .row a.on { background: var(--zm-red); color: #fff; }
.toc .row a .n { color: var(--zm-text-muted); margin-right: 6px; font-variant-numeric: tabular-nums; }
.toc .row a.on .n { color: #fff; }
.toc ul ul ul .row a { font-size: 13px; }
.toc-head { margin: 0 0 10px; }
.toc-head p { font-weight: 700; margin: 0; }
.toc-all { display: flex; gap: 8px; margin: 4px 0 0 -4px; }
.toc-all button { background: none; border: 0; padding: 2px 4px; font: inherit; font-size: 12px; color: var(--zm-text-muted); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.toc-all button:hover { color: var(--zm-text); }
.annex-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.layout-2 aside { scrollbar-gutter: stable; }
.annex-tabs a { text-decoration: none; font-weight: 600; font-size: 13px; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--zm-border); background: var(--zm-surface); }
.annex-tabs a.on { background: var(--zm-black); color: #fff; border-color: var(--zm-black); }
.annex-list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.annex-list a { text-decoration: none; padding: 20px; }
.annex-list a .n { color: var(--accent-text); font-weight: 700; font-size: 14px; }
.annex-list a b { display: block; font-size: 17px; margin: 6px 0; line-height: 1.3; }
.children { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; }
.children a { text-decoration: none; display: block; padding: 10px 14px; }
.children a:hover { border-color: var(--zm-red); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600; font-size: 13px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--zm-border); background: var(--zm-surface); }
.chip img { width: 24px; height: 24px; object-fit: contain; background: #fff; border-radius: 50%; padding: 2px; }
.chip:hover { border-color: var(--zm-red); }
.chip.noimg { padding-left: 10px; }

/* ---------- wyszukiwanie */
.results { display: grid; gap: 10px; }
.result { padding: 14px 18px; text-decoration: none; display: block; }
.result:hover { border-color: var(--zm-red); }
.result .where { font-size: 13px; color: var(--zm-text-muted); margin-bottom: 4px; }
.result .where b { color: var(--accent-text); }
.result p { margin: 0; font-size: 15px; }
.result mark { background: var(--zm-mark); color: inherit; border-radius: 2px; padding: 0; }

/* ---------- nowelizacje */
.act { margin-bottom: 26px; }
.act-head { padding: 22px 24px; }
.act-head h3 { margin: 6px 0 8px; font-size: 19px; line-height: 1.3; }
.act-head .meta { font-size: 14px; color: var(--zm-text-muted); display: flex; flex-wrap: wrap; gap: 4px 16px; }
.affects { font-size: 13px; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ---------- strona "o bazie" */
.prose { max-width: 76ch; }
.prose p, .prose li { margin: 0 0 12px; }
.prose h2 { margin-top: 32px; }

/* ---------- stopka */
footer.site { background: var(--zm-black); color: #fff; padding: 40px 0 32px; margin-top: 40px; }
footer.site .wrap { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 900px) { footer.site .wrap { grid-template-columns: 1.2fr 1fr 1fr; } }
footer.site .logo { width: 170px; height: auto; display: block; margin: 0 0 18px; }
footer.site p { margin: 0 0 6px; font-size: 14px; color: #CFCFCF; }
footer.site a { color: #fff; text-decoration: none; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 4px; transition: text-decoration-color .15s; }
footer.site a:hover, footer.site a:focus-visible { text-decoration: underline; text-decoration-color: var(--zm-red); text-decoration-thickness: 2px; }
footer.site h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: #A3A3A3; margin-bottom: 10px; }
footer.site ul { list-style: none; padding: 0; margin: 0; font-size: 14px; }
footer.site li { margin-bottom: 6px; }
.disclaimer { font-size: 12px !important; color: #A3A3A3 !important; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--zm-black); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; z-index: 200; opacity: 0; pointer-events: none; transition: opacity .2s; }
.toast.on { opacity: 1; }
.empty { padding: 30px; text-align: center; color: var(--zm-text-muted); }
@media print {
  .topbar, footer.site, .toc-sticky, .cite-btn, .more-btn, .pager, .variants, .hero .chips { display: none !important; }
  body { background: #fff; } .card, .reg { box-shadow: none; }
}

/* tekst ujednolicony – fragmenty zmienione nowelizacjami */
.am-blk { border: 1px solid var(--zm-amend); background: var(--zm-amend-soft); border-radius: 6px; padding: 8px 14px 4px; margin: 6px 0 14px; }
.am-blk.del { border-color: var(--zm-red); background: var(--zm-red-soft); }
.am-tag { font-size: 12.5px; color: var(--zm-text-muted); margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.am-tag .tag { margin: 0; }
.am-tag a { color: inherit; }
.am-blk.del .tag.red { color: #fff; }
.am-note { font-style: italic; margin: 0 0 6px; }
.am-blk .fig, .am-blk .tbl-wrap { background: transparent; }
details.am-old { margin: 4px 0 8px; font-size: 13.5px; }
details.am-old summary { cursor: pointer; color: var(--zm-text-muted); font-size: 12.5px; }
details.am-old .inner { margin-top: 6px; padding: 8px 12px; border-radius: 4px; background: var(--zm-surface, #fff); opacity: .85; }
details.am-old .inner p { color: var(--zm-text-muted); }
