:root {
  color-scheme: light;
  --bg:#f5f7f4; --surface: rgba(255, 255, 255, 0.92); --ink:#19201c; --muted:#65716a; --line:#dde3da;
  --accent:#2f6f5e; --accent-ink:#1d4a3e; --accent-soft:#e3efe9; --warn:#9a5c00;
  --shadow:0 8px 28px rgba(20,32,26,.10); --radius:14px;
  --sidebar-w:600px; /* +25% */
}
* { box-sizing:border-box; }
html, body { width:100%; height:100%; min-height:100%; }
body { margin:0; font-size:16px; font-family:'SN Pro', Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; background:var(--bg); color:var(--ink); overflow:hidden; }
button { font:inherit; cursor:pointer; }

.app {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:auto minmax(0,1fr);
  height:100vh;      /* fallback dla starszych przegladarek */
  height:100dvh;     /* mobilny viewport bez problemu paska adresu */
  min-height:0;
}

/* ===== Pasek gorny (staly element: brand + opis modulu + karty) ===== */
.topbar { grid-column:1 / -1; display:flex; align-items:center; gap:16px; padding:10px 16px; min-height:86px; background:var(--surface); border-bottom:1px solid var(--line); z-index:10; }
.desc-inline { flex:0 1 300px; min-width:200px; }
.desc-inline .desc-eyebrow { margin:0 0 1px; font-size:10.5px; }
.desc-inline .desc-title { font-size:15.5px; font-weight:700; margin:0; line-height:1.2; }
.topbar .cards { flex:1 1 auto; display:flex; gap:10px; margin:0; min-width:0; }
.topbar .card { flex:1 1 0; min-width:0; }
.topbar .card-value { font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.topbar .card-label { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ===== Sidebar ===== */
.app { position:relative; }
/* panel plywajacy NAD mapa: mapa zajmuje cala szerokosc, w przeswitach zawsze widac mape */
.sidebar { grid-column:1; grid-row:2; position:absolute; top:12px; left:12px; bottom:12px; width:calc(var(--sidebar-w) - 12px); z-index:5; display:flex; flex-direction:column; min-height:0; background:var(--surface); border:1px solid var(--line); border-radius:14px; box-shadow:var(--shadow); overflow:hidden; }
.map-wrap { grid-column:1; grid-row:2; }

/* zwijanie lewej sekcji: zostaje plywajacy pasek z dropdownem */
/* zwiniety pasek: ta sama pozycja i szerokosc co rozwiniety — guzik zwin/rozwin zostaje w tym samym miejscu */
.app.panel-collapsed .sidebar { bottom:auto; height:auto; z-index:9; }
.app.panel-collapsed .module-nav { padding-bottom:12px; }
.app.panel-collapsed .sidebar .items,
.app.panel-collapsed .sidebar .module-counter { display:none; }
.panel-toggle { font-size:15px; }
.app.panel-collapsed .panel-toggle { background:var(--accent); border-color:var(--accent); color:#fff; }

.brand { display:flex; align-items:center; gap:12px; flex:0 0 auto; }
.brand-logo { width:42px; height:42px; border-radius:12px; background:linear-gradient(135deg,var(--accent),#4d9a82); display:grid; place-items:center; flex:0 0 auto; }
.brand-logo svg { width:24px; height:24px; }
.brand-name { font-weight:700; font-size:15px; line-height:1.1; }
.brand-sub { color:var(--muted); font-size:11.5px; margin-top:2px; }
.brand-account { margin-left:auto; display:flex; gap:8px; }
.btn { border:1px solid var(--line); background:var(--surface); color:var(--ink); border-radius:10px; padding:7px 12px; font-size:12.5px; font-weight:600; }
.btn:hover { border-color:var(--accent); color:var(--accent-ink); }
.btn-primary { background:var(--accent); border-color:var(--accent); color:#fff; }
.btn-primary:hover { background:var(--accent-ink); color:#fff; }

.module-nav { display:flex; align-items:center; gap:8px; padding:12px 16px 4px; }
.nav-arrow { width:38px; height:38px; flex:0 0 auto; border:1px solid var(--line); background:#e5e5e5; border-radius:10px; font-size:16px; font-weight:700; color:var(--accent-ink); display:grid; place-items:center; }
.nav-arrow:hover { background:var(--accent-soft); border-color:var(--accent); }
.module-select {
  flex:1;
  min-width:0;
  height:38px;
  border:1px solid var(--line);
  border-radius:10px;
  background-color:var(--surface);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%231f2937' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 12px center;
  background-size:14px 8px;
  padding:0 36px 0 10px;
  appearance:none;
  -webkit-appearance:none;
  font:inherit;
  font-size:13.5px;
  font-weight:600;
  color:var(--ink);
}
.module-select::-ms-expand { display:none; }
.module-counter { color:var(--muted); font-size:12px; text-align:right; padding:2px 18px 0; }

.desc-eyebrow { color:var(--muted); font-size:11.5px; margin:0 0 3px; letter-spacing:.02em; }
.card { background:var(--bg); border:1px solid var(--line); border-radius:10px; padding:8px 10px; }
.card-label { color:var(--muted); font-size:10.8px; text-transform:uppercase; letter-spacing:.04em; }
.card-value { font-size:15.5px; font-weight:700; margin-top:2px; word-break:break-word; }

.items { flex:1; min-height:0; overflow-y:auto; padding:12px 14px 14px; display:flex; flex-direction:column; gap:8px; }
/* summary.message: systemowe podsumowanie modulu w panelu tresci, nad wykresami i kartami */
.summary-message {
  border:1px solid var(--line);
  background:var(--bg);
  border-radius:12px;
  padding:10px 12px;
  color:var(--ink);
  font-size:12.4px;
  line-height:1.5;
  white-space:pre-line;
}
.summary-message[hidden] { display:none; }
.module-info-link-wrap {
  display:flex;
  justify-content:flex-end;
  margin-top:9px;
  padding-top:8px;
  border-top:1px solid color-mix(in srgb, var(--line) 72%, transparent);
}
.module-info-link {
  display:inline-flex;
  align-items:center;
  gap:5px;
  color:var(--accent);
  font-size:11.8px;
  font-weight:650;
  line-height:1.25;
  text-decoration:none;
}
.module-info-link:hover { text-decoration:underline; text-underline-offset:2px; }
.module-info-icon {
  width:16px;
  height:16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid currentColor;
  border-radius:50%;
  font-size:10px;
  font-weight:800;
  font-family:Georgia,serif;
  line-height:1;
}
@media (max-width:720px) {
  .module-info-link-wrap { justify-content:flex-start; }
}

/* summary.facts — kompaktowe parametry modulu nad wykresami */
.summary-facts {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px 12px;
  margin-top:10px;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface);
}
.summary-facts[hidden] { display:none; }
.summary-facts-title {
  grid-column:1 / -1;
  color:var(--ink);
  font-size:12.8px;
  line-height:1.3;
  font-weight:700;
  padding-bottom:3px;
  margin-bottom:1px;
  border-bottom:1px solid var(--line);
}
.summary-fact {
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:1px;
}
.summary-fact.wide { grid-column:1 / -1; }
.summary-fact-label {
  color:var(--muted);
  font-size:10.8px;
  line-height:1.25;
}
.summary-fact-value {
  color:var(--ink);
  font-size:12.2px;
  line-height:1.3;
  font-weight:650;
}
.items-caption { color:var(--muted); font-size:11.5px; text-transform:uppercase; letter-spacing:.05em; padding:2px 2px 0; }
.items-table-wrap { border:1px solid var(--line); border-radius:12px; overflow:hidden; background:var(--surface); }
.items-table { width:100%;border-collapse:collapse; table-layout:fixed; font-size:11.2px; }
.items-table th { padding:7px 8px; color:var(--muted); background:color-mix(in srgb, var(--surface) 82%, var(--line)); border-bottom:1px solid var(--line); font-size:10.3px; font-weight:650; line-height:1.15; text-align:left; white-space:normal; }
.items-table td { padding:8px 8px; border-bottom:1px solid color-mix(in srgb, var(--line) 70%, transparent); line-height:1.25; vertical-align:middle; overflow-wrap:anywhere; }
.items-table tbody tr:last-child td { border-bottom:0; }
.items-table th.is-numeric, .items-table td.is-numeric { text-align:right; white-space:nowrap; }
.items-table th.text, .items-table td.text { width:30%; }
.items-table-row { cursor:pointer; transition:background .12s ease; }
.items-table-row:hover, .items-table-row:focus-visible { background:var(--accent-soft); outline:none; }
.items-table-row.is-selected { background:var(--accent-soft); box-shadow:inset 3px 0 0 var(--accent); }
.items-table-row.is-info { cursor:default; color:var(--muted); }
.items-table-badge { display:inline-block; padding:2px 6px; border-radius:999px; background:#e7f5ec; color:#23613b; font-size:10.4px; font-weight:700; white-space:nowrap; }
@media (max-width:700px) {
  .items-table { font-size:10.7px; }
  .items-table th, .items-table td { padding-left:6px; padding-right:6px; }
}
.item-card { border:1px solid var(--line); background:var(--surface); border-radius:12px; overflow:hidden; }
.item-card > button { display:block; width:100%; text-align:left; border:0; background:none; padding:10px 12px; }
.item-card:hover { border-color:var(--accent); }
/* karta wylacznie informacyjna (item.meta.infoOnly): bez interakcji, stonowana */
.item-card.is-info { border-style:dashed; background:color-mix(in srgb, var(--surface) 70%, var(--line)); }
.item-card.is-info:hover { border-color:var(--line); }
.item-card.is-info > button { cursor:default; }
.item-card.is-selected { border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-soft); background:#fbfdfc; }
.item-head { display:flex; align-items:baseline; gap:8px; }
.item-title { font-weight:650; font-size:13.5px; flex:1; min-width:0; }
.item-primary { font-weight:700; font-size:13px; color:var(--accent-ink); white-space:nowrap; }
.item-sub { color:var(--muted); font-size:12px; margin-top:2px; white-space:pre-line; }
.item-relation { color:var(--warn); font-size:11.5px; margin-top:2px; font-weight:600; }
.badges { display:flex; flex-wrap:wrap; gap:5px; margin-top:7px; }
.badge { background:#eef1ef; color:#4f5b55; border:1px solid #d7ddd9; font-size:10.5px; font-weight:700; padding:2.5px 8px; border-radius:99px; }
.badge-tone-neutral { background:#eef1ef; color:#4f5b55; border-color:#d7ddd9; }
.badge-tone-success { background:#e7f5ec; color:#23613b; border-color:#b9ddc6; }
.badge-tone-info { background:#fff7cc; color:#8a6500; border-color:#f2d66b; }
.badge-tone-warning { background:#fff4dc; color:#8a5a00; border-color:#ead09a; }
.badge-tone-danger { background:#fdeaea; color:#9a3333; border-color:#efbcbc; }
.facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px 10px; margin-top:8px; }
.fact { font-size:11.6px; }
.cards-filter-reset { margin-left:auto; padding:3px 10px; border:1px solid var(--accent); border-radius:999px; background:var(--accent); color:#fff; font:inherit; font-size:11px; font-weight:700; letter-spacing:.02em; cursor:pointer; text-transform:none; }
.cards-filter-reset:hover { filter:brightness(1.08); }
.items-caption:has(.cards-filter-reset) { display:flex; align-items:center; gap:10px; }
.popup-line { display:block; white-space:normal; overflow-wrap:anywhere; word-break:normal; max-width:100%; } /* v3.12: logiczna linia tooltipu pozostaje osobnym wierszem, ale dlugi tekst moze zawijac sie wewnatrz popupu */
.fact.wide { grid-column:1 / -1; } /* fakt na cala szerokosc karty (config: "wide": true) */
.item-footer { margin:0 12px 10px; padding-top:6px; border-top:1px dashed var(--line); } /* fakty z "footer": true — dol karty */
.fact-label { color:var(--muted); }
.fact-value { font-weight:600; white-space:pre-line; }
.item-desc { color:var(--muted); font-size:11.8px; margin-top:7px; line-height:1.4; }
.item-links { display:flex; flex-wrap:wrap; align-items:center; gap:6px 14px; margin:0 12px 10px; }
.item-link { display:inline-block; margin:0; font-size:12px; color:var(--accent-ink); font-weight:600; }
.items-empty { color:var(--muted); font-size:12.5px; padding:8px 2px; }

/* wykresy podsumowania */
.charts { margin-top:12px; display:flex; flex-direction:column; gap:10px; }
.chart { border-top:1px solid var(--line); padding-top:9px; }
.chart-title { font-size:11.2px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; margin-bottom:6px; }
.chart-series { display:flex; gap:10px; font-size:10.6px; color:var(--muted); margin:-2px 0 5px; }
.chart-series i { display:inline-block; width:9px; height:9px; border-radius:3px; margin-right:4px; }
.chart-row { display:grid; grid-template-columns:112px minmax(0,1fr) auto; gap:7px; align-items:center; font-size:11.6px; padding:2px 0; border:0; background:none; width:100%; text-align:left; color:inherit; }
.chart-row.is-clickable:hover .chart-row-label { color:var(--accent-ink); }
.chart-row.is-active .chart-row-label { color:var(--accent-ink); font-weight:700; }
.chart-row-label { color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chart-track { display:flex; flex-direction:column; gap:2px; }
.chart-bar { height:9px; border-radius:5px; background:var(--accent); min-width:2px; }
.chart-bar.is-compare { background:#b8c4bc; }
.chart-bar.is-negative { background:#b94a48; }
.chart-value { font-weight:700; font-size:11px; white-space:nowrap; color:var(--muted); }


/* nowe wykresy chart_* — domyslnie statyczne; .is-clickable tylko przy interactive:true */
.modern-chart { overflow:hidden; }
.modern-chart button {
  font-family:inherit;
  color:inherit;
}
.modern-chart .is-clickable { cursor:pointer; }
.modern-chart .is-clickable:hover .modern-chart-label,
.modern-chart .is-clickable:hover .modern-legend-label { color:var(--accent-ink); }
.modern-chart .is-active .modern-chart-label,
.modern-chart .is-active .modern-legend-label { color:var(--accent-ink); font-weight:700; }

.modern-bar-row {
  display:grid;
  grid-template-columns:112px minmax(0,1fr) auto;
  gap:7px;
  align-items:center;
  width:100%;
  border:0;
  background:none;
  padding:3px 0;
  text-align:left;
}
.modern-chart-label {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:11.6px;
}
.modern-chart-value,
.modern-legend-value {
  color:var(--muted);
  font-size:11px;
  font-weight:700;
  white-space:nowrap;
}
.modern-bar-track {
  position:relative;
  height:10px;
  border-radius:5px;
  background:color-mix(in srgb, var(--line) 55%, transparent);
  overflow:hidden;
}
.modern-bar-track-diverging { overflow:visible; }
.modern-bar-fill {
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  border-radius:5px;
  min-width:1px;
}
.modern-zero-axis {
  position:absolute;
  top:-3px;
  bottom:-3px;
  width:1px;
  background:var(--muted);
  opacity:.75;
  z-index:2;
}

.modern-stack {
  display:flex;
  width:100%;
  height:16px;
  overflow:hidden;
  border-radius:7px;
  background:var(--line);
  margin:2px 0 8px;
}
.modern-stack-segment {
  display:block;
  min-width:0;
  height:100%;
  padding:0;
  border:0;
}
.modern-stack-segment.is-clickable:hover,
.modern-stack-segment.is-active { filter:brightness(.88); }

.modern-chart-legend {
  display:flex;
  flex-direction:column;
  gap:3px;
}
.modern-legend-row {
  display:grid;
  grid-template-columns:10px minmax(0,1fr) auto;
  gap:7px;
  align-items:center;
  width:100%;
  border:0;
  background:none;
  padding:2px 0;
  text-align:left;
  font:inherit;
  font-size:11.4px;
  line-height:1.25;
  color:inherit;
}
.modern-legend-row.compact { grid-template-columns:10px auto; width:auto; }
.modern-legend-swatch { width:9px; height:9px; border-radius:3px; }
.modern-legend-label { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.modern-donut-wrap {
  display:flex;
  flex-direction:column;
  gap:12px;
  align-items:stretch;
}
.modern-donut {
  max-width:85%;
  aspect-ratio:1;
  overflow:visible;
  align-self:center;
  margin:2px 0 4px;
}
.modern-donut-segment {
  transition:opacity .15s ease, stroke-width .15s ease;
  outline:none;
}
.modern-donut-segment.is-clickable { cursor:pointer; }
.modern-donut-segment.is-clickable:focus-visible {
  outline:none;
  filter:brightness(.88);
}
.modern-donut-segment.is-clickable:hover,
.modern-donut-segment.is-active { opacity:.8; stroke-width:21; }
.modern-donut-total { font-size:11px; font-weight:700; fill:var(--ink); display: none;}

.modern-donut-legend {
  width:100%;
  gap:5px;
}
.modern-donut-legend .modern-legend-row {
  grid-template-columns:10px minmax(0,1fr) auto;
  column-gap:8px;
  padding:1px 0;
}
.modern-donut-legend .modern-legend-label {
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  line-height:1.25;
  min-width:0;
}
.modern-donut-legend .modern-legend-value {
  text-align:right;
  align-self:start;
  padding-left:8px;
  white-space:nowrap;
}

.modern-line-chart { width:100%; height:auto; min-height:150px; overflow:visible; }
.modern-line-grid { stroke:var(--line); stroke-width:1; }
.modern-line-axis-label { fill:var(--muted); font-size:10px; }
.modern-line-series { stroke-width:2.2; stroke-linejoin:round; stroke-linecap:round; }
.modern-line-point { stroke:var(--surface); stroke-width:1.5; }
.modern-line-point.is-clickable { cursor:pointer; }
.modern-line-point.is-clickable:hover,
.modern-line-point.is-active { r:5; stroke-width:2; }
.modern-line-legend {
  flex-direction:row;
  flex-wrap:wrap;
  gap:6px 14px;
  margin-top:4px;
}

@media (max-width:700px) {
  .modern-bar-row { grid-template-columns:90px minmax(0,1fr) auto; }
}


/* menu Warstwy na mapie */
.layer-controls { position:absolute; top:14px; left:calc(var(--sidebar-w) + 14px); z-index:6; }
.layer-button { border:1px solid var(--line); background:var(--surface); border-radius:10px; padding:8px 14px; font-size:12.5px; font-weight:700; box-shadow:var(--shadow); }
.layer-panel { display:none; margin-top:6px; background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow); padding:8px 10px; max-height:46vh; overflow-y:auto; min-width:230px; }
.layer-controls.is-open .layer-panel { display:block; }
.layer-control { display:flex; align-items:center; gap:7px; font-size:12px; padding:4px 2px; cursor:pointer; }
.layer-control.is-disabled { opacity:.45; cursor:default; }
.layer-control .pill { margin-left:auto; background:var(--bg); border:1px solid var(--line); border-radius:99px; font-size:10px; padding:1px 7px; color:var(--muted); }

/* skala jakosci powietrza */
.air-scale { margin-top:8px; }
.air-scale-title { font-size:11px; font-weight:700; margin-bottom:4px; }
.air-scale-row { display:flex; gap:2px; }
.air-scale-cell { flex:1; text-align:center; font-size:9.3px; color:var(--muted); }
.air-scale-cell i { display:block; height:10px; border-radius:3px; margin-bottom:2px; }

/* etykiety wymiarow dzialki */
.dimension-label { background:rgba(255,255,255,.92); border:1px solid var(--line); border-radius:6px; padding:1px 6px; font-size:10.5px; font-weight:700; color:#172033; white-space:nowrap; pointer-events:none; }

/* przycisk i modal modelu 3D dzialki */
.terrain3d-btn { position:absolute; top:14px; left:calc(var(--sidebar-w) + 14px); z-index:6; }
/* wybor podkladu mapowego (pierwszy slajd) */
.basemap-btn { position:absolute; top:14px; left:calc(var(--sidebar-w) + 14px); z-index:7; }
.basemap-menu { position:absolute; top:60px; left:calc(var(--sidebar-w) + 14px); z-index:8; min-width:210px; padding:6px; background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow); }
.basemap-option { display:block; width:100%; border:0; background:transparent; color:inherit; text-align:left; border-radius:8px; padding:8px 10px; font:inherit; font-size:12px; font-weight:650; cursor:pointer; }
.basemap-option:hover { background:var(--bg); }
.basemap-option.is-active { background:var(--accent-soft); color:var(--accent-ink); } 
/* pomiar odleglosci (ui.measureTool) */
.measure-btn { position:absolute; top:14px; left:calc(var(--sidebar-w) + 14px); z-index:6; }
.measure-btn.shifted { top:62px; }
.measure-label { background:#172033; color:#fff; border-radius:6px; padding:2px 8px; font-size:12px; font-weight:700; white-space:nowrap; pointer-events:none; box-shadow:var(--shadow); }
.map-wrap.measuring #map canvas { cursor:crosshair !important; }
/* modal statystyk dzialki */
/* sekcje w karcie (item.sections — np. statystyki dzialki na slajdzie Geometria) */
.stats-sections { margin-top:10px; display:flex; flex-direction:column; gap:10px; }
.stats-section h4 { margin:0 0 5px; font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--accent-ink); border-bottom:1px solid var(--line); padding-bottom:4px; }
.stats-grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:3px 16px; }
.stats-row { display:flex; justify-content:space-between; gap:8px; font-size:12px; padding:1px 0; }
.stats-row .sl { color:var(--muted); }
.stats-row .sv { font-weight:700; text-align:right; }
.stats-row.wide { grid-column:1 / -1; flex-direction:column; gap:2px; }
.stats-row.wide .sv { text-align:left; font-weight:500; }
.terrain3d-modal .modal { width:min(1040px, calc(100vw - 32px)); }
.terrain3d-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.terrain3d-plot { position:relative; width:100%; height:min(560px, calc(100vh - 240px)); border:1px solid var(--line); border-radius:12px; background:linear-gradient(180deg,#fdfefd,#f2f6f1); margin-top:10px; overflow:hidden; }
.terrain3d-plot.is-loading::before { content:""; position:absolute; inset:0; z-index:20; background:rgba(245,247,244,.78); }
.terrain3d-plot.is-loading::after { content:""; position:absolute; z-index:21; left:50%; top:50%; width:28px; height:28px; margin:-16px 0 0 -16px; border:3px solid rgba(101,113,106,.28); border-top-color:var(--accent); border-radius:50%; animation:module-loading-spin .7s linear infinite; }
@media (prefers-reduced-motion: reduce) { .terrain3d-plot.is-loading::after { animation:none; } }
.terrain3d-sub { color:var(--muted); font-size:12px; margin:4px 0 0; }
.terrain3d-meta { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.terrain3d-meta span { background:var(--accent-soft); color:var(--accent-ink); border-radius:99px; padding:3px 10px; font-size:11.3px; font-weight:650; }
.terrain3d-meta span b { font-weight:800; }

/* markery zabytkow (DOM, jak w viewerze) */
.heritage-marker { width:26px; height:26px; display:grid; place-items:center; padding:0; border:3px solid #fff; border-radius:50%; background:#8f3f52; box-shadow:0 2px 8px rgba(43,24,30,.42); color:#fff; font:800 12px/1 'SN Pro', Inter, ui-sans-serif, system-ui, sans-serif; cursor:pointer; }
.heritage-marker:hover, .heritage-marker:focus-visible { background:#6f2d3e; outline:3px solid rgba(143,63,82,.25); outline-offset:2px; }
.heritage-marker.is-selected { background:#f4bd21; color:#172033; outline:3px solid rgba(244,189,33,.4); outline-offset:2px; }

/* link "Szczegoly" w kartach + zwiniete szczegoly */
.nm-card-link { display:inline-block; margin-top:8px; color:var(--accent-ink); font-size:12px; font-weight:700; cursor:pointer; }
.nm-card-link:hover { text-decoration:underline; }
.item-details[hidden] { display:none; }
/* rankingi krajowe (GUS BDL): plakietka pozycji + pasek percentyla w szczegolach */
.srv-label { font-size:11px; font-weight:700; vertical-align:middle; display:inline-block; padding:2px 7px; border-radius:999px; line-height:1.25; margin-left:10px;}
.srv-label.up { color:#fff; background:#2e7d32; }
.srv-label.down { color:#fff; background:#c0392b; }
.srv-label.pending { color:#fff; background:#b77900; }
.srv-label.empty { color:#fff; background:#7a858f; }

/* Karta ŹRÓDŁO dziedziczy semantykę bieżącego stanu GESUT WMS.
   Tło pozostaje jasne, aby nazwa źródła była czytelna, a status jest biały na mocniejszej kapsule. */
.card.source-status-card { transition:background-color .18s ease,border-color .18s ease; }
.card.source-status-card.up { background:#e8f5eb; border-color:#9fd3aa; }
.card.source-status-card.down { background:#fbeceb; border-color:#e4aaa4; }
.card.source-status-card.pending { background:#fff6dc; border-color:#e7c66c; }
.card.source-status-card.empty { background:#f1f3f5; border-color:#cbd1d6; }
.card.source-status-card.up .card-label { color:#397344; }
.card.source-status-card.down .card-label { color:#9a433a; }
.card.source-status-card.pending .card-label { color:#80620f; }
.card.source-status-card.empty .card-label { color:#69737b; }
.bench-chips { display:flex; flex-wrap:wrap; gap:4px; margin:5px 0 1px; }
.bench-chip { display:inline-flex; align-items:center; gap:5px; font-size:10.5px; font-weight:600; color:var(--bc);
  background:color-mix(in srgb, var(--bc) 11%, transparent); border:1px solid color-mix(in srgb, var(--bc) 28%, transparent);
  border-radius:999px; padding:2px 8px; line-height:1.35; }
.bench-chip::before { content:''; flex:none; width:6px; height:6px; border-radius:50%; background:var(--bc); }
.bench { margin:8px 0; }
.bench-label { display:flex; justify-content:space-between; align-items:baseline; gap:8px; font-size:11px; font-weight:600; }
.bench-label .bench-pct { font-weight:700; white-space:nowrap; }
.bench-track { height:6px; border-radius:4px; background:#e6ebef; margin:4px 0 3px; position:relative; overflow:hidden; }
.bench-fill { position:absolute; top:0; bottom:0; left:0; border-radius:4px; }
.bench-note { font-size:10.5px; color:var(--muted); line-height:1.45; }

/* wprowadzenie modulu (np. do czego sluza mapy geologiczne) — karta na cala szerokosc siatki */
.module-intro { grid-column:1 / -1; background:var(--surface); border:1px solid var(--line); border-left:4px solid var(--accent); border-radius:12px; padding:14px 18px; }
.empty-note { grid-column:1 / -1; display:flex; gap:12px; align-items:flex-start; background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:16px 18px; }
.empty-note-icon { flex:0 0 auto; width:34px; height:34px; display:grid; place-items:center; border-radius:50%; background:var(--accent-soft); color:var(--accent); font-size:17px; font-weight:800; }
.empty-note h4 { margin:0 0 4px; font-size:14px; color:var(--ink); }
.empty-note p { margin:0; font-size:12.6px; color:var(--muted); line-height:1.5; }
.module-intro h4 { margin:0 0 6px; font-size:14.5px; color:var(--accent-ink); }
.module-intro p { margin:0 0 8px; font-size:12.8px; color:var(--ink); line-height:1.5; }
.module-intro ul { margin:0; padding-left:18px; font-size:12.6px; color:var(--ink); line-height:1.55; }
.module-intro li { margin:3px 0; }
.module-intro li strong { color:var(--accent-ink); }

/* moduly bez mapy: itemy w dwoch kolumnach, kolejnosc od lewej do prawej */
.no-map-grid { position:absolute; inset:0; overflow-y:auto; background:var(--bg); padding:18px 18px 18px calc(var(--sidebar-w) + 14px); display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); grid-auto-rows:max-content; gap:12px; align-items:start; align-content:start; z-index:3; }
.no-map-grid .item-card { background:var(--surface); }

/* ikony kart statystyk gminy */
.item-icon { width:36px; height:36px; border-radius:10px; display:grid; place-items:center; flex:0 0 auto; margin-right:10px; }
.item-icon svg { width:20px; height:20px; }
.item-head--icon { display:flex; align-items:center; }
.item-head--icon .item-head-main { flex:1; min-width:0; }

/* rozwijana lista obiektow kategorii (POI lista plaska) */
.chart-sublist { margin:2px 0 8px 6px; border-left:2px solid var(--line); padding-left:6px; display:flex; flex-direction:column; }
.chart-subrow { display:flex; justify-content:space-between; align-items:baseline; gap:10px; width:100%; border:0; background:none; text-align:left; font-size:11.8px; padding:3.5px 8px; border-radius:7px; color:inherit; }
.chart-subrow:hover { background:var(--accent-soft); }
.chart-subrow.is-active { background:var(--accent); }
.chart-subrow.is-active .chart-subrow-name, .chart-subrow.is-active .chart-subrow-dist { color:#fff; }
.chart-subrow-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; }
.chart-subrow-dist { flex:0 0 auto; color:var(--muted); font-size:11px; font-weight:700; }
.chart-subgroup { font-size:10px; font-weight:800; color:var(--accent-ink); text-transform:uppercase; letter-spacing:.05em; padding:7px 8px 2px; border-top:1px dashed var(--line); margin-top:4px; }
.chart-subgroup:first-child { border-top:0; margin-top:0; padding-top:3px; }

/* wyrozniony przycisk "Wszystkie" w wykresach kategorii */
.chart-row-all { display:inline-flex !important; grid-template-columns:none !important; width:auto; align-items:center; gap:6px; margin:2px 0 7px; padding:6px 16px; border:1.5px solid var(--accent); border-radius:99px; background:var(--surface); }
.chart-row-all .chart-row-label { font-weight:800; color:var(--accent-ink); font-size:12px; }
.chart-row-all .chart-track, .chart-row-all .chart-value { display:none; }
.chart-row-all:hover { background:var(--accent-soft); }
.chart-row-all.is-active { background:var(--accent); }
.chart-row-all.is-active .chart-row-label { color:#fff; }

/* karta z kolorem operatora (BTSearch) */
.item-card[data-accent] { border-left:4px solid var(--card-accent); }
.item-card[data-accent].is-selected { border-color:var(--card-accent); box-shadow:0 0 0 2px color-mix(in srgb, var(--card-accent) 25%, transparent); }

/* przycisk + panel legendy na mapie — pod przyciskami +/- */
.legend-widget { position:absolute; top:110px; right:10px; z-index:7; display:flex; flex-direction:column; align-items:flex-end; }
.rp__item { display:flex; align-items:center; gap:9px; border:1px solid var(--line); background:var(--surface); border-radius:12px; padding:9px 16px 9px 12px; box-shadow:var(--shadow); color:var(--ink); }
.rp__item:hover { border-color:var(--accent); }
.rp__item[aria-pressed="true"] { background:var(--accent); border-color:var(--accent); color:#fff; }
.rp__icon { display:grid; place-items:center; }
.rp__icon svg { display:block; }
.rp__label { font-size:12.8px; font-weight:700; }
.legend-panel { position:absolute; top:calc(100% + 8px); right:0; width:340px; max-width:calc(100vw - var(--sidebar-w) - 40px); background:var(--surface); border:1px solid var(--line); border-radius:14px; box-shadow:var(--shadow); padding:12px 14px; max-height:56vh; overflow-y:auto; }
.legend-title { color:var(--muted); font-size:10.8px; text-transform:uppercase; letter-spacing:.05em; margin-bottom:6px; }
.legend { display:flex; flex-wrap:wrap; gap:6px; }
.legend-chip { display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); border-radius:99px; background:var(--surface); padding:3px 10px 3px 6px; font-size:11.3px; font-weight:600; }
.legend-chip .swatch { width:12px; height:12px; border-radius:4px; flex:0 0 auto; border:1px solid rgba(0,0,0,.15); }
/* Działka w legendzie odwzorowuje faktyczny styl z mapy: bez wypełnienia,
   białe halo i ciemna przerywana granica. Symbol jest celowo nieco większy
   od pozostałych próbek, żeby obrys był czytelny. */
.legend-chip .swatch.swatch--parcel {
  width:18px;
  height:18px;
  border-radius:3px;
  background:transparent;
  border:2px dashed var(--parcel-line, #172033);
  box-shadow:0 0 0 2px var(--parcel-halo, #fff), 0 0 0 3px rgba(23,32,51,.14);
}
.legend-chip.is-off { opacity:.42; }
.legend-chip.is-static { cursor:default; }
/* panel przyciskow warstw (ui.overlayButtons, np. pory roku w naslonecznieniu) — zamiast przycisku Legenda */
.overlay-buttons { position:absolute; top:110px; right:10px; z-index:7; width:340px; max-width:calc(100vw - var(--sidebar-w) - 40px); background:var(--surface); border:1px solid var(--line); border-radius:14px; box-shadow:var(--shadow); padding:10px 12px 10px; }
.ob-row { display:flex; gap:6px; }
.ob-btn { flex:1 1 0; min-width:0; display:flex; flex-direction:column; align-items:center; gap:4px; padding:8px 4px 7px; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--ink); cursor:pointer; }
.ob-btn:hover { border-color:var(--ob-color, var(--accent)); }
.ob-btn[aria-pressed="true"] { border-color:var(--ob-color, var(--accent)); background:color-mix(in srgb, var(--ob-color, var(--accent)) 14%, var(--surface)); box-shadow:0 0 0 1px var(--ob-color, var(--accent)) inset; }
.ob-btn .ob-icon { display:grid; place-items:center; width:26px; height:26px; color:var(--ob-color, var(--accent)); }
.ob-btn .ob-icon svg { display:block; }
.ob-btn .ob-label { font-size:11.2px; font-weight:700; line-height:1.1; white-space:nowrap; }
.ob-btn[aria-pressed="true"] .ob-label { color:var(--ink); }
.overlay-buttons .air-scale { margin-top:8px; }
.overlay-buttons .source-line { margin-top:6px; font-size:10.8px; }
.source-line { color:var(--muted); font-size:11.3px; margin-top:8px; line-height:1.45; }
.source-line strong { color:var(--ink); font-weight:650; }
.data-notes { margin:4px 0 0; padding-left:16px; color:var(--muted); font-size:10.8px; line-height:1.4; }

/* ===== Map ===== */
.map-wrap { position:relative; min-width:0; }
#map { position:absolute; inset:0; }
.map-note { position:absolute; top:14px; left:50%; transform:translateX(-50%); background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow); border-radius:99px; padding:7px 16px; font-size:12.5px; color:var(--muted); z-index:5; display:none; }
.map-note.is-visible { display:block; }
.maplibregl-popup-content { border-radius:10px; box-shadow:var(--shadow); padding:10px 12px; font-family:inherit; max-width:100%; overflow:hidden; }
.popup-badge { display:inline-block; background:var(--accent-soft); color:var(--accent-ink); font-size:10px; font-weight:700; padding:2px 7px; border-radius:99px; margin-bottom:4px; }
.popup-title { font-weight:700; font-size:12.8px; overflow-wrap:anywhere; }
.popup-sub { color:var(--muted); font-size:11.5px; margin-top:2px; white-space:pre-line; overflow-wrap:anywhere; max-width:100%; }

/* ===== Modal (account stub) ===== */
.modal-backdrop { position:fixed; inset:0; background:rgba(15,25,20,.45); display:none; place-items:center; z-index:50; }
.modal-backdrop.is-open { display:grid; }
.modal { width:min(380px, calc(100vw - 32px)); background:var(--surface); border-radius:16px; box-shadow:var(--shadow); padding:22px; }
.modal h3 { margin:0 0 4px; font-size:18px; }
.modal p { color:var(--muted); font-size:12.8px; margin:0 0 14px; }
.modal label { display:block; font-size:12px; font-weight:600; margin:10px 0 4px; }
.modal input { width:100%; border:1px solid var(--line); border-radius:9px; padding:9px 10px; font:inherit; font-size:13px; }
.modal .modal-actions { display:flex; gap:8px; margin-top:16px; }
.modal .modal-actions .btn { flex:1; padding:10px; }
.modal-hint { background:var(--accent-soft); color:var(--accent-ink); border-radius:9px; padding:8px 10px; font-size:11.6px; margin-top:12px; }

.loading, .load-error { position:absolute; inset:0; display:grid; place-items:center; background:rgba(245,247,244,.7); z-index:4; font-size:13px; color:var(--muted); }
.loading { display:flex; align-items:center; justify-content:center; gap:10px; }
.loading::before { content:""; width:18px; height:18px; flex:0 0 18px; border:2px solid rgba(101,113,106,.28); border-top-color:var(--accent); border-radius:50%; animation:module-loading-spin .7s linear infinite; }
@keyframes module-loading-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading::before { animation:none; } }
[hidden] { display:none !important; }

@media (max-width: 1100px) {
  .app {
    grid-template-columns:1fr;
    grid-template-rows:auto minmax(180px,44vh) minmax(0,1fr);
    grid-template-rows:auto minmax(180px,44dvh) minmax(0,1fr);
  }
  .topbar { flex-wrap:wrap; }
  .sidebar { position:static; grid-column:1; grid-row:3; width:auto; border-radius:0; box-shadow:none; border:0; border-top:1px solid var(--line); }
  .map-wrap { grid-column:1; grid-row:2; min-height:180px; }
  .no-map-grid { padding:18px; }
  .terrain3d-btn { left:14px; }
  .measure-btn { left:14px; }
  .legend-panel { max-width:calc(100vw - 40px); }
}

@supports (padding: max(0px)) {
  @media (max-width: 1100px) {
    .topbar {
      padding-left:max(16px, env(safe-area-inset-left));
      padding-right:max(16px, env(safe-area-inset-right));
    }
  }
}


/* Tablet: szybkie przejscie do nastepnego modulu bez siegania do lewego panelu.
   Domyslnie ukryte; telefon i desktop zachowuja dotychczasowy UI. */
.tablet-next-module {
  display:none;
  position:absolute;
  right:10px;
  top:54%;
  transform:translateY(-50%);
  z-index:12;
  width:42px;
  height:58px;
  padding:0;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(255,255,255,.92);
  color:var(--accent-ink);
  box-shadow:0 4px 16px rgba(24,43,36,.16);
  font:700 30px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  place-items:center;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  backdrop-filter:blur(5px);
}

.tablet-next-module:active {
  transform:translateY(-50%) scale(.96);
}


/* Tablet wykrywany po sposobie interakcji, nie po szerokosci viewportu.
   Klasa ustawiana w navigation.js: touch + coarse pointer + shortSide >= 600px. */
.tablet-like-device .tablet-next-module {
  display:grid;
}


/* status=pending: moduł jest w trakcie pozyskiwania/przetwarzania danych */
.pending-note {
  display:flex;
  align-items:center;
  gap:14px;
  border:1px solid var(--line);
  background:var(--surface);
  border-radius:12px;
  padding:14px 16px;
}
.pending-spinner {
  width:26px;
  height:26px;
  flex:0 0 26px;
  border:3px solid var(--line);
  border-top-color:var(--accent);
  border-radius:50%;
  animation:pending-spin 3s linear infinite;
}
.pending-copy h4 {
  margin:0 0 4px;
  font-size:13px;
}
.pending-copy p {
  margin:0;
  color:var(--muted);
  font-size:12.4px;
  line-height:1.5;
}
@keyframes pending-spin {
  to { transform:rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .pending-spinner { animation:none; }
}

/* summary.blocks: historia rynku */
.summary-block { border:1px solid var(--line); border-radius:12px; padding:13px 16px 10px; background:var(--surface); }
.market-history-title { font-size:14px; font-weight:800; color:var(--ink); margin-bottom:10px; }
.market-history-stats { display:flex; flex-wrap:wrap; gap:5px 18px; color:var(--muted); font-size:11.5px; line-height:1.5; }
.market-history-stats strong { color:var(--ink); font-weight:800; }
.market-history-counts { margin-top:3px; }
.market-history-years { margin-top:10px; border-top:1px solid var(--line); }
.market-history-year { padding:6px 0; border-bottom:1px solid var(--line); }
.market-history-year-main { display:grid; grid-template-columns:42px 125px minmax(150px,1fr) auto; gap:10px; align-items:baseline; min-width:0; }
.market-history-year-label, .market-history-median { color:var(--ink); font-size:11.8px; }
.market-history-median { font-weight:800; }
.market-history-range, .market-history-transactions { color:var(--muted); font-size:11.2px; }
.market-history-transactions { white-space:nowrap; text-align:right; }
.market-history-details { display:flex; flex-wrap:wrap; gap:4px 10px; padding:7px 0 2px 52px; }
.market-history-detail { color:var(--muted); font-size:10.8px; white-space:nowrap; }
@media (max-width: 760px) {
  .market-history-year-main { grid-template-columns:58px minmax(0,1fr) auto; gap:6px 8px; }
  .market-history-range { grid-column:2 / 4; }
  .market-history-details { padding-left:66px; }
}
@media (max-width: 520px) {
  .summary-block { padding:12px; }
  .market-history-year-main { grid-template-columns:48px minmax(0,1fr); }
  .market-history-range, .market-history-transactions { grid-column:2; text-align:left; }
  .market-history-details { padding-left:56px; gap:3px 10px; }
}


/* v3.43: tooltip wieloelementowy dla nakladajacych sie obiektow mapowych */
.popup-stack {
  max-height: 44vh;
  overflow-y: auto;
  min-width: 210px;
}
.popup-stack-item + .popup-stack-item {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 8px;
}

/* v5.3 — statyczny, dyskretny komunikat o nowych danych raportu. */
.report-update-notice {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10050;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: min(520px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, .14);
  border-radius: 12px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 12px 36px rgba(15, 23, 42, .18);
  color: #172033;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  backdrop-filter: blur(8px);
}
.report-update-notice.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.report-update-notice__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #eef5ff;
  color: #2b2b2b;
  font-size: 21px;
  line-height: 1;
  font-weight: 700;
}
.report-update-notice__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.report-update-notice__body strong {
  font-size: 13px;
  line-height: 1.25;
}
.report-update-notice__body span {
  font-size: 12px;
  line-height: 1.35;
  color: #5b6473;
}
.report-update-notice__button {
  appearance: none;
  border: 0;
  border-radius: 8px;
  padding: 8px 11px;
  background: var(--accent-ink);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.report-update-notice__button:hover { filter: brightness(.96); }
.report-update-notice__button:focus-visible {
  outline: 3px solid rgba(36, 94, 168, .24);
  outline-offset: 2px;
}
@media (max-width: 640px) {
  .report-update-notice {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    grid-template-columns: auto minmax(0, 1fr);
  }
  .report-update-notice__button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

/* ============================================================
   Karta promocyjna przypisana do modulu (config.json -> promoCard)
   ============================================================ */
.module-promo-slot {
  margin-top:14px;
  display:flex;
  justify-content:center;
}
.module-promo-card {
  width:clamp(220px, 52%, 300px);
  max-width:100%;
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
  background:var(--surface);
  box-shadow:0 8px 24px rgba(20, 38, 32, .08);
}
.module-promo-media {
  width:100%;
  aspect-ratio:1 / 1;
  overflow:hidden;
  background:#eef2ef;
}
.module-promo-media img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}
.module-promo-body { padding:14px 15px 15px; }
.module-promo-label {
  margin-bottom:6px;
  color:var(--muted);
  font-size:10px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.module-promo-title {
  margin:0;
  color:var(--text);
  font-size:17px;
  line-height:1.25;
}
.module-promo-text {
  margin:7px 0 0;
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}
.module-promo-button {
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  margin-top:13px;
  padding:8px 14px;
  border-radius:10px;
  background:var(--accent);
  color:#fff;
  font-size:13px;
  font-weight:800;
  text-decoration:none;
  transition:filter .15s ease, transform .15s ease;
}
.module-promo-button:hover { filter:brightness(1.06); }
.module-promo-button:active { transform:translateY(1px); }
.module-promo-button.is-disabled {
  opacity:.45;
  cursor:not-allowed;
  user-select:none;
}
@media (max-width: 760px) {
  .module-promo-card {
    width:clamp(210px, 62%, 280px);
    border-radius:14px;
  }
  .module-promo-title { font-size:16px; }
}


/* v5.31 — generyczne item.children: kompaktowa, informacyjna hierarchia pod karta rodzica */
.item-children { margin:0 12px 10px; padding:9px 0 0 12px; border-left:2px solid var(--line); }
.item-children-title { margin:0 0 7px; color:var(--muted); font-size:10.5px; font-weight:750; letter-spacing:.045em; text-transform:uppercase; }
.item-child-card { padding:8px 10px; margin:0 0 7px; border:1px solid var(--line); border-radius:9px; background:color-mix(in srgb, var(--surface) 94%, var(--line)); }
.item-child-card:last-child { margin-bottom:0; }
.item-child-card .item-title { font-size:12.6px; }
.item-child-card .item-primary { font-size:12px; }
.item-child-card .facts { margin-top:7px; }
.item-child-card .fact { font-size:11.3px; }
.item-child-card .item-links { margin:7px 0 0; }
.item-child-card .item-link { margin:0; }
.item-child-card .item-children { margin:8px 0 0 4px; }

/* v5.34 — dodatkowe sekcje informacyjne pod glownymi items (config: additionalSections) */
.additional-section {
  margin:16px 0 0;
  padding-top:5px;
  border-top:0px solid var(--line);
}
.additional-section-title {
  margin:0 0 8px;
  color:var(--text);
  font-size:13px;
  font-weight:800;
}
.additional-section-description {
  margin:-2px 0 9px;
  color:var(--muted);
  font-size:11.5px;
  line-height:1.45;
}
.additional-section-items {
  display:grid;
  gap:8px;
}
.additional-card {
  padding:11px 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:color-mix(in srgb, var(--surface) 96%, var(--line));
}
.additional-card-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.additional-card-title {
  color:var(--text);
  font-size:13px;
  font-weight:750;
  line-height:1.35;
}
.additional-card-subtitle {
  margin-top:3px;
  color:var(--muted);
  font-size:11.5px;
  line-height:1.4;
  white-space:pre-line;
}
.additional-card-primary {
  flex:0 0 auto;
  color:var(--text);
  font-size:12px;
  font-weight:750;
}
.additional-facts {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px 12px;
  margin-top:9px;
}
.additional-fact {
  min-width:0;
  font-size:11.5px;
  line-height:1.4;
}
.additional-fact.wide { grid-column:1 / -1; }
.additional-fact-label {
  display:block;
  margin-bottom:1px;
  color:var(--muted);
  font-size:10.5px;
}
.additional-fact-value {
  display:block;
  color:var(--text);
  white-space:pre-line;
  overflow-wrap:anywhere;
}
.additional-card-description {
  margin-top:8px;
  color:var(--muted);
  font-size:11.5px;
  line-height:1.45;
}
.additional-card .item-links {
  margin:9px 0 0;
}
@media (max-width:760px) {
  .additional-facts { grid-template-columns:1fr; }
  .additional-fact.wide { grid-column:auto; }
}

/* v5.35: klikalne wartosci URL w additionalSections */
.additional-fact-link {
  color: inherit;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.additional-fact-link:hover {
  color: var(--accent, currentColor);
}
