/* Budynki Warszawy by CleanWhale.
   Канон — design/DESIGN.md: futura-pt 400/500/700, чёрный текст, один синий
   #2457c6, жёлтый только на CTA-пилюле, радиусы clamp/6/999, тени — ореолы.
   Приглушение — opacity на чёрном; сплошной --cw99-muted только у блоков,
   внутри которых есть ссылки (opacity погасила бы и их).
   Оболочка — по утверждённому DogOS 99 (design/references/good/dogos-*). */

.bw {
  --cw99-blue: #2457c6;
  --cw99-blue-hover: #1c47a6;
  --cw99-yellow: #ffc73b;
  --cw99-yellow-soft: #ffea84;
  --cw99-card: #fafafa;
  --cw99-line: #e9e9e9;
  --cw99-muted: #5b6472;
  --cw99-chip: #eef2fc;
  --cw99-r: clamp(10px, 1.05vw, 16px);
  --cw99-r-lg: clamp(14px, 1.5vw, 20px);
  --gutter: 4vw;
  --gap-section: clamp(48px, 5.5vw, 104px);
  margin: 0;
  font-family: futura-pt, Futura, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: #000;
  background: #fff;
  -webkit-text-size-adjust: 100%;
}

.bw *, .bw *::before, .bw *::after { box-sizing: border-box; }
.bw :where(h1, h2, h3, p, ol, ul, dl, dd, figure) { margin: 0; }
.bw :where(ol, ul) { padding: 0; list-style: none; }
.bw a { color: var(--cw99-blue); text-decoration: none; }
.bw a:hover { text-decoration: underline; }
.bw img, .bw svg { display: block; max-width: 100%; }
.bw :focus-visible { outline: 2px solid var(--cw99-blue); outline-offset: 2px; }
.bw strong, .bw b { font-weight: 700; }

.bw-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bw-nw { white-space: nowrap; }
.bw-skip { position: absolute; left: -9999px; top: 0; }
.bw-skip:focus { left: 16px; top: 12px; z-index: 100; background: #fff; padding: 8px 14px; border-radius: 6px; }

/* ---------- Шапка ---------- */

.bw-top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 32px;
  min-height: 88px; padding: 12px var(--gutter);
  background: #fff;
}
.bw-logo { display: inline-flex; flex-direction: row; align-items: center; gap: 11px; line-height: 1; flex-shrink: 1; min-width: 0; }
.bw-logo-mark { width: 42px; height: auto; flex-shrink: 0; display: block; }
.bw-logo-text { display: flex; flex-direction: column; min-width: 0; }
/* Якоря (#miasta, #dzielnice, #inne-miasta) — ниже липкой шапки, а не под ней. */
.bw [id] { scroll-margin-top: 104px; }
.bw-logo:hover { text-decoration: none; }
.bw-logo-word { font-size: 28px; font-weight: 700; color: var(--cw99-blue); }
.bw-logo-by { font-size: 13px; font-weight: 500; color: var(--cw99-blue); margin-top: 5px; }
.bw-nav { display: flex; gap: 28px; margin: 0 auto; }
.bw-nav a { color: #000; font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
.bw-nav a:hover { color: var(--cw99-blue); text-decoration: none; }
.bw-cta {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px;
  border-radius: 999px; background: var(--cw99-yellow); color: #000 !important;
  font-weight: 700; font-size: 16px; white-space: nowrap; flex-shrink: 0;
}
.bw-cta:hover { background: var(--cw99-yellow-soft); text-decoration: none; }
.bw-menu { display: none; position: relative; }
.bw-menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; color: #000; }
.bw-menu summary::-webkit-details-marker { display: none; }
.bw-menu summary svg { width: 26px; height: 26px; }
.bw-menu nav {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50;
  display: flex; flex-direction: column; gap: 2px; min-width: 240px; padding: 10px;
  background: #fff; border-radius: var(--cw99-r); box-shadow: 0 0 max(14px, 1.2vw) rgba(0, 0, 0, .16);
}
.bw-menu nav a { color: #000; padding: 12px 14px; border-radius: 8px; font-size: 17px; }
.bw-menu nav a:hover { background: var(--cw99-chip); color: var(--cw99-blue); text-decoration: none; }

/* ---------- Типографика блоков ---------- */

.bw main { display: block; }
.bw h1 { font-size: clamp(38px, 4.4vw, 72px); line-height: 1.02; font-weight: 700; }
.bw h1 span { color: var(--cw99-blue); }
.bw h2 { font-size: clamp(22px, 1.95vw, 36px); line-height: 1.15; font-weight: 700; }
.bw-eyebrow { display: flex; align-items: center; gap: 10px; color: var(--cw99-blue); font-size: 15px; font-weight: 500; margin-bottom: 18px; }
.bw-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cw99-blue); flex-shrink: 0; }
.bw-lead { font-size: clamp(17px, 1.3vw, 21px); line-height: 1.45; margin-top: 22px; }
.bw-text { font-size: 17px; line-height: 1.55; margin-top: 12px; }
.bw-meta, .bw-note { opacity: .55; font-size: 14px; }
.bw-note { font-weight: 400 !important; margin-top: 4px; }
.bw-more { font-weight: 700; white-space: nowrap; }

/* ---------- Hero главной ---------- */

.bw-hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 5vw; align-items: start;
  padding: clamp(32px, 4vw, 72px) var(--gutter) var(--gap-section);
}
.bw-hero-text { padding-top: clamp(8px, 2vw, 40px); }
.bw-hero .bw-lead { width: 92%; }
.bw-search { position: relative; display: flex; gap: 10px; margin-top: 32px; }
.bw-search input {
  flex: 1; min-width: 0; height: 60px; padding: 0 18px;
  border: 0; border-radius: 6px; background: #fff; font: inherit; font-size: 18px; color: #000;
  box-shadow: inset 0 0 0 1px var(--cw99-line);
}
.bw-search input::placeholder { color: #000; opacity: .5; }
.bw-search input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--cw99-blue); }
.bw-search button {
  height: 60px; padding: 0 30px; border: 0; border-radius: 6px; cursor: pointer;
  background: var(--cw99-blue); background-image: none; color: #fff; font: inherit; font-size: 18px; font-weight: 700;
}
.bw-search button:hover { background: var(--cw99-blue-hover); }
.bw-search--inline { margin-top: 24px; }
.bw-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 61;
  background: #fff; border-radius: var(--cw99-r); padding: 6px;
  box-shadow: 0 0 max(14px, 1.2vw) rgba(0, 0, 0, .16);
}
.bw-suggest a { display: flex; justify-content: space-between; gap: 16px; padding: 12px; border-radius: 8px; color: #000; }
.bw-suggest a:hover, .bw-suggest [aria-selected="true"] a { background: var(--cw99-chip); color: var(--cw99-blue); text-decoration: none; }
.bw-suggest small { opacity: .55; font-size: 14px; white-space: nowrap; }
.bw-examples { margin-top: 16px; font-size: 15px; color: var(--cw99-muted); }

.bw-hero-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.bw-hero-tile { position: relative; display: block; border-radius: var(--cw99-r); overflow: hidden; }
.bw-hero-tile img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.bw-hero-tile span { position: absolute; left: 10px; bottom: 10px; padding: 4px 10px; border-radius: 999px; background: #fff; color: #000; font-weight: 700; font-size: 15px; box-shadow: 0 0 10px rgba(0, 0, 0, .12); }
.bw-hero-tile:hover span { color: var(--cw99-blue); }
.bw-hero-grid figcaption { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; margin-top: 2px; font-size: 14px; }
.bw-hero-grid figcaption > span:first-child { opacity: .55; }
.bw-muted { color: var(--cw99-muted); font-size: 15px; }
.bw-hero-map a { display: block; border-radius: var(--cw99-r-lg); overflow: hidden; }
.bw-hero-map img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.bw-hero-map figcaption { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; font-size: 14px; }
.bw-hero-map figcaption > span:first-child { opacity: .55; }
.bw-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: #000; }
.bw-legend span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.bw-legend i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }

/* ---------- Секции ---------- */

.bw-section { padding: 0 var(--gutter) var(--gap-section); }
.bw-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 22px; flex-wrap: wrap; }
.bw-section-head p { opacity: .55; font-size: 15px; }
.bw-split { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 5vw; align-items: start; }
.bw-split > div > p { font-size: 17px; line-height: 1.55; margin-top: 14px; }

/* ---------- Таблицы ---------- */

.bw-table-wrap { overflow-x: auto; }
.bw-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.bw-table th, .bw-table td { text-align: left; padding: 13px 16px 13px 0; border-bottom: 1px solid var(--cw99-line); vertical-align: baseline; }
.bw-table thead th { font-size: 14px; font-weight: 500; color: rgba(0, 0, 0, .55); }
.bw-table tbody th { font-weight: 700; }
.bw-table .bw-n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bw-table--addr th:first-child, .bw-table--addr td:first-child { padding-left: 10px; }
.bw-table--addr { margin-left: -10px; width: calc(100% + 10px); }
.bw-table tr.bw-here { background: var(--cw99-chip); }
.bw-barcell { width: 30%; white-space: nowrap; }
.bw-track { display: inline-block; width: clamp(56px, 16vw, 240px); margin-right: 12px; vertical-align: middle; }
.bw-bar { display: block; height: 10px; border-radius: 0 4px 4px 0; background: var(--cw99-blue); }
.bw-barval { font-variant-numeric: tabular-nums; }

/* ---------- Usługi pod tym adresem ---------- */

/* Действие стоит сразу за текстом, а не у правого края: колонки общие для всех строк. */
.bw-uslugi li {
  display: grid; grid-template-columns: 150px minmax(0, 62ch) 9.5em; justify-content: start; gap: 4px 32px;
  align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--cw99-line);
}
.bw-uslugi-name { font-size: 18px; font-weight: 700; }
.bw-uslugi-text { font-size: 16px; line-height: 1.5; }
.bw-uslugi-go { font-weight: 700; white-space: nowrap; }
.bw-uslugi-links { grid-column: 2; display: flex; flex-wrap: wrap; gap: 0 20px; }
.bw-uslugi-links a { font-weight: 700; white-space: nowrap; }

/* ---------- Рейтинги ---------- */

.bw-rank-main a::after { content: ""; position: absolute; inset: 0; }
.bw-rank li {
  position: relative;
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 4px 18px; align-items: baseline;
  padding: 14px 0; border-bottom: 1px solid var(--cw99-line); break-inside: avoid;
}
.bw-rank-no { font-size: 20px; font-weight: 700; color: var(--cw99-blue); font-variant-numeric: tabular-nums; }
.bw-rank-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bw-rank-main a { font-size: 18px; font-weight: 700; color: #000; }
.bw-rank li:hover .bw-rank-main a { color: var(--cw99-blue); text-decoration: none; }
.bw-rank-val { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.bw-rank-val b { font-size: 20px; white-space: nowrap; }
.bw-rank-note { margin-top: 14px; }

/* ---------- График ---------- */

.bw-chart { position: relative; margin: 0; }
.bw-chart svg { width: 100%; height: auto; font-family: futura-pt, Futura, sans-serif; }
.bw-chart .bw-svg-narrow { display: none; }
.bw-chart .bw-grid line { stroke: var(--cw99-line); stroke-width: 1; }
.bw-chart text { fill: #000; fill-opacity: .55; }
.bw-chart .bw-end { font-weight: 700; fill-opacity: 1; font-size: 1.15em; }
.bw-chart .bw-end-year { font-weight: 400; fill-opacity: .55; font-size: .85em; }
.bw-chart .bw-line { fill: none; stroke: var(--cw99-blue); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.bw-chart .bw-dots circle { fill: var(--cw99-blue); stroke: #fff; stroke-width: 2; }
.bw-chart .bw-cross { stroke: #000; stroke-width: 1; opacity: 0; }
.bw-chart.is-hover .bw-cross { opacity: .3; }
.bw-chart .bw-hit { fill: transparent; }
.bw-chart .bw-hit:focus { outline: none; }
.bw-tip {
  position: absolute; z-index: 5; pointer-events: none;
  display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; white-space: nowrap;
  background: #fff; border-radius: 8px; box-shadow: 0 0 max(9px, 1vw) rgba(0, 0, 0, .16); font-size: 14px;
}
.bw-tip[hidden] { display: none; }
.bw-tip b { font-size: 16px; }
.bw-tip span { opacity: .55; }
.bw-datatable { margin-top: 12px; font-size: 15px; }
.bw-datatable summary { cursor: pointer; color: var(--cw99-blue); font-weight: 500; width: fit-content; }
.bw-datatable .bw-table { margin-top: 8px; font-size: 15px; }

/* ---------- Цены на странице здания и улицы ---------- */

.bw-price { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, .55fr); gap: 5vw; align-items: start; }
.bw-price .bw-chart { margin-top: 28px; }
.bw-bignum { font-size: clamp(44px, 4.8vw, 76px); font-weight: 700; line-height: 1; margin-top: 4px; white-space: nowrap; }
.bw-bignum span { font-size: .42em; font-weight: 500; }
.bw-compare { display: flex; flex-direction: column; gap: 22px; padding-top: 58px; }
.bw-compare dt { font-size: 15px; }
.bw-compare dt a { font-weight: 500; }
.bw-compare dd { font-size: 24px; font-weight: 700; margin-top: 4px; }
.bw-compare dd.bw-note { font-size: 14px; }

/* ---------- Полоса CleanWhale ---------- */

.bw-band {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center;
  margin: 0 var(--gutter) var(--gap-section); padding: clamp(28px, 3.2vw, 52px);
  background: var(--cw99-chip); border-radius: var(--cw99-r-lg);
}
.bw-band-eyebrow { color: var(--cw99-blue); font-size: 15px; font-weight: 500; margin-bottom: 10px; }
.bw-band h2 + p { margin-top: 10px; font-size: 17px; }
.bw-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px;
  border-radius: 6px; background: var(--cw99-blue); color: #fff !important; font-weight: 700; font-size: 17px; white-space: nowrap;
}
.bw-btn:hover { background: var(--cw99-blue-hover); text-decoration: none; }

/* ---------- Здание, улица, дзельница ---------- */

.bw-crumbs { display: flex; flex-wrap: wrap; gap: 0 8px; padding: 20px var(--gutter) 0; font-size: 15px; color: var(--cw99-muted); }
.bw-crumbs a { color: var(--cw99-muted); }
.bw-crumbs [aria-current] { color: #000; }
.bw-bhead { padding: clamp(24px, 3vw, 48px) var(--gutter) clamp(28px, 3vw, 48px); }
.bw-bhead h1 { font-size: clamp(34px, 3.8vw, 64px); }
.bw-bhead .bw-lead { width: 64%; }
.bw-sub { font-size: clamp(17px, 1.3vw, 21px); margin-top: 12px; }
.bw-alt { margin-top: 10px; font-size: 16px; }

.bw-facts-wrap {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 5vw; align-items: start;
  padding: 0 var(--gutter) var(--gap-section);
}
.bw-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 36px; }
.bw-facts dt { font-size: 15px; opacity: .55; }
.bw-facts dd { font-size: clamp(26px, 2.3vw, 38px); font-weight: 700; line-height: 1.1; margin-top: 6px; }
.bw-facts dd:not(.bw-note) { white-space: nowrap; }
.bw-facts dd.bw-note { font-size: 14px; line-height: 1.35; }
.bw-facts-gap { margin-top: 28px; font-size: 15px; line-height: 1.5; color: var(--cw99-muted); }
.bw-plaques { display: grid; gap: 20px; max-width: 860px; }
.bw-plaques li { padding: 18px 22px; background: var(--cw99-card); border-radius: var(--cw99-r); }
.bw-plaque-text { font-size: clamp(18px, 1.4vw, 21px); line-height: 1.45; }
.bw-plaque-meta { margin-top: 6px; font-size: 15px; color: var(--cw99-muted); }
.bw-history .bw-text { margin-top: 20px; }
.bw-history-src { margin-top: 18px; font-size: 13.5px; color: var(--cw99-muted); }
.bw-facts--row { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0 var(--gutter) var(--gap-section); }
.bw-footprint .bw-plan, .bw-streetplan .bw-plan { width: 100%; height: auto; border-radius: var(--cw99-r); }
.bw-plan text { font-family: futura-pt, Futura, sans-serif; fill: #000; }
.bw-footprint figcaption { margin-top: 12px; font-size: 14px; color: var(--cw99-muted); }
.bw-footprint figcaption a { font-weight: 700; }
.bw-streetplan { padding: 0 var(--gutter) var(--gap-section); }
.bw-streetplan figcaption { margin-top: 12px; font-size: 14px; opacity: .55; }
.bw-plan-own a:hover path, .bw-plan-own a:focus path { fill: var(--cw99-blue-hover); }

.bw-streets { columns: 4 220px; column-gap: 36px; }
.bw-streets li { break-inside: avoid; padding: 5px 0; font-size: 16px; }
.bw-streets a { color: var(--cw99-blue); }
.bw-streets a:hover { color: var(--cw99-blue-hover); }
.bw-allstreets { margin-top: 24px; }
.bw-allstreets .bw-streets { margin-top: 16px; }

.bw-results li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 14px 0; border-bottom: 1px solid var(--cw99-line); }
.bw-results a { font-size: 19px; font-weight: 700; }

.bw-sources { padding: 0 var(--gutter) var(--gap-section); font-size: 13.5px; line-height: 1.55; color: var(--cw99-muted); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.bw-sources b { color: #000; font-weight: 500; }

.bw-prose h2 { margin: 44px 0 12px; }
.bw-prose h2:first-child { margin-top: 0; }
.bw-prose p { font-size: 17px; line-height: 1.6; margin-top: 12px; width: 70%; }
.bw-prose .bw-table-wrap { margin-top: 8px; }

/* ---------- Карта ---------- */

.bw-mapwrap { position: relative; }
.bw-map { height: calc(100vh - 88px); height: calc(100dvh - 88px); min-height: 480px; background: #f2f3f0; }
.bw-map-panel {
  position: absolute; left: var(--gutter); top: 24px; z-index: 2; width: clamp(280px, 26vw, 380px);
  padding: 20px 22px; background: #fff; border-radius: var(--cw99-r);
  box-shadow: 0 0 max(14px, 1.2vw) rgba(0, 0, 0, .16);
}
.bw-map-panel h1 { font-size: 26px; }
.bw-map-panel p { margin-top: 10px; font-size: 15px; }
.bw-map-panel .bw-legend { margin-top: 14px; }
.bw-map-tap { display: none; }
.bw-map-hint { color: var(--cw99-blue); font-weight: 700; }
.bw-pop { font-family: futura-pt, Futura, sans-serif; font-size: 14px; color: #000; min-width: 220px; }
.bw-pop > a, .bw-pop > strong { font-size: 17px; font-weight: 700; padding-right: 18px; display: block; }
.bw-pop > p { opacity: .55; margin-top: 2px; }
.bw-pop dl { display: grid; grid-template-columns: auto auto; gap: 4px 14px; margin-top: 10px; }
.bw-pop dt { opacity: .55; }
.bw-pop dd { margin: 0; font-weight: 700; text-align: right; }
.bw-map .maplibregl-popup-content { border-radius: var(--cw99-r); padding: 14px 16px; box-shadow: 0 0 max(9px, 1vw) rgba(0, 0, 0, .16); }

/* ---------- Согласие на cookies (public/analytics.js) ---------- */

.bw-consent {
  position: fixed; left: var(--gutter); right: var(--gutter); bottom: 16px; z-index: 60;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 16px 20px;
  background: #fff; border-radius: var(--cw99-r); box-shadow: 0 0 max(14px, 1.2vw) rgba(0, 0, 0, .2);
  font-family: futura-pt, Futura, sans-serif; font-size: 15px; line-height: 1.45; color: #000;
}
.bw-consent p { flex: 1 1 320px; margin: 0; }
.bw-consent p a { color: var(--cw99-blue); }
.bw-consent-actions { display: flex; gap: 10px; flex: 0 0 auto; }
/* Обе кнопки одного веса: блёклый «отказ» — тёмный паттерн (так же на доске 99). */
.bw-consent button {
  min-height: 44px; padding: 0 22px; border: 0; border-radius: 6px; cursor: pointer;
  background: var(--cw99-blue); color: #fff; font: inherit; font-weight: 700;
}
.bw-consent button:hover { background: var(--cw99-blue-hover); }

/* ---------- Футер ---------- */

.bw-foot { background: var(--cw99-card); padding: clamp(40px, 4vw, 64px) var(--gutter) 32px; }
.bw-foot-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, .8fr); gap: 40px; }
.bw-foot-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 700; color: var(--cw99-blue); }
.bw-foot-mark { width: 38px; height: auto; flex-shrink: 0; }
.bw-foot-brand span { font-size: 14px; font-weight: 500; }
.bw-foot-about p + p { margin-top: 12px; font-size: 15px; width: 90%; }
.bw-foot h2 { font-size: 17px; margin-bottom: 12px; }
.bw-foot li { padding: 4px 0; font-size: 15px; }
.bw-foot-cols { columns: 2; column-gap: 24px; }
.bw-foot-legal { margin-top: 40px; font-size: 13px; line-height: 1.5; color: var(--cw99-muted); }

/* ---------- Широкие экраны: рейтинги в две колонки ---------- */

@media (min-width: 1026px) {
  .bw-streetplan .bw-plan { max-height: 60vh; }
  .bw-home .bw-rank, .bw-tallest .bw-rank, .bw-prices .bw-rank, .bw-district .bw-rank { columns: 2; column-gap: 5vw; }
}

/* ---------- Брейкпоинты канона: ≤760 / 761–1025 / 1026–1440 / >1440 ---------- */

@media (max-width: 1250px) {
  .bw-nav { gap: 18px; }
  .bw-nav a { font-size: 14.5px; }
  /* «Budynki Piotrkowa Trybunalskiego» иначе встаёт в две строки — город есть в H1. */
  .bw-logo--long .bw-logo-city { display: none; }
}

@media (max-width: 1025px) {
  .bw-nav { display: none; }
  .bw-top > .bw-cta { margin-left: auto; }
  .bw-menu { display: block; }
  .bw-hero { grid-template-columns: 1fr; }
  .bw-hero-text { padding-top: 0; }
  .bw-hero-map img { aspect-ratio: 16 / 10; }
  .bw-hero-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .bw-hero .bw-lead, .bw-bhead .bw-lead, .bw-prose p { width: auto; }
  .bw-split, .bw-facts-wrap, .bw-sources, .bw-price { grid-template-columns: 1fr; }
  .bw-compare { flex-direction: row; flex-wrap: wrap; gap: 20px 40px; padding-top: 32px; }
  .bw-facts--row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bw-foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bw-map-panel { width: auto; right: var(--gutter); }
}

@media (max-width: 760px) {
  .bw { --gutter: 5vw; }
  .bw-hide-sm { display: none; }
  .bw-uslugi li { grid-template-columns: minmax(0, 1fr); padding: 14px 0 4px; }
  .bw-uslugi-go { display: inline-block; padding: 11px 0; justify-self: start; }
  .bw-uslugi-links { grid-column: 1; }
  .bw-uslugi-links a { display: inline-flex; align-items: center; min-height: 44px; }
  .bw-top { min-height: 68px; gap: 10px; }
  .bw [id] { scroll-margin-top: 84px; }
  .bw-logo-word { font-size: 22px; }
  .bw-logo-city { display: none; }
  .bw-logo-by { font-size: 12px; margin-top: 4px; }
  .bw-top > .bw-cta { min-height: 44px; padding: 0 16px; font-size: 15px; }
  .bw h1 { font-size: clamp(34px, 10.5vw, 46px); }
  .bw-bhead h1 { font-size: clamp(30px, 9vw, 42px); }
  .bw-search { flex-direction: column; }
  .bw-search input { flex: none; width: 100%; height: 56px; }
  .bw-search button { height: 56px; }
  .bw-suggest { top: 62px; }
  .bw-examples a { display: inline-block; padding: 11px 0; }
  .bw-crumbs > * { padding: 11px 0; }
  .bw-crumbs { padding-top: 8px; }
  .bw-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
  .bw-facts dd:not(.bw-note) { font-size: clamp(22px, 6.2vw, 28px); }
  .bw-compare { flex-direction: column; }
  .bw-band { grid-template-columns: 1fr; }
  .bw-table { font-size: 15px; }
  .bw-table th, .bw-table td { padding-right: 10px; }
  .bw-table tbody th { white-space: nowrap; }
  .bw-table tbody th a { display: block; padding: 12px 0; margin: -12px 0; }
  .bw-chart .bw-svg-wide { display: none; }
  .bw-chart .bw-svg-narrow { display: block; }
  .bw-datatable summary { padding: 10px 0; }
  .bw-plan text { font-size: 22px; }
  .bw-plan--street text { font-size: 34px; }
  .bw-rank-main a::after { content: ""; position: absolute; inset: 0; }
.bw-rank li {
  position: relative; grid-template-columns: 30px minmax(0, 1fr) auto; column-gap: 12px; }
  .bw-rank-main a { font-size: 17px; }
  .bw-rank-val .bw-meta { display: none; }
  .bw-rank-val b { font-size: 18px; }
  .bw-streets { columns: 2; column-gap: 18px; }
  .bw-streets li { padding: 0; }
  .bw-streets a { display: block; padding: 11px 0; }
  .bw-streets .bw-meta { display: none; }
  .bw-about .bw-table tbody th { white-space: normal; }
  .bw-more, .bw-footprint figcaption a { display: inline-block; padding: 11px 0; }
  .bw-suggest a { flex-direction: column; gap: 2px; }
  .bw-suggest small { white-space: normal; }
  .bw-foot-grid { grid-template-columns: 1fr; gap: 28px; }
  .bw-foot li { padding: 0; }
  .bw-foot li a { display: inline-block; padding: 11px 0; }
  .bw-map { height: calc(100vh - 68px); height: calc(100dvh - 68px); }
  .bw-map-panel { top: auto; bottom: 64px; padding: 14px 16px; }
  .bw-map-panel h1 { font-size: 20px; }
  .bw-map-panel p:not(.bw-legend):not(.bw-map-hint):not(.bw-map-tap) { display: none; }
  .bw-map-tap { display: block; }
  .bw-hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bw-consent { left: 12px; right: 12px; bottom: 12px; }
  .bw-consent-actions { width: 100%; }
  .bw-consent button { flex: 1; }
}

/* Wiadomości miejsca: separate direct-address and wider context. */
.bw .bw-news-list{list-style:none;margin:18px 0;padding:0;max-width:850px}
.bw .bw-news-list li{padding:15px 0;border-bottom:1px solid rgba(0,0,0,.12)}
.bw .bw-news-list a{font-size:21px;line-height:1.25;overflow-wrap:anywhere}
.bw .bw-news-list p{font-size:15px;margin:7px 0 0;color:rgba(0,0,0,.6)}
.bw .bw-news-context summary{cursor:pointer;min-height:44px;padding:10px 0;color:#2457c6}
.bw .bw-news-context .bw-news-list a{font-size:18px}
.bw .bw-local-news .bw-note{max-width:850px}
.bw .bw-pop-news{border-top:1px solid rgba(0,0,0,.14);padding-top:10px;font-size:14px}
.bw .bw-pop-news a{display:block;margin:7px 0;font-size:15px;line-height:1.2}

.bw .bw-news-list .bw-note{color:#000;opacity:.6}

/* Kody pocztowe & pigułki sąsiednich adresów/kodów */
.bld-siblings-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.bld-sib-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px;
  border-radius: 999px; border: 1px solid #dbe3ef; background: #fff;
  color: #1e293b; font-size: 14px; font-weight: 600;
}
.bld-sib-pill:hover { border-color: var(--cw99-blue); color: var(--cw99-blue); text-decoration: none; }
.bld-sib-pill.is-current { background: var(--cw99-blue); border-color: var(--cw99-blue); color: #fff !important; }
.bw-pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.bw-pc-card {
  display: flex; flex-direction: column; gap: 6px; padding: 16px 18px;
  border-radius: 14px; border: 1px solid #e2e8f0; background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03); color: #0f172a;
}
.bw-pc-card:hover { border-color: var(--cw99-blue); text-decoration: none; }
.bw-pc-code { font-size: 21px; font-weight: 700; color: var(--cw99-blue); }
.bw-pc-meta { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; color: #475569; }
.bw-pc-price { margin-top: 4px; font-size: 15px; font-weight: 700; color: #0f172a; }
.bw-sub-pc { color: inherit; border-bottom: 1px dashed rgba(36, 87, 198, 0.45); }
.bw-sub-pc:hover { color: var(--cw99-blue); text-decoration: none; border-bottom-style: solid; }
.bw-postcode .bw-facts-strip { display: block; max-width: var(--max); margin: 0 auto 24px; padding: 20px 16px; background: #fff; border: 1px solid #e6ebf2; border-radius: 16px; box-shadow: 0 2px 10px rgba(15, 23, 42, .03); }
.bw-postcode .bw-facts-5col { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px 0; margin: 0; padding: 0; border: 0; }
.bw-postcode .bw-fact-cell { padding: 4px 20px; border-right: 1px solid #e6ebf2; display: flex; flex-direction: column; gap: 4px; }
.bw-postcode .bw-fact-cell:last-of-type { border-right: 0; }
.bw-postcode .bw-fact-cell dd { font-size: clamp(22px, 2vw, 28px); font-weight: 700; line-height: 1.15; margin: 0; color: #0f172a; }
.bw-postcode .bw-fact-cell dt { font-size: 13px; color: #64748b; margin: 0; }
@media (max-width: 720px) { .bw-postcode .bw-fact-cell { border-right: 0; padding: 6px 12px; } }
