:root {
  --bg: #f3f0e9;
  --surface: #fffdf9;
  --surface-2: #f8f5ee;
  --ink: #17232a;
  --muted: #69736f;
  --line: #e2ddd2;
  --line-strong: #cfc8b9;
  --accent: #1d4a4f;
  --accent-hover: #163b3f;
  --accent-soft: #e3ece9;
  --on-accent: #fffdf9;
  --brass: #b0893c;
  --brass-soft: #f4ead3;
  --ok: #2d7a4e;
  --err: #b3261e;
  --err-soft: #fbe9e7;
  --warn-soft: #fbf0dc;
  --shadow: 0 1px 2px rgba(23, 35, 42, .05), 0 4px 16px rgba(23, 35, 42, .05);
  --shadow-press: inset 0 2px 4px rgba(0, 0, 0, .18);
  --ring: 0 0 0 3px rgba(29, 74, 79, .28);
  --radius: 14px;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1517; --surface: #162024; --surface-2: #1b262b; --ink: #ebe7df; --muted: #98a29e;
    --line: #26333a; --line-strong: #344651; --accent: #7db6b0; --accent-hover: #93c6c0; --accent-soft: #1e3236;
    --on-accent: #0f1517; --brass: #d4ae62; --brass-soft: #2e2817; --ok: #6cc391; --err: #f08b82; --err-soft: #3a1f1d;
    --warn-soft: #2e2817; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    --ring: 0 0 0 3px rgba(125, 182, 176, .35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1517; --surface: #162024; --surface-2: #1b262b; --ink: #ebe7df; --muted: #98a29e;
  --line: #26333a; --line-strong: #344651; --accent: #7db6b0; --accent-hover: #93c6c0; --accent-soft: #1e3236;
  --on-accent: #0f1517; --brass: #d4ae62; --brass-soft: #2e2817; --ok: #6cc391; --err: #f08b82; --err-soft: #3a1f1d;
  --warn-soft: #2e2817; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  --ring: 0 0 0 3px rgba(125, 182, 176, .35); color-scheme: dark;
}

* { box-sizing: border-box }
[hidden] { display: none !important }
html { -webkit-text-size-adjust: 100% }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); font-feature-settings: "ss01"; }
a { color: var(--accent) }
h1, h2, h3 { text-wrap: balance; margin: 0 }
h2 { font-size: 17px; font-weight: 600; letter-spacing: -.01em }
h3 { font-size: 14px; font-weight: 600; margin: 22px 0 10px }
.display { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 5vw, 46px); line-height: 1.05; letter-spacing: -.01em }
.display i { color: var(--brass) }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 11.5px; font-weight: 600; color: var(--muted); margin: 0 0 8px }
.lead { font-size: 16.5px; max-width: 68ch; color: var(--muted); margin: 14px 0 0 }
.lead b { color: var(--ink); font-weight: 600 }
.muted { color: var(--muted) }
.small { font-size: 13px }
.err { color: var(--err); font-weight: 500 }
.ok { color: var(--ok); font-weight: 500 }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center }
.row.nowrap { flex-wrap: nowrap }
.row.between { justify-content: space-between; align-items: flex-end }
.num, td.n, .v, .kpi-v { font-variant-numeric: tabular-nums }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px) }
.top-in { max-width: 1180px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 16px }
.brand svg { width: 30px; height: 30px }
.brand b { font-weight: 700 }
.tabs { margin-left: auto; display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); padding: 4px; border-radius: 12px; flex-wrap: wrap }
.tab { font: inherit; font-size: 14px; font-weight: 500; color: var(--muted); background: transparent; border: 0; padding: 7px 13px; border-radius: 9px; cursor: pointer; transition: background .15s, color .15s, transform .08s }
.tab:hover { color: var(--ink); background: var(--surface) }
.tab:active { transform: scale(.96) }
.tab.active { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow) }
.tab.ghost { color: var(--muted) }
.tab:focus-visible, .btn:focus-visible, .drop:focus-visible, summary:focus-visible { outline: none; box-shadow: var(--ring) }
.busy { background: var(--warn-soft); color: var(--ink); border-top: 1px solid var(--line); font-size: 13.5px; padding: 8px 20px; text-align: center }
.busy .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brass); margin-right: 8px; animation: pulse 1.4s infinite }
@keyframes pulse { 50% { opacity: .3 } }

/* ---------- layout ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 20px; padding-block: 28px 64px }
.page-head { margin: 6px 0 24px }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); min-width: 0 }
.panel + .panel { margin-top: 16px }
.grid2 .panel + .panel { margin-top: 0 }
.step-h { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap }
.step-h .num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brass-soft); color: var(--brass); font-weight: 700; font-size: 13px }

/* ---------- forms ---------- */
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 14px 0 6px; letter-spacing: .01em }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 14px }
.fields .f.wide { grid-column: 1 / -1 }
input, select, textarea { width: 100%; font: inherit; font-size: 14.5px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; transition: border-color .15s, box-shadow .15s, background .15s }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong) }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); background: var(--surface) }
textarea { min-height: 130px; resize: vertical }
textarea.short { min-height: 74px }
.check { display: flex; align-items: center; gap: 8px; margin-top: 40px; color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer }
.check input { width: 18px; height: 18px; accent-color: var(--accent) }
details.adv { margin-top: 16px; border: 1px dashed var(--line-strong); border-radius: 10px; padding: 4px 14px 12px }
details.adv summary { cursor: pointer; font-weight: 600; font-size: 13.5px; padding: 8px 0 2px; border-radius: 6px; list-style: none }
details.adv summary::before { content: "+"; display: inline-block; width: 16px; color: var(--brass); font-weight: 700 }
details.adv[open] summary::before { content: "−" }

/* ---------- buttons ---------- */
.btn { --b: var(--accent); position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: 14.5px; color: var(--on-accent); background: var(--b); border: 1px solid transparent; padding: 10px 18px; border-radius: 10px; cursor: pointer; box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 2px 6px rgba(23, 35, 42, .14); transition: background .15s, transform .08s, box-shadow .12s; user-select: none; white-space: nowrap }
.btn:hover { background: var(--accent-hover) }
.btn:active { transform: translateY(1px) scale(.975); box-shadow: var(--shadow-press) }
.btn svg { width: 18px; height: 18px; transition: transform .2s }
.btn:hover svg { transform: translateX(3px) }
.btn.big { padding: 13px 22px; font-size: 15.5px }
.btn.sec { color: var(--ink); background: var(--surface-2); border-color: var(--line-strong); box-shadow: none }
.btn.sec:hover { background: var(--accent-soft); border-color: var(--accent) }
.btn.sec:active { box-shadow: var(--shadow-press) }
.btn.brass { background: var(--brass); color: #1b1407 }
.btn.brass:hover { filter: brightness(1.06) }
.btn:disabled { opacity: .55; cursor: progress; transform: none }
.btn.loading { color: transparent !important }
.btn.loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--on-accent) var(--on-accent) transparent transparent; animation: spin .7s linear infinite }
.btn.sec.loading::after { border-color: var(--accent) var(--accent) transparent transparent }
.btn.done { background: var(--ok) !important; color: var(--on-accent) !important; border-color: transparent }
.actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 20px }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 8px }
@keyframes spin { to { transform: rotate(360deg) } }

/* ---------- drop zone ---------- */
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; border: 1.5px dashed var(--line-strong); border-radius: 12px; padding: 26px 16px; cursor: pointer; background: var(--surface-2); transition: border-color .15s, background .15s, transform .1s }
.drop svg { width: 30px; height: 30px; color: var(--brass) }
.drop:hover { border-color: var(--accent); background: var(--accent-soft) }
.drop:active { transform: scale(.99) }
.drop.over { border-color: var(--accent); background: var(--accent-soft); border-style: solid }
.thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px }
.thumbs img { width: 70px; height: 52px; object-fit: cover; border-radius: 7px; border: 1px solid var(--line) }
#fileInfo { margin-top: 8px }

/* ---------- hints / log ---------- */
.hint { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; font-size: 13.5px; color: var(--muted); margin: 0 }
.hint.warn { background: var(--warn-soft); color: var(--ink) }
.log { font-size: 13px; color: var(--muted); max-height: 280px; overflow: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 14px }
.log div { padding: 3px 0; border-bottom: 1px dashed var(--line) }
.log div:last-child { border: 0 }
.log time { color: var(--brass); font-variant-numeric: tabular-nums; margin-right: 8px }

/* ---------- progress ---------- */
.progress { display: flex; flex-direction: column; gap: 12px }
.bar { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line) }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--brass)); border-radius: 6px; transition: width .6s ease }
.now { font-size: 16px; font-weight: 500 }

/* ---------- report ---------- */
.rep-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px }
.hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden }
.hero > div { padding: 20px 22px; border-right: 1px solid var(--line); min-width: 0 }
.hero > div:last-child { border-right: 0 }
.hero .main { background: var(--accent); color: var(--on-accent) }
.hero .main .l { color: color-mix(in srgb, var(--on-accent) 75%, transparent) }
.hero .l { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600 }
.hero .price { font-family: var(--serif); font-size: clamp(36px, 5vw, 52px); line-height: 1.05; margin: 6px 0 4px; font-variant-numeric: tabular-nums }
.hero .v { font-size: 21px; font-weight: 600; margin: 6px 0 2px }
.hero .s { font-size: 13px; color: var(--muted) }
.hero .main .s { color: color-mix(in srgb, var(--on-accent) 80%, transparent) }
.scen { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px }
.pill { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-variant-numeric: tabular-nums }
.pill b { font-weight: 600 }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 34px 0 12px; flex-wrap: wrap }
.sec-h h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; letter-spacing: -.005em }
.notes { margin: 0; padding-left: 18px }
.notes li { margin: 4px 0 }
.letter { white-space: pre-wrap; font-size: 14.5px; line-height: 1.65; max-width: 76ch }
.tblwrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface) }
table { width: 100%; border-collapse: collapse; font-size: 13.5px }
th { text-align: center; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 10px 10px; border-bottom: 1px solid var(--line-strong); background: var(--surface-2); white-space: nowrap }
th:first-child, td:first-child { text-align: left }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top }
tr:last-child td { border-bottom: 0 }
td.n { text-align: center; white-space: nowrap }
tr.excl td { opacity: .45 }
tr.key td { background: var(--brass-soft) }
.tag { display: inline-block; font-size: 11px; font-weight: 600; border-radius: 6px; padding: 2px 7px; background: var(--accent-soft); color: var(--accent); white-space: nowrap }
.tag.brass { background: var(--brass-soft); color: var(--brass) }

/* ---------- comparable cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 16px }
.ccard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; min-width: 0 }
.gal { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; aspect-ratio: 16 / 8; max-height: 340px; width: 100%; background: var(--surface-2); max-width: 100% }
.gal img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in }
.gal img:first-child { grid-row: 1 / 3 }
.gal.empty { aspect-ratio: auto; height: 64px; display: grid; place-items: center; color: var(--muted); font-size: 13px; grid-template-columns: 1fr; grid-template-rows: 1fr }
.cbody { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px }
.cbody h3 { margin: 0; font-size: 17px }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px }
.kv div { background: var(--surface-2); border-radius: 9px; padding: 8px 10px; min-width: 0 }
.kv span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted) }
.kv b { font-size: 15px; font-variant-numeric: tabular-nums }
.meter { display: flex; align-items: center; gap: 10px; font-size: 13px }
.meter .dots { display: flex; gap: 3px }
.meter .dots i { width: 14px; height: 6px; border-radius: 3px; background: var(--line) }
.meter .dots i.on { background: var(--brass) }
.meter .dots.a i.on { background: var(--accent) }
.verdict { border-left: 3px solid var(--brass); padding: 4px 0 4px 12px; font-size: 14px }
.cactions { display: flex; gap: 8px; flex-wrap: wrap }
.cactions .btn { padding: 8px 13px; font-size: 13.5px }

/* ---------- archive ---------- */
.search { max-width: 280px }
.arch { display: grid; gap: 8px }
.arch a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .08s, box-shadow .15s }
.arch a:hover { border-color: var(--accent); box-shadow: var(--shadow) }
.arch a:active { transform: scale(.995) }
.arch .p { font-family: var(--serif); font-size: 24px; font-variant-numeric: tabular-nums }
.arch .arow { display: flex; gap: 8px; align-items: stretch }
.arch .arow > a { flex: 1; min-width: 0 }
.adel { font: inherit; font-size: 13px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; cursor: pointer; white-space: nowrap; transition: color .15s, border-color .15s, background .15s }
.adel:hover { color: var(--err); border-color: var(--err) }
.adel.arm { color: var(--err); background: var(--err-soft); border-color: var(--err); font-weight: 600 }
.adel:disabled { opacity: .6; cursor: progress }
.arch-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: flex-end; margin: -6px 0 12px }
.arch-tools label { display: inline-flex; gap: 6px; align-items: center; margin: 0; font-weight: 500; white-space: nowrap; color: var(--muted); cursor: pointer }
.arch-tools input { width: auto; margin: 0; accent-color: var(--accent) }
.arch-confirm { display: grid; gap: 10px; padding: 14px 18px; margin-bottom: 12px; background: var(--err-soft); border: 1px solid var(--err); border-radius: 12px }
.arch-confirm p { margin: 0 }
.arch-confirm .row { display: flex; flex-wrap: wrap; gap: 8px }
.btn.danger { background: var(--err); color: var(--on-accent) }
.btn.danger:hover { filter: brightness(1.08); background: var(--err) }
@media (max-width: 560px) { .arch .arow { flex-direction: column } .adel { padding: 8px 14px; align-self: flex-end } }

/* ---------- how it works ---------- */
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; position: relative }
.flow li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 4px 16px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); position: relative }
.flow li::before { content: ""; position: absolute; left: 21px; top: 52px; bottom: -16px; width: 2px; background: var(--line) }
.flow li:last-child::before { display: none }
.flow .n { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1.5px solid var(--brass); color: var(--brass); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; position: relative; z-index: 1 }
.flow h3 { margin: 4px 0 4px; font-size: 16px }
.flow p { margin: 0; color: var(--muted); max-width: 70ch }
.flow p b { color: var(--ink) }
.flow .chips { grid-column: 3; justify-self: end; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin-top: 6px }
.chip { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 28px 0 16px }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 2px }
.fact .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600 }
.fact .v { font-family: var(--serif); font-size: 30px }
.note h3 { margin-top: 0 }
.note p { margin: 0; color: var(--muted); max-width: 80ch }

/* ---------- login ---------- */
.login { min-height: 70vh; display: grid; place-items: center }
.login-card { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 32px; box-shadow: var(--shadow) }
.login-card .display { font-size: 40px; margin-bottom: 10px }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; background: rgba(8, 12, 14, .88); display: grid; place-items: center; z-index: 50; padding: 20px; cursor: zoom-out }
.lb img { max-width: 100%; max-height: 92vh; border-radius: 8px }

@media (max-width: 860px) {
  .grid2, .hero, .facts { grid-template-columns: minmax(0, 1fr) }
  .hero > div { border-right: 0; border-bottom: 1px solid var(--line) }
  .tabs { margin-left: 0; width: 100% }
  .tab { flex: 1 1 auto; padding: 7px 8px }
  .flow li { grid-template-columns: 52px minmax(0, 1fr) }
  .flow .chips { grid-column: 2; justify-self: start; justify-content: flex-start }
  .kv { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .wrap, .top-in { padding-inline: 16px }
}

/* ---------- print: card or full report ---------- */
@media print {
  @page { margin: 12mm }
  :root { --bg: #fff; --surface: #fff; --surface-2: #f5f3ee; --ink: #111; --muted: #555; --line: #ddd; --accent: #1d4a4f; --on-accent: #fff; color-scheme: light }
  body { background: #fff; font-size: 12px }
  .top, .busy, .no-print, .actions, .cactions, #vNew, #vArchive, #vHow, #vSettings { display: none !important }
  .panel, .ccard, .hero, .tblwrap { box-shadow: none; break-inside: avoid }
  body.print-card > *:not(#printZone) { display: none !important }
  body.print-card #printZone { display: block !important }
  #printZone .ccard { display: flex; flex-direction: column; border: 0 }
  #printZone .gal { width: 100%; aspect-ratio: auto; max-height: none; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: auto }
  #printZone .gal img { height: 55mm; display: block !important }
  #printZone .gal img:first-child { grid-row: auto }
  #printZone .gal img:nth-child(n+7) { display: none !important }
  .kdet { display: none !important }
  .wrap { padding: 0; max-width: none }
  a { color: #111; text-decoration: none }
  .print-only { display: block !important }
}
.print-only { display: none }
.gal img:nth-child(n+4) { display: none }
.btn { text-decoration: none }

@media print {
  .hero .main { background: none !important; color: #111 !important; }
  .hero .main .l, .hero .main .s { color: #555 !important; }
  .hero .main .price { color: #111 !important; }
  .panel, .tblwrap { break-inside: auto !important; }
  .sec-h, h2, h3 { break-after: avoid; }
  tr { break-inside: avoid; }
  details.panel { display: none !important; }
}

/* ---------- ustawienia ---------- */
.sgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start }
.sblock { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px 18px; box-shadow: var(--shadow); min-width: 0 }
.sblock.wide { grid-column: 1 / -1 }
.sblock header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line) }
.sblock header h3 { margin: 0; font-size: 15.5px }
.sblock header p { margin: 0; color: var(--muted); font-size: 13px }
.sblock .sub { font-size: 13px; font-weight: 600; margin: 16px 0 -4px }
.sblock .check { margin: 12px 0 0 }
.fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)) }
.fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)) }
.fields.four { grid-template-columns: repeat(4, minmax(0, 1fr)) }
.fields.two label, .fields.three label, .fields.four label { min-height: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.unit { display: flex; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; transition: border-color .15s, box-shadow .15s }
.unit:focus-within { border-color: var(--accent); box-shadow: var(--ring); background: var(--surface) }
.unit input { border: 0; background: transparent; box-shadow: none !important; min-width: 0; text-align: right; font-variant-numeric: tabular-nums }
.unit span { padding: 0 12px 0 2px; color: var(--muted); font-size: 13px; white-space: nowrap }
.unit span.pre { padding: 0 0 0 12px }
.static { padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--muted); font-size: 14px }
.help { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5 }
.savebar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 860px) {
  .sgrid, .fields.two, .fields.three, .fields.four { grid-template-columns: minmax(0, 1fr) }
}

/* ---------- jak to działa: schemat ---------- */
.pipe { display: flex; flex-direction: column; align-items: stretch }
.stage { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px 18px; box-shadow: var(--shadow) }
.stage-l { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px }
.stage-l span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: 11.5px; letter-spacing: 0 }
.stage-l em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12.5px; color: var(--ink); background: var(--brass-soft); padding: 3px 10px; border-radius: 999px }
.prow { display: grid; grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr) 64px minmax(0, 1fr); align-items: stretch }
.prow.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px }
.blk { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; min-width: 0; transition: transform .2s, box-shadow .2s, border-color .2s }
.blk:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong) }
.blk.hl { border-color: var(--accent); background: var(--accent-soft) }
.blk.src-ev { border-top: 3px solid var(--accent) }
.blk.src-ot { border-top: 3px solid var(--brass) }
.blk.src-nb { border-top: 3px solid var(--muted) }
.blk-h { display: flex; gap: 10px; align-items: flex-start }
.blk-h > div { flex: 1; min-width: 0 }
.blk h4 { margin: 0; font-size: 15px }
.blk p { margin: 1px 0 0; font-size: 12.5px; color: var(--muted) }
.ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); flex: none }
.ico svg, .out svg { width: 19px; height: 19px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round }
.eng { font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--accent); white-space: nowrap }
.blk ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 5px; font-size: 13px }
.blk li { padding-left: 14px; position: relative; color: var(--ink) }
.blk li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 5px; height: 5px; border-radius: 50%; background: var(--brass) }
.dv { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums }
/* strzałki poziome z wędrującym punktem */
.arr { position: relative; align-self: center; height: 2px; margin: 0 10px 0 8px; background: repeating-linear-gradient(90deg, var(--muted) 0 5px, transparent 5px 9px); opacity: .7 }
.arr::after { content: ""; position: absolute; right: -6px; top: -5px; border: 6px solid transparent; border-left: 8px solid var(--muted); border-right: 0 }
.arr i { position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--brass); box-shadow: 0 0 0 3px var(--brass-soft); animation: flowx 1.8s cubic-bezier(.5, 0, .5, 1) infinite }
@keyframes flowx { 0% { left: 0; opacity: 0 } 15% { opacity: 1 } 85% { opacity: 1 } 100% { left: calc(100% - 8px); opacity: 0 } }
/* łączniki pionowe między etapami */
.conn { position: relative; height: 38px; display: flex; justify-content: center; gap: 120px }
.conn::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-1px); background: repeating-linear-gradient(180deg, var(--line-strong) 0 6px, transparent 6px 11px) }
.conn i { position: absolute; left: calc(50% - 4px); top: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: flowy 1.6s cubic-bezier(.5, 0, .5, 1) infinite }
.conn i + i { animation-delay: .8s }
@keyframes flowy { 0% { top: 0; opacity: 0 } 20% { opacity: 1 } 80% { opacity: 1 } 100% { top: calc(100% - 8px); opacity: 0 } }
.outs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px }
.out { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 14px 8px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); animation: pop 3.2s ease-in-out infinite }
.out b { font-size: 14px }
.out span { font-size: 12px; color: var(--muted) }
.out:nth-child(2) { animation-delay: .25s } .out:nth-child(3) { animation-delay: .5s } .out:nth-child(4) { animation-delay: .75s } .out:nth-child(5) { animation-delay: 1s }
@keyframes pop { 0%, 70%, 100% { border-color: var(--line) } 80% { border-color: var(--brass) } }
@media (max-width: 860px) {
  .prow, .prow.three { grid-template-columns: minmax(0, 1fr); gap: 0 }
  .prow.three { gap: 10px }
  .arr { width: 2px; height: 30px; margin: 4px auto; background: repeating-linear-gradient(180deg, var(--line-strong) 0 6px, transparent 6px 11px) }
  .arr::after { right: auto; left: -4px; top: auto; bottom: -3px; border: 5px solid transparent; border-top: 7px solid var(--line-strong); border-bottom: 0 }
  .arr i { left: -3px; animation-name: flowy }
  .outs { grid-template-columns: repeat(2, minmax(0, 1fr)) }
}
@media (prefers-reduced-motion: reduce) { .arr i, .conn i, .out { animation: none } .arr i, .conn i { display: none } }

/* ---------- raport ---------- */
#printZone { display: none }
.rep-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center }
.rep-actions .btn { padding: 9px 15px; font-size: 14px }
.rep-nav { display: flex; gap: 4px; flex-wrap: wrap; margin: -6px 0 16px; font-size: 13.5px }
.rep-nav a { color: var(--muted); text-decoration: none; padding: 5px 11px; border-radius: 999px; border: 1px solid transparent }
.rep-nav a:hover { color: var(--ink); border-color: var(--line); background: var(--surface) }
.pill.conf.low { border-color: var(--brass); background: var(--warn-soft) }
.pill.conf.mid { border-color: var(--brass) }
.pill.conf.ok { border-color: var(--ok) }
.concl { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; align-items: start }
.concl h3 { margin: 0 0 8px; font-size: 15px }
.concl .notes li { margin: 6px 0 }
.dnotes { margin-top: 10px }
.dnotes ul { margin-top: 6px }
.sub-h { margin: 22px 0 10px; font-size: 16px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap }
.sub-h .muted { font-weight: 400 }
table.txt td:first-child { min-width: 230px }
td.cm { font-size: 13px; color: var(--ink); min-width: 220px; max-width: 420px }
.src { margin-top: 3px; color: var(--muted) }
.src a { color: var(--accent); font-weight: 600 }
.tag.mute { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line) }
.lnk { margin-top: 6px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--accent); background: none; border: 1px dashed var(--accent); border-radius: 8px; padding: 4px 10px; cursor: pointer; transition: background .15s, transform .08s }
.lnk:hover { background: var(--accent-soft) }
.lnk:active { transform: scale(.97) }
.lnk::after { content: " ▾"; display: inline-block; transition: transform .2s }
.lnk[aria-expanded="true"]::after { transform: rotate(180deg) }
tr.kdet > td { background: var(--surface-2); padding: 12px }
.kdet .ccard { flex-direction: row; box-shadow: none }
.kdet .gal { width: 44%; flex: none; aspect-ratio: 4 / 3; max-height: 320px }
.kdet .cbody { flex: 1; min-width: 0 }
.meters { display: grid; gap: 4px }
.meter span { width: 80px; color: var(--muted) }
@media (max-width: 860px) {
  .concl { grid-template-columns: minmax(0, 1fr) }
  .kdet .ccard { flex-direction: column }
  .kdet .gal { width: 100% }
}

/* ---------- tester ---------- */
.is-tester .agency-only { display: none !important }
.tbar { background: var(--brass-soft); color: var(--ink); font-size: 13.5px; padding: 8px 16px; text-align: center; border-bottom: 1px solid var(--line) }
.terms-card { max-width: 720px; margin: 32px auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 30px }
.terms { padding-left: 20px; line-height: 1.6; margin: 16px 0 }
.terms li { margin: 6px 0 }
code.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; letter-spacing: .05em; user-select: all }
.mode-agency .mvp-only, .mode-mvp .agency-mode { display: none !important }
.lnk.plain::after { content: none }

/* pola uzupełnione automatycznie z opisu */
.fields .auto { background: rgba(214, 170, 60, .12); border-color: rgba(214, 170, 60, .7); }
#prefillInfo:empty { display: none }
#prefillInfo { margin: -8px 0 4px }

/* ---------- Nowa analiza: cały formularz na jednym ekranie (komputer) ---------- */
.vnew .fields.form4 { grid-template-columns: repeat(4, minmax(0, 1fr)) }
.vnew .fields.form4 .f.half { grid-column: span 2 }
.vnew .fields.form4 label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.vnew .drop { flex-direction: row; justify-content: center; text-align: left; gap: 14px; padding: 16px }
.vnew .drop svg { flex: none }
@media (min-width: 861px) {
  .vnew { padding-top: 0 }
  .vnew .page-head { display: flex; align-items: baseline; gap: 16px; margin: -12px 0 14px }
  .vnew .page-head .eyebrow { margin: 0 }
  .vnew .page-head .display { font-size: 30px }
  .vnew .grid2 { align-items: stretch }
  .vnew .panel { padding: 18px 20px; display: flex; flex-direction: column }
  .vnew .step-h { margin-bottom: 10px }
  .vnew .step-h .muted { margin-left: auto }
  .vnew label { margin: 10px 0 4px }
  .vnew input, .vnew select, .vnew textarea { padding: 8px 11px; font-size: 14px }
  .vnew textarea.grow { flex: 1 1 auto; min-height: 90px }
  .vnew textarea.short { min-height: 54px }
  .vnew details.adv { margin-top: 12px; padding: 2px 12px 8px }
  .vnew .actions { margin-top: auto; padding-top: 14px }
  .vnew .btn.big { padding: 11px 20px }
  .vnew .thumbs img { width: 54px; height: 40px }
}
@media (max-width: 560px) { .vnew .fields.form4 { grid-template-columns: repeat(2, minmax(0, 1fr)) } }

.geoinfo:empty { display: none }
.geoinfo { margin-top: 4px }
.geoinfo select { margin-top: 4px; padding: 6px 10px; font-size: 13px }

/* ---------- Działki (dzialka.html) ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0) }
.dz { max-width: 860px }
.dz .panel + .panel, .dz .panel + p { margin-top: 14px }
.dz-form { display: grid; gap: 12px }
.dz-form input { font-size: 16px; padding: 13px 14px }
.dz-btns { display: flex; gap: 10px; flex-wrap: wrap }
.dz-btns .btn { flex: 1 1 200px }
.dz-cands { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px }
.dz-cands .btn { width: 100%; justify-content: flex-start; white-space: normal; text-align: left }
.dz-title { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.15; margin: 2px 0 4px }
.dz-id { font-variant-numeric: tabular-nums; word-break: break-all }
.dz-sum { margin: 12px 0 14px; padding: 10px 12px; background: var(--accent-soft); border-radius: 10px }
.dz-map { position: relative; aspect-ratio: 1; width: 100%; border-radius: 10px; overflow: hidden; background: var(--surface-2) }
.dz-map img, .dz-map svg { position: absolute; inset: 0; width: 100%; height: 100% }
.dz-map img { object-fit: cover }
.dz-map polygon { fill: rgba(255, 214, 102, .12); stroke: #ffd666; stroke-width: 3; vector-effect: non-scaling-stroke }
.dz-noimg { display: none; position: absolute; inset: 0; margin: 0; padding: 20px; place-content: center; text-align: center; color: var(--muted) }
.dz-map.noimg .dz-noimg { display: grid; gap: 6px }
.dz-maptools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 12px }
.dz-years { display: flex; gap: 6px; flex-wrap: wrap }
.dz-years .pill { cursor: pointer; font: inherit; font-size: 13px; color: var(--ink) }
.dz-years .pill.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent) }
.dz-chk { display: inline-flex; gap: 8px; align-items: center; font-size: 13.5px }
.dz-chk input { width: auto }
.dz-h { margin: 0 0 8px; font-size: 15px }
.dz-facts, .dz-srcs { list-style: none; padding: 0; margin: 0 }
.dz-fact { padding: 10px 0; border-top: 1px solid var(--line) }
.dz-fact:first-child { border-top: 0; padding-top: 2px }
.dz-fl { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted) }
.dz-fv { font-weight: 500; margin: 2px 0 4px; overflow-wrap: anywhere }
.dz-fact details summary { cursor: pointer; color: var(--muted) }
.dz-fact details p { margin: 6px 0 0; overflow-wrap: anywhere }
.dz-st { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; padding: 2px 7px; border-radius: 6px; white-space: nowrap; align-self: start }
.dz-st.fakt { background: var(--accent-soft); color: var(--accent) }
.dz-st.int { background: var(--brass-soft); color: var(--brass) }
.dz-st.miss { background: var(--warn-soft); color: var(--ink); margin-right: 6px }
.dz-srcs li { padding: 6px 0; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap }
.dz-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; transform: translateY(1px); background: var(--line-strong) }
.dz-dot.ok { background: var(--ok) }
.dz-dot.down { background: var(--err) }
.dz-disc { margin-top: 18px }
@media (max-width: 560px) { .dz-title { font-size: 25px } .dz .panel { padding: 16px } }
a.tab { text-decoration: none; display: inline-flex; align-items: center }
.dz-form #dzMsg { margin: 0 }
.dz-form #dzMsg:empty { display: none }
.dz-pickhead { display: flex; justify-content: space-between; align-items: center; gap: 10px }
.dz-pickhead .btn { flex: none }
.dz-leaf { height: min(65vh, 560px); margin-top: 10px; border-radius: 10px; border: 1px solid var(--line); z-index: 0 }
.dz-leaf .leaflet-control-layers { font: 13px var(--sans) }
.dz .panel, #dzCard { scroll-margin-top: 130px }

/* kompaktowa karta: wiersze nazwa | wartość | status */
.dz .panel + .panel, .dz .panel + p { margin-top: 10px }
.dz .panel { padding: 16px 18px }
.dz-h { margin: 0 0 6px }
.dz-row { display: grid; grid-template-columns: minmax(100px, 36%) 1fr auto; gap: 2px 12px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px }
.dz-row:first-child, .dz-plan:first-child { border-top: 0 }
.dz-k { color: var(--muted); font-size: 13px }
.dz-v { font-weight: 500; overflow-wrap: anywhere }
.dz-m { display: inline-flex; gap: 6px; align-items: center; justify-self: end }
.dz-st { font-size: 9.5px; padding: 1px 5px }
.dz-i { font: italic 600 11px/1 var(--serif); width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); cursor: pointer; padding: 0 }
.dz-i:hover, .dz-i.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent) }
.dz-proof { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); background: var(--surface-2); border-radius: 8px; padding: 7px 9px; margin-top: 4px; overflow-wrap: anywhere }
.dz-plan { padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px }
.dz-plan-h { display: flex; gap: 4px; align-items: baseline }
.dz-plan-h .dz-m { margin-left: auto }
.dz-plan-n { margin-top: 2px; line-height: 1.4 }
.dz-plan-l { margin-top: 3px }
.dz-head .dz-sum { margin: 10px 0 12px }
.dz-mapwrap .dz-map { max-width: 480px; margin: 0 auto } /* kwadrat: kontur liczony dla kwadratowego obrazu */
@media (max-width: 560px) { .dz-row { grid-template-columns: 40% 1fr auto; gap: 0 8px; font-size: 13.5px } .dz .panel { padding: 14px } }
.dz-srcs li { padding: 3px 0; font-size: 13px; gap: 4px 8px }
.dz-srcs li .muted { font-size: 12px }
.dz-head .dz-btns .btn { flex: 1 1 0; padding: 8px 10px; font-size: 13.5px }
.dz-miss .dz-v { font-weight: 400 }
.dz-st.miss { margin-right: 0 }
/* gesty na mapie nie przewijają strony (przewijanie strony palcem poza mapą) */
.dz-leaf, .dz-leaf .leaflet-container, .dz-leaf * { touch-action: none !important; overscroll-behavior: contain }
.dz-leaf { height: min(55vh, 520px) }
.dz-pst { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); margin-left: 6px; white-space: nowrap }
.dz-pst.on { background: var(--accent-soft); color: var(--accent); font-weight: 600 }
.dz-zone { margin-top: 3px; padding: 6px 9px; background: var(--brass-soft); border-radius: 8px; font-size: 14px }
.dz-prev summary { cursor: pointer; color: var(--muted); margin-top: 6px }
.dz-pt + .dz-pt { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line) }
.dz-zt { margin-top: 6px }
.dz-zt-h { display: flex; gap: 6px; align-items: baseline; font-size: 14px }
.dz-zt-h .dz-m { margin-left: auto }
.dz-quote { white-space: pre-wrap; font: 13px/1.5 var(--sans); background: var(--surface-2); border-left: 3px solid var(--brass); border-radius: 6px; padding: 8px 10px; margin: 6px 0; max-height: 420px; overflow: auto }
.dz-syms { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px }
.dz-syms .pill { cursor: pointer; font: inherit; font-size: 12.5px; color: var(--ink); padding: 3px 9px }
.dz-syms .pill.on { background: var(--accent); color: var(--on-accent) }
.dz-paid { margin-top: 8px; font-size: 13.5px; padding: 8px 12px }
.dz-params { margin-top: 10px }
.dz-up { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center }
.dz-up .dz-paid { margin-top: 0; cursor: pointer }
.dz-up p:empty { display: none }
.dz-wnb .btn { flex: 1 1 160px; font-size: 13.5px; padding: 8px 10px }
.dz-wnb .btn.on { background: var(--accent-soft); border-color: var(--accent) }
.dz-wn { min-height: 320px; font: 13px/1.5 var(--sans); margin: 10px 0 8px; white-space: pre-wrap }
.dz-uh { display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline }
.dz-del { margin-left: auto; font: inherit; font-size: 12px; color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; cursor: pointer }
.dz-del.sure { color: var(--err); border-color: var(--err) }
.dz-lv-w { background: var(--brass-soft); color: var(--brass) }
.dz-lv-i { background: var(--surface-2); color: var(--muted) }
.dz-lv-ok { background: var(--accent-soft); color: var(--ok) }
.dz-v-n { font-weight: 400 }
.dz-h2 { margin-top: 16px }
.dz-rings { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px }
.dz-buds { list-style: none; padding: 0; margin: 4px 0 0 }
.dz-bud { display: grid; grid-template-columns: 72px 1fr; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13.5px }
.dz-bud:first-child { border-top: 0 }
.dz-bud.on { background: var(--warn-soft); border-radius: 6px; padding-inline: 6px }
.dz-bd { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px }
#dzOk .dz-row { grid-template-columns: 92px 1fr auto }
.dz-bud { grid-template-columns: 52px 1fr; gap: 6px; padding: 5px 0; font-size: 13px; line-height: 1.35 }
.dz-bn { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 500 }
.dz-bm { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.dz-rings .pill { font-size: 12px; padding: 3px 8px }
/* raport publiczny (tylko do odczytu) i wydruk karty działki */
body.ro .top nav, body.ro .dz-up, body.ro .dz-paid, body.ro .dz-del, body.ro .dz-syms, body.ro #dzWn, body.ro #dzChat, body.ro #dzFbForm, body.ro .dz-jump { display: none !important }
@media print {
  body:has(.dz) { background: #fff; font-size: 12px }
  .dz { max-width: none; padding: 0 }
  .dz ~ *, .top, #dzSearch, .dz .dz-btns, .dz-paid, .dz-up, .dz-del, .dz-i, .dz-maptools label, .dz-years, #dzWn, #dzShareOut, details.dz-prev:not([open]), .dz-tbar, .dz-jump, #dzFbForm, .dz-chatf, #dzChatSug, .dz-chattools, .dz-noimg, .dz-syms { display: none !important }
  .dz-chatlog { max-height: none !important; overflow: visible !important }
  .dz-planimg { max-width: 85mm }
  .dz .panel { box-shadow: none; border: 1px solid #ccc; padding: 10px 12px; break-inside: auto }
  .dz-row, .dz-plan, .dz-bud { break-inside: avoid }
  .dz-quote { max-height: none; overflow: visible }
  .dz-map { max-width: 85mm }
  .dz a { color: inherit; text-decoration: underline }
}

/* v1.17: logowanie kodem, rysunek planu, asystent AI, moje działki */
.dz-tbar { background: var(--accent-soft); border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; margin: 0 0 12px }
.dz-login, .dz-terms { max-width: 560px }
.dz-terms ol { padding-left: 20px; margin: 8px 0 12px; display: grid; gap: 6px }
.dz-planimg { background: #fff; max-width: 420px; margin: 8px 0; border: 1px solid var(--line) }
.dz-planimg img { object-fit: contain }
.dz-planimg polygon, .dz-map .dz-planover:not([hidden]) ~ svg polygon { stroke: #e0312b }
.dz-planimg polygon { fill: rgba(224, 49, 43, .06); stroke-width: 3 }
.dz-planimg.noimg::after { content: "Rysunek planu niedostępny w usłudze"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px }
.dz-planover { opacity: .75; mix-blend-mode: multiply }
.dz-draw .dz-zone { margin-top: 6px }
.dz-syms .pill.hint { border-color: #e0312b; box-shadow: 0 0 0 2px rgba(224, 49, 43, .18) }
.dz-jump { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px }
.dz-jump a { color: var(--accent); text-decoration: none; border-bottom: 1px dashed currentColor }
.dz-chatlog { display: grid; gap: 8px; max-height: 480px; overflow: auto; margin: 10px 0 }
.dz-msg { border-radius: 12px; padding: 8px 12px; font-size: 14px; line-height: 1.5; max-width: 92% }
.dz-msg p { margin: 0 0 6px } .dz-msg p:last-child { margin: 0 }
.dz-msg ul { margin: 4px 0 6px; padding-left: 18px }
.dz-msg.q { justify-self: end; background: var(--accent); color: var(--on-accent); white-space: pre-wrap }
.dz-msg.a { justify-self: start; background: var(--surface-2); border: 1px solid var(--line) }
.dz-msg.a.err { border-color: var(--err); background: var(--err-soft) }
.dz-chatf { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px }
.dz-chatf textarea, .dz-fbt { flex: 1; width: 100%; resize: vertical; font: 14px/1.4 var(--sans); padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink) }
.dz-chattools { margin-top: 4px; gap: 14px }
.dz-sh { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px }
.dz-sh .btn { text-decoration: none }
@media (max-width: 560px) { .dz-chatf { flex-direction: column; align-items: stretch } .dz-chatf textarea { flex: none } .dz-msg { max-width: 100% } }
.dz-cta { background: var(--accent-soft); border-color: var(--accent) }
.dz-cta .btn { text-decoration: none }
/* v1.19: najważniejsze w skrócie, co można zbudować */
.dz-sum2 { list-style: none; margin: 6px 0 4px; padding: 0; display: grid; gap: 2px }
.dz-sl { display: grid; grid-template-columns: 12px 130px 1fr; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.45 }
.dz-sl:last-child { border-bottom: 0 }
.dz-sd { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); transform: translateY(1px) }
.dz-sl.ok .dz-sd { background: var(--ok) }
.dz-sl.warn .dz-sd { background: #d39a2b }
.dz-sl.bad .dz-sd { background: var(--err) }
.dz-sk { color: var(--muted); font-size: 13px }
.dz-sl a { color: var(--accent) }
.dz-build { margin-top: 10px }
@media (max-width: 560px) { .dz-sl { grid-template-columns: 12px 1fr } .dz-sk { grid-column: 2 } .dz-st2 { grid-column: 2 } }
.dz-sl .dz-st2, .dz-sl .dz-sk { color: var(--ink) } .dz-sl .dz-sk { color: var(--muted) }
