/* Karta Gruntu – front MVP. Język wizualny z karta-dzialki.html: kolory stref z rysunków MPZP, Archivo + IBM Plex. */
/* Fonty hostowane lokalnie (web/vendor/fonts/, licencja SIL OFL 1.1: vendor/fonts/OFL.txt).
   Podzbiory latin i latin-ext z @fontsource (wersja 5.3.0); polskie znaki w latin-ext i latin. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(vendor/fonts/archivo-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(vendor/fonts/archivo-latin-ext-500-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(vendor/fonts/archivo-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(vendor/fonts/archivo-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(vendor/fonts/archivo-latin-800-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(vendor/fonts/archivo-latin-ext-800-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(vendor/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(vendor/fonts/ibm-plex-sans-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(vendor/fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(vendor/fonts/ibm-plex-sans-latin-ext-500-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(vendor/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(vendor/fonts/ibm-plex-sans-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(vendor/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(vendor/fonts/ibm-plex-mono-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(vendor/fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(vendor/fonts/ibm-plex-mono-latin-ext-500-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  --bg: #f3f5f1; --paper: #ffffff; --ink: #1d2b2a; --muted: #5b6b67; --line: #d5ddd7;
  --accent: #0f6b5c; --accent-soft: #e1efe9; --on-accent: #ffffff;
  --mw: #a0643a; --mn: #d9b13b; --u: #c2413a; --zl: #3f8a4a; --e: #4a63b5; --na: #7a8a85;
  --good: #2f7d4a; --warn: #a86b00; --bad: #b3261e; --info: #3c55a5;
  /* tinty tła i ciemniejsze teksty dla pigułek (kontrast AA) */
  --ok-bg: #e3f1e8; --ok-t: #1f5f38;
  --mid-bg: #fbefd5; --mid-t: #7a4d00;
  --bad-bg: #fbe3e0; --bad-t: #9c1f18;
  --info-bg: #e4e9f7; --info-t: #2c4086;
  --na-bg: #eceeed; --na-t: #4d5b57;
  --shadow: 0 6px 24px rgba(20, 35, 32, .18);
  --f-display: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --topbar-h: 56px;
  --panel-w: 468px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121816; --paper: #1a2220; --ink: #e3ebe7; --muted: #9aaba5; --line: #2e3a37;
    --accent: #5cc2a8; --accent-soft: #1d3530; --on-accent: #0b1a16;
    --mw: #d08a5c; --mn: #e8c55a; --u: #ec6b62; --zl: #6dbb77; --e: #8aa0ea; --na: #9aaba5;
    --good: #6cc48a; --warn: #e3a843; --bad: #ff7b6e; --info: #8aa0ea;
    --ok-bg: #1b3326; --ok-t: #8fdba9; --mid-bg: #3a2e12; --mid-t: #f0c36a;
    --bad-bg: #3d1f1c; --bad-t: #ffa59b; --info-bg: #222b48; --info-t: #b3c1f5;
    --na-bg: #263130; --na-t: #b4c3be;
    --shadow: 0 6px 24px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f-body);
  display: flex; flex-direction: column; height: 100dvh; overflow: hidden;
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.2; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--f-mono); }
.small { font-size: .82rem; }
.muted { color: var(--muted); }
.ok-text { color: var(--good); } .warn-text { color: var(--warn); } .bad-text { color: var(--bad); }
.eyebrow { font: 500 .72rem/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--on-accent); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* ---------------------------------------------------------------- przyciski, pola */
.btn {
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; min-height: 36px; line-height: 1.2;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.on { border-color: var(--accent); background: var(--accent-soft); }
.btn.x, .x { font-size: 1.4rem; line-height: 1; padding: 4px 11px; }
.x { background: none; border: 0; color: var(--muted); border-radius: 6px; }
input[type=search], input[type=url], input[type=number], select {
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-height: 36px; min-width: 0;
}
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; flex: none; }

/* ---------------------------------------------------------------- pasek górny */
.topbar {
  flex: none; min-height: var(--topbar-h); display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right));
  background: var(--paper); border-bottom: 1px solid var(--line); z-index: 30; position: relative;
}
.brand { display: flex; align-items: center; gap: 8px; font: 800 1.15rem var(--f-display); letter-spacing: -.01em; flex: none; }
.logo { width: 28px; height: 28px; border-radius: 7px; background: var(--accent); display: inline-block; position: relative; }
.logo::after { content: ""; position: absolute; inset: 6px 5px 6px 5px; background: var(--on-accent); opacity: .92; clip-path: polygon(0 100%, 35% 0, 68% 55%, 100% 28%, 100% 100%); }
.search { display: flex; gap: 8px; flex: 1 1 auto; max-width: 720px; min-width: 0; }
.search select { flex: none; max-width: 150px; }
.search-box { position: relative; display: flex; gap: 8px; flex: 1; min-width: 0; }
.search-box input { flex: 1; }
.results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 4px; list-style: none; background: var(--paper);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); max-height: 50vh; overflow: auto; z-index: 40;
}
.results li button { width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 6px; display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.results li button:hover, .results li button:focus-visible { background: var(--accent-soft); }
.results .mono { color: var(--muted); }
.res-msg { padding: 10px; color: var(--muted); font-size: .9rem; }
.badge-mock { font: 600 .72rem var(--f-mono); letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 99px; background: var(--mid-bg); color: var(--mid-t); border: 1px solid currentColor; cursor: help; white-space: nowrap; }
#btn-layers { margin-left: auto; }

/* ---------------------------------------------------------------- układ */
.app { flex: 1; min-height: 0; display: flex; position: relative; }
.mapwrap { position: relative; flex: 1; min-width: 0; min-height: 0; }
#map { position: absolute; inset: 0; }

.layers {
  position: absolute; z-index: 20; top: 12px; left: 12px; width: 318px; max-height: calc(100% - 24px); overflow: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px 14px;
}
.layers-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.layers h2 { font-size: 1rem; }
.layers fieldset { border: 0; border-top: 1px solid var(--line); margin: 10px 0 0; padding: 8px 0 0; min-width: 0; }
.layers legend { font: 500 .72rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 6px 0 0; float: left; width: 100%; margin-bottom: 4px; }
.layers fieldset > :not(legend):first-of-type { clear: both; }
.opt { display: flex; gap: 8px; align-items: center; padding: 5px 0; font-size: .9rem; cursor: pointer; }
.opt.sub { padding-left: 24px; }
.sw { width: 14px; height: 14px; border-radius: 3px; flex: none; display: inline-block; border: 1px solid rgba(0,0,0,.15); }
.sw-zone { background: linear-gradient(90deg, var(--mw) 0 33%, var(--mn) 33% 66%, var(--zl) 66%); }
.sw-ouz { background: transparent; border: 2px dashed #7b3fa0; }
.sw-plan { background: transparent; border: 2px dashed var(--accent); }
.sw-ogr { background: linear-gradient(90deg, #2e9b4f 0 50%, #2f6fd6 50%); }
.sw-siec { background: linear-gradient(135deg, #d62d20 0 50%, #6a4bb8 50%); }
.sw-dz { background: repeating-linear-gradient(45deg, var(--muted) 0 1px, transparent 1px 4px); border-color: var(--muted); }
.legend-note { margin: 4px 0 0; }
.statuslist { list-style: none; margin: 6px 0 0; padding: 0; font-size: .8rem; }
.statuslist li { display: flex; justify-content: space-between; gap: 8px; padding: 1px 0; }
.statuslist .st-err span:last-child { color: var(--bad); }
.statuslist .st-zoom span:last-child, .statuslist .st-obcieto span:last-child { color: var(--warn); }
.apirow { display: flex; gap: 6px; clear: both; }
.apirow input { flex: 1; font-size: .85rem; }

/* ---------------------------------------------------------------- wyszukiwanie po obszarze */
.finder {
  position: absolute; z-index: 21; top: 12px; left: 12px; width: 368px; max-height: calc(100% - 24px); overflow: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px 14px;
  overscroll-behavior: contain;
}
.finder h2 { font-size: 1rem; }
.finder fieldset { border: 0; border-top: 1px solid var(--line); margin: 10px 0 0; padding: 8px 0 0; min-width: 0; }
.finder legend { font: 500 .72rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 6px 0 0; float: left; width: 100%; margin-bottom: 6px; }
.finder fieldset > :not(legend):first-of-type { clear: both; }
.finder .opt select { margin-left: auto; max-width: 190px; font-size: .85rem; }
.prof-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-bottom: 6px; }
.prof-grid button { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px; min-height: 36px; font-size: .8rem; line-height: 1.15; color: var(--muted); font-weight: 500; }
.prof-grid button:hover { border-color: var(--accent); color: var(--ink); }
.prof-grid button[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.finder-filters { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; }
.finder-filters > summary { cursor: pointer; font: 500 .72rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.filters { display: flex; flex-direction: column; gap: 2px; margin: 6px 0 4px; }
.frow { font-size: .85rem; }
.fnum { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 0; }
.fnum .flab { flex: 1; min-width: 0; }
.fin { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.fin input { width: 96px; min-height: 30px; padding: 4px 7px; font-size: .85rem; }
.fin .small:last-child { width: 1.6em; }
.fset { padding: 5px 0 3px; }
.flab { color: var(--ink); }
.fchips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.fchip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 99px; padding: 2px 9px 2px 6px; font-size: .76rem; cursor: pointer; background: var(--bg); max-width: 100%; }
.fchip input { width: 13px; height: 13px; }
.fchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fchip:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.frow.opt { padding: 4px 0; }
.finder-actions { display: flex; align-items: end; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.sortlab { display: flex; flex-direction: column; gap: 2px; font-size: .74rem; color: var(--muted); flex: 1; min-width: 0; }
.sortlab select { font-size: .85rem; min-height: 36px; width: 100%; }
#finder-csv { text-decoration: none; color: var(--ink); }
#finder-csv[aria-disabled="true"] { pointer-events: none; opacity: .5; }
.finder-status { margin-top: 10px; color: var(--muted); }
.save-form { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.save-form input[type=text] { min-height: 36px; font-size: .9rem; }
.save-form .finder-actions { margin-top: 4px; padding-top: 0; border-top: 0; }
.saved-box { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.saved-box > summary { cursor: pointer; font-weight: 600; font-size: .85rem; }
.saved-list { list-style: none; margin: 8px 0 2px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.saved { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 2px 4px 2px 0; }
.saved:hover, .saved:focus-within { border-color: var(--accent); }
.saved-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; text-align: left; background: none; border: 0; padding: 6px 4px 6px 10px; }
.saved-name { font-weight: 600; font-size: .88rem; overflow-wrap: anywhere; }
.saved-alert { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--muted); }
.finder-status strong { color: var(--ink); }
.hits { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hit { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.hit:hover, .hit:focus-within { border-color: var(--accent); }
.hit-main { width: 100%; display: flex; gap: 10px; align-items: center; text-align: left; background: none; border: 0; padding: 8px 10px 4px; }
.hit-body { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.hit-title { font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; }
.hit-title .muted { font-weight: 400; }
.hit-sub { color: var(--muted); }
.score {
  --tc: var(--na-t); --tb: var(--na-bg);
  flex: none; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center;
  font: 800 1.05rem/1 var(--f-display); font-variant-numeric: tabular-nums; color: var(--tc); background: var(--tb);
  border: 1.5px solid color-mix(in srgb, var(--tc) 45%, transparent);
}
.why { padding: 0 10px 8px 62px; }
.why > summary { cursor: pointer; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.why[open] > summary { white-space: normal; }
.why-list { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; font-variant-numeric: tabular-nums; }
.why-list .pos { color: var(--ok-t); }
.why-list .neg { color: var(--bad-t); }
.why-list .zero { color: var(--muted); }
.more { margin-top: 8px; width: 100%; justify-content: center; }
/* grupy działek (Z23) */
.finder-groups-opt .opt select { max-width: 130px; }
.finder-groups-opt p { margin: 2px 0 0; }
#finder-csv-grupy { text-decoration: none; color: var(--ink); white-space: nowrap; }
.finder-actions { flex-wrap: wrap; }
.finder-actions .sortlab { flex: 1 1 150px; }
.finder-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 8px; }
.finder-tabs button { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px; min-height: 36px; font-size: .82rem; color: var(--muted); font-weight: 500; }
.finder-tabs button[aria-selected="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); font-weight: 600; }
.score.grp { border-style: dashed; border-width: 2px; }
.grp-members { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px; }
.grp-members button { background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: 2px 9px; font-size: .76rem; color: var(--ink); }
.grp-members button:hover { border-color: var(--accent); }
.finder .disclaimer { margin-top: 10px; }
.finder:not([hidden]) ~ .legend-hint { display: none; }
#btn-find { margin-left: auto; }
#btn-find + #btn-layers { margin-left: 0; }

.maphint {
  position: absolute; z-index: 10; left: 50%; bottom: 40px; transform: translateX(-50%); max-width: min(560px, calc(100% - 24px));
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: 8px; padding: 7px 12px; font-size: .85rem; box-shadow: var(--shadow);
}
.maphint.is-err { border-left-color: var(--bad); }
.legend-hint { position: absolute; z-index: 9; left: 12px; bottom: 36px; background: color-mix(in srgb, var(--paper) 92%, transparent); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; font-size: .75rem; }
.legend-hint .lg { display: flex; align-items: center; gap: 6px; }
.legend-hint i { width: 12px; height: 12px; border-radius: 2px; display: inline-block; opacity: .75; }
.layers:not([hidden]) ~ .legend-hint { display: none; }

.toast {
  position: fixed; z-index: 90; left: 50%; bottom: 28px; transform: translateX(-50%); max-width: min(520px, calc(100% - 24px));
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: .9rem;
}
.toast.t-err { background: var(--bad); color: #fff; }
.toast.t-warn { background: var(--warn); color: #fff; }

/* mapa: kontrolki MapLibre w obu motywach */
.maplibregl-ctrl-group { background: var(--paper) !important; border: 1px solid var(--line); box-shadow: none !important; }
.maplibregl-ctrl-group button + button { border-top-color: var(--line) !important; }
.maplibregl-ctrl-attrib { background: color-mix(in srgb, var(--paper) 88%, transparent) !important; color: var(--ink) !important; font-size: 11px; }
.maplibregl-ctrl-attrib a { color: var(--accent) !important; }
.maplibregl-ctrl-scale { background: color-mix(in srgb, var(--paper) 80%, transparent) !important; color: var(--ink) !important; border-color: var(--muted) !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .maplibregl-ctrl-icon { filter: invert(1) hue-rotate(180deg); }
}
.hover-pop .maplibregl-popup-content { background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: .78rem; pointer-events: none; box-shadow: var(--shadow); }
.hover-pop .maplibregl-popup-tip { display: none; }
.hp-row { display: flex; flex-direction: column; gap: 0; }
.hp-row + .hp-row { margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- panel karty */
.panel {
  flex: none; width: var(--panel-w); max-width: 46vw; min-width: 380px; display: flex; flex-direction: column; min-height: 0;
  background: var(--bg); border-left: 1px solid var(--line); z-index: 15;
}
.sheet-handle { display: none; }
.panel-bar {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px;
  background: var(--paper); border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.tools { display: flex; gap: 6px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--bg); }
.seg button { background: none; border: 0; padding: 7px 13px; min-height: 36px; color: var(--muted); font-weight: 500; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-checked="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.panel-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 32px; }
.panel-state { padding: 0 16px; }
.panel-state p { padding-top: 14px; }
.errbox { margin: 16px; padding: 14px; border: 1px solid var(--bad); border-left-width: 5px; border-radius: 8px; background: var(--bad-bg); color: var(--bad-t); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.calc { margin: 4px 16px 8px; font-size: .86rem; }
.calc summary { cursor: pointer; color: var(--muted); }
.calc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; align-items: end; }
.calc-grid label { display: flex; flex-direction: column; gap: 3px; font-size: .78rem; color: var(--muted); }
.calc-grid button { grid-column: 1 / -1; justify-self: start; }
.print-head { display: none; }

.skeleton { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.sk { border-radius: 8px; background: linear-gradient(90deg, var(--line), color-mix(in srgb, var(--line) 40%, var(--paper)), var(--line)); background-size: 200% 100%; animation: sh 1.3s linear infinite; }
.sk-l { height: 28px; width: 60%; } .sk-v { height: 120px; } .sk-m { height: 64px; }
@keyframes sh { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- karta */
.card-head { padding: 16px 16px 6px; display: flex; flex-direction: column; gap: 6px; }
.card-title h2 { font-size: 1.45rem; font-weight: 800; letter-spacing: -.01em; }
.card-sub { color: var(--muted); font-size: .88rem; }
.card-area { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.big { font: 800 1.9rem/1 var(--f-display); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.big.sm { font-size: 1.2rem; }
.big .sub { font: 400 .8rem var(--f-body); color: var(--muted); letter-spacing: 0; }
.stamp { font: 400 .74rem var(--f-mono); color: var(--muted); }

.secnav { position: sticky; top: 0; z-index: 5; display: flex; gap: 4px; overflow-x: auto; padding: 8px 16px; background: var(--bg); border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.secnav button { flex: none; background: var(--paper); border: 1px solid var(--line); border-radius: 99px; padding: 3px 11px; font-size: .82rem; color: var(--muted); }
.secnav button:hover { color: var(--ink); border-color: var(--accent); }
.card-sections { display: flex; flex-direction: column; gap: 14px; padding: 14px 16px 0; }
.sec { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 52px; min-width: 0; }
.sec-h { font-size: 1.02rem; font-weight: 700; }
.sec h4 { font-size: .8rem; font-family: var(--f-mono); font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.note { font-size: .86rem; }
.note-warn { color: var(--mid-t); background: var(--mid-bg); padding: 6px 10px; border-radius: 6px; }
.notes { margin: 0; padding-left: 18px; font-size: .86rem; display: flex; flex-direction: column; gap: 3px; }
.notes-warn { color: var(--mid-t); }
.notes-gap { color: var(--na-t); }
.lead-s { font-size: .9rem; }

/* pigułki i chipy */
.pill {
  --tc: var(--na-t); --tb: var(--na-bg);
  display: inline-flex; align-items: center; gap: 5px; font: 500 .74rem/1.2 var(--f-mono); padding: 3px 9px; border-radius: 99px;
  color: var(--tc); background: var(--tb); border: 1px solid color-mix(in srgb, var(--tc) 45%, transparent); white-space: nowrap; vertical-align: middle;
}
.pill.lg { font-size: .88rem; padding: 5px 13px; font-weight: 600; }
.pill .ic { font-style: normal; font-weight: 700; width: 1.1em; text-align: center; }
.t-ok { --tc: var(--ok-t); --tb: var(--ok-bg); --bar: var(--good); }
.t-mid { --tc: var(--mid-t); --tb: var(--mid-bg); --bar: var(--warn); }
.t-bad { --tc: var(--bad-t); --tb: var(--bad-bg); --bar: var(--bad); }
.t-info { --tc: var(--info-t); --tb: var(--info-bg); --bar: var(--info); }
.t-na { --tc: var(--na-t); --tb: var(--na-bg); --bar: var(--na); }
.chips { display: inline-flex; flex-wrap: wrap; gap: 3px; vertical-align: middle; }
.chip, .cite {
  font: 500 .7rem/1.2 var(--f-mono); color: var(--accent); background: var(--accent-soft); border: 1px solid transparent; border-radius: 5px; padding: 2px 6px; min-height: 22px;
}
.chip::before { content: "ź. "; opacity: .65; }
.chip.static { cursor: default; }
.chip.stale { color: var(--bad-t); background: var(--bad-bg); }
.chip:hover, .cite:hover { border-color: var(--accent); }
.cite { background: none; border-color: var(--line); }
.cite[aria-expanded="true"] { background: var(--accent-soft); border-color: var(--accent); }
.cite.low { color: var(--mid-t); background: var(--mid-bg); }
.tag { font: 400 .7rem var(--f-mono); color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }
.linkbtn { background: none; border: 0; color: var(--accent); text-decoration: underline; padding: 0 4px; font-size: .8rem; }

/* status reformy */
.verdict { border: 1px solid color-mix(in srgb, var(--bar) 50%, var(--line)); border-left: 8px solid var(--bar); background: var(--tb); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; color: var(--ink); }
.verdict-pill { align-self: flex-start; display: inline-flex; gap: 8px; align-items: center; background: var(--bar); color: #fff; font: 700 .95rem/1.2 var(--f-display); padding: 6px 14px 6px 10px; border-radius: 99px; }
:root[data-theme="dark"] .verdict-pill { color: #0b1210; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .verdict-pill { color: #0b1210; } }
.verdict-pill .ic { font-style: normal; font-size: 1.05rem; width: 1.3em; height: 1.3em; display: inline-grid; place-items: center; background: rgba(255,255,255,.28); border-radius: 50%; }
.verdict-text { font: 700 1.12rem/1.3 var(--f-display); }
.verdict-desc { font-size: .9rem; }
.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.status-grid .box { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; align-items: flex-start; }
.status-grid .box.wide { grid-column: 1 / -1; align-items: stretch; }
.mini { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.plan { border-top: 1px solid var(--line); padding-top: 6px; font-size: .86rem; width: 100%; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: .86rem; margin: 0; width: 100%; }
.kv dt { font: 400 .74rem var(--f-mono); color: var(--muted); padding-top: 2px; }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.bar { position: relative; height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; width: 100%; min-width: 120px; }
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 99px; }
.bar-thr { overflow: visible; }
.thr { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); }
.ouz-bar { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.zone { display: inline-flex; align-items: center; gap: 6px; font: 500 .82rem var(--f-mono); }
.zone i { width: 13px; height: 13px; border-radius: 3px; display: inline-block; flex: none; border: 1px solid rgba(0,0,0,.18); }
.zone-row { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: .86rem; align-items: baseline; }
.zone-row:first-of-type { border-top: 0; }
.zone-row .zone-desc { color: var(--ink); }
.zone-row .mono, .zone-row .chips { grid-column: 2; }

.warnbox { border: 1px solid color-mix(in srgb, var(--warn) 55%, var(--line)); background: var(--mid-bg); color: var(--mid-t); border-radius: 12px; padding: 10px 14px; }
.warnbox summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 8px; list-style-position: inside; }
.warnbox .ic { font-style: normal; font-weight: 800; width: 20px; height: 20px; border-radius: 50%; background: var(--warn); color: #fff; display: inline-grid; place-items: center; font-size: .8rem; }
.warnbox ul { margin: 8px 0 0; padding-left: 4px; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: .86rem; }
.warnbox li { color: var(--ink); padding-left: 10px; border-left: 3px solid var(--bar); }
.warnbox .chip { background: var(--paper); }

/* parametry */
.zone-card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.zone-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 8px 12px; background: var(--bg); border-bottom: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: .87rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child > * { border-bottom: 0; }
thead th { font: 500 .68rem var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--bg); white-space: nowrap; }
.params th { width: 42%; font-weight: 500; color: var(--muted); font-size: .84rem; }
.row-check { background: color-mix(in srgb, var(--mid-bg) 55%, transparent); }
.pv { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.pv-val { font: 700 1rem var(--f-display); font-variant-numeric: tabular-nums; }
.quote { flex-basis: 100%; margin: 4px 0 0; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 6px 6px 0; font-size: .84rem; }
.quote footer { font: 400 .72rem var(--f-mono); color: var(--muted); margin-top: 4px; }
.check { flex-basis: 100%; font-size: .8rem; color: var(--mid-t); margin-top: 2px; }
.tbl { overflow-x: auto; }
.tbl table.compact { min-width: 520px; font-size: .82rem; }
table.flex { min-width: 0 !important; }
table.flex thead th { white-space: normal; }
td.n { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* PUM */
.pum { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); }
.pum-range { font-size: 2.1rem; }
.formula { font: 400 .8rem/1.4 var(--f-mono); color: var(--muted); }
.how { font-size: .84rem; }
.how summary { cursor: pointer; color: var(--accent); }
.how[open] summary { margin-bottom: 6px; }

/* flagi */
.flag-sum { display: flex; flex-wrap: wrap; gap: 6px; }
.flags { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.flag { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); border-left: 5px solid var(--bar); }
.flag .pill { justify-self: start; }
.flag-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: .88rem; }
.alert { padding: 8px 12px; border-radius: 8px; background: var(--tb); color: var(--tc); border: 1px solid var(--tc); }
.oze-eval { display: flex; align-items: center; gap: 10px; }

/* sieć / ceny */
.gpz { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; }
.gpz-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.power { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.pw-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.pw-tile { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; background: var(--bg); }
.pw-val { font: 700 1.05rem var(--f-display); font-variant-numeric: tabular-nums; }
.pw-tbl td, .pw-tbl th { padding: 4px 6px; }
.pw-tbl td.cur { font-weight: 700; background: var(--accent-soft); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.price { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0; }
.price .big { font-size: 1.5rem; }

/* źródła */
.srcs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.src { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.src-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.src.flash, .flash { animation: fl 1.6s ease-out 1; }
@keyframes fl { 0% { background: color-mix(in srgb, var(--accent) 35%, transparent); } 100% { background: transparent; } }
.disclaimer { font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------- wąskie ekrany: karta jako dolny arkusz */
@media (max-width: 1100px) { .search select { max-width: 120px; } }
@media (max-width: 720px) {
  .brand-name { display: none; }
  .topbar { flex-wrap: wrap; gap: 8px; padding-top: 6px; padding-bottom: 6px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  #btn-layers { margin-left: auto; }
  .app { flex-direction: column; }
  .layers { top: 8px; left: 8px; right: 8px; width: auto; max-height: 62%; }
  .finder { top: 8px; left: 8px; right: 8px; width: auto; max-height: 64%; }
  #btn-find + #btn-layers { margin-left: 0; }
  .legend-hint { display: none; }
  .maphint { bottom: auto; top: 8px; }
  .panel {
    width: auto; max-width: none; min-width: 0; border-left: 0; border-top: 1px solid var(--line); border-radius: 16px 16px 0 0;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, .18); margin-top: -16px; padding-bottom: env(safe-area-inset-bottom);
  }
  .panel[data-sheet="peek"] { height: 150px; }
  .panel[data-sheet="half"] { height: 54%; }
  .panel[data-sheet="full"] { height: calc(100% - 28px); }
  .sheet-handle { display: grid; place-items: center; flex: none; height: 26px; width: 100%; background: var(--paper); border: 0; border-radius: 16px 16px 0 0; padding: 0; touch-action: none; }
  .sheet-handle span { width: 44px; height: 5px; border-radius: 3px; background: var(--line); display: block; }
  .panel-bar { border-top: 0; }
  .card-title h2 { font-size: 1.25rem; }
  .flag { grid-template-columns: 1fr; gap: 6px; }
  .calc-grid { grid-template-columns: 1fr 1fr; }
  .toast { bottom: 12px; }
}
@media (max-width: 460px) {
  .panel-bar { flex-wrap: nowrap; padding: 6px 10px; }
  .btn { padding: 6px 9px; }
  .seg button { padding: 7px 9px; font-size: .88rem; }
  .pum-range { font-size: 1.7rem; }
  .params th { width: 38%; }
}

/* ---------------------------------------------------------------- druk (zapis do PDF z przeglądarki) */
@page { size: A4; margin: 13mm 12mm; }
@media print {
  :root:root:root {
    --bg: #fff; --paper: #fff; --ink: #14201e; --muted: #4f5e5a; --line: #c9d2cd; --accent: #0f6b5c; --accent-soft: #e1efe9; --on-accent: #fff;
    --mw: #a0643a; --mn: #d9b13b; --u: #c2413a; --zl: #3f8a4a; --e: #4a63b5; --na: #7a8a85;
    --good: #2f7d4a; --warn: #a86b00; --bad: #b3261e; --info: #3c55a5;
    --ok-bg: #e3f1e8; --ok-t: #1f5f38; --mid-bg: #fbefd5; --mid-t: #7a4d00; --bad-bg: #fbe3e0; --bad-t: #9c1f18;
    --info-bg: #e4e9f7; --info-t: #2c4086; --na-bg: #eceeed; --na-t: #4d5b57; color-scheme: light;
  }
  html, body { height: auto; overflow: visible; background: #fff; display: block; font-size: 10.5pt; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .finder, .topbar, .mapwrap, .toast, .skip, .noprint, .sheet-handle, .secnav, .linkbtn, .calc, .panel-bar { display: none !important; }
  .app { display: block; }
  .panel, .panel[data-sheet] { position: static; display: block !important; width: auto; max-width: none; min-width: 0; height: auto; border: 0; box-shadow: none; margin: 0; border-radius: 0; background: #fff; }
  .panel[hidden] { display: none !important; }
  .panel-scroll { overflow: visible; padding: 0; }
  .print-head { display: block; border-bottom: 2px solid var(--accent); padding: 0 0 8px; margin: 0 0 10px; }
  .print-head img { display: block; width: 100%; max-height: 62mm; object-fit: cover; margin-top: 8px; border: 1px solid var(--line); border-radius: 6px; }
  .card-head { padding: 0 0 6px; }
  .card-sections { padding: 6px 0 0; gap: 10px; }
  .sec { break-inside: avoid; page-break-inside: avoid; border-radius: 6px; padding: 10px 12px; }
  .sec:has(.srcs), .sec:has(table) { break-inside: auto; }
  .verdict, .flag, .src, .zone-card, .price, .gpz, .pum, .warnbox { break-inside: avoid; }
  .quote[hidden] { display: block !important; }
  .cite { border: 1px solid #999; }
  .chip::before { content: ""; }
  .skeleton, .panel-state:empty { display: none; }
  .tbl { overflow: visible; }
  .tbl table.compact { min-width: 0; }
  .how > summary { display: none; }
  a { color: inherit; text-decoration: none; }
  .src a { word-break: break-all; text-decoration: underline; }
}

/* ---------------------------------------------------------------- konto (Z20): wskaźnik w pasku i strona logowania */
.konto { position: relative; flex: none; }
.konto-btn { padding: 4px 10px 4px 4px; max-width: 240px; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-accent); flex: none;
  display: inline-grid; place-items: center; font: 700 .85rem var(--f-display);
}
.konto-email { overflow: hidden; text-overflow: ellipsis; font-size: .85rem; }
.konto-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 45; width: max-content; min-width: 220px; max-width: min(320px, calc(100vw - 24px));
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.konto-menu-email { font-weight: 600; overflow-wrap: anywhere; margin-bottom: 8px; }
.btn.wide { width: 100%; justify-content: center; min-height: 44px; }
a.btn { text-decoration: none; color: inherit; }
a.btn.primary { color: var(--on-accent); }
@media (max-width: 720px) {
  .konto-email { display: none; }
  .konto-btn { padding: 4px; }
  #btn-layers + #konto-zaloguj, #btn-layers ~ .konto { margin-left: 0; }
}

body.page-login { overflow: auto; height: auto; min-height: 100dvh; }
.page-login .brand { text-decoration: none; color: inherit; }
.login-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 40px 16px 24px; gap: 24px; }
.login-card {
  width: 100%; max-width: 420px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 28px 24px;
}
.login-card h1 { font-size: 1.6rem; margin: 6px 0 10px; }
.login-card > div > p { margin-bottom: 12px; }
.login-card form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.login-card label { font-weight: 600; font-size: .9rem; }
.login-card input[type=email] {
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 44px;
  font-size: 16px; /* bez automatycznego powiększania na iOS */
}
.login-card .btn + .btn, .login-card .btn.wide { margin-top: 8px; }
.errline { color: var(--bad); margin-top: 10px; font-size: .9rem; }
.note-ok { background: var(--ok-bg); color: var(--ok-t); border-radius: 8px; padding: 8px 12px; font-size: .9rem; }
.login-foot { max-width: 420px; display: flex; flex-direction: column; gap: 8px; }

.fee { margin: 10px 0; padding-bottom: 8px; border-bottom: 1px solid var(--line, #ddd); }
.fee h4 { margin: 0 0 4px; font-size: .95rem; }
.fee blockquote { margin: 4px 0 4px 8px; padding-left: 8px; border-left: 3px solid var(--line, #ddd); }

.fee { margin: 10px 0; padding-bottom: 8px; border-bottom: 1px solid var(--line, #ddd); }
.fee h4 { margin: 0 0 4px; font-size: .95rem; }
.fee blockquote { margin: 4px 0 4px 8px; padding-left: 8px; border-left: 3px solid var(--line, #ddd); }
