/* ══ MOTYW ══════════════════════════════════════════════════════════════════
   Pod klienta zmienia się tylko: --brand, --accent, krój nagłówków i zaokrąglenia
   (data/partner.json → "theme" albo podgląd ?kolor=…&akcent=…). Reszta odcieni liczy się sama. */
:root {
  --brand: #2E5E3A;            /* kolor główny: przyciski, linki, aktywne elementy */
  --brand-contrast: #FFFFFF;   /* tekst na kolorze głównym */
  --accent: #D9A21B;           /* wyróżnienie: bieżący krok, znaczniki, obrys działki */
  --accent-contrast: #17181A;
  --radius: 14px;              /* karty */
  --radius-btn: 999px;         /* przyciski i chipy */
  --font-heading: var(--font-sans);
  --heading-weight: 650;
  --heading-tracking: -0.025em;
  --heading-em: normal;        /* kursywa wyróżnień w nagłówkach (motyw szeryfowy: italic) */

  /* neutralne – wspólne dla wszystkich motywów */
  --bg: #F6F6F3;
  --surface: #FFFFFF;
  --surface-2: #F1F1EE;
  --surface-3: #E7E7E2;
  --text: #17181A;
  --text-2: #5A5E64;
  --text-3: #8C9096;
  --line: #E3E3DE;
  --line-strong: #C9C9C3;
  --shadow: 0 1px 2px rgba(16,20,24,.04), 0 2px 8px rgba(16,20,24,.05);
  --shadow-lg: 0 10px 30px rgba(16,20,24,.08);

  /* pochodne koloru głównego i wyróżnienia */
  --brand-soft: color-mix(in oklab, var(--brand) 8%, white);
  --brand-soft-2: color-mix(in oklab, var(--brand) 15%, white);
  --brand-strong: color-mix(in oklab, var(--brand) 80%, black);
  --accent-soft: color-mix(in oklab, var(--accent) 18%, white);
  --accent-strong: color-mix(in oklab, var(--accent) 78%, black);
  --focus: color-mix(in oklab, var(--brand) 55%, #2563EB);

  /* stany */
  --warn: #9A4A12; --warn-bg: #FCEFE3;
  --err: #B42318; --err-bg: #FDECEA;

  /* zgodność ze starszymi nazwami */
  --stubble: var(--bg); --paper: var(--surface); --ink: var(--text); --ink-2: var(--text-2);
  --field: var(--brand); --field-2: color-mix(in oklab, var(--brand) 60%, white);
  --rape: var(--accent); --rape-dark: var(--accent-strong); --soil: #8A5D34;
  --radius-s: calc(var(--radius) * .6); --radius-l: var(--radius);

  /* skala klas bonitacyjnych – kolory dziedzinowe, niezależne od motywu */
  --c-I: #4A2F1B; --c-II: #5E3D24; --c-IIIa: #7B5130; --c-IIIb: #95663B; --c-IVa: #B0844C;
  --c-IVb: #C69E61; --c-V: #D9BC83; --c-VI: #E8D5A7; --c-VIz: #F1E6C6;
  --g-I: #245233; --g-II: #2F6040; --g-III: #457A4C; --g-IV: #6A9A5E; --g-V: #96BB7E; --g-VI: #C1D7A8;
  --c-other: #9AAAB4;

  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, "Roboto", "Noto Sans", sans-serif;
  --font-serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --font: var(--font-sans);
  --font-display: var(--font-sans);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16.5px/1.6 var(--font); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; letter-spacing: -0.012em; font-family: var(--font-sans); }
h1, h2 { font-family: var(--font-heading); font-weight: var(--heading-weight); letter-spacing: var(--heading-tracking); }
h1 em, h2 em { font-style: var(--heading-em); color: var(--brand); }
h1 { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.3rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); }
h3 { font-size: 1.06rem; font-weight: 600; }
p { margin: 0 0 .8em; }
.lead { color: var(--ink-2); max-width: 62ch; }
a { color: var(--brand); text-underline-offset: 2px; }
code { font-size: .88em; font-family: var(--font-mono); background: var(--surface-2); padding: .05em .35em; border-radius: 4px; white-space: nowrap; }
.num, td.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* nagłówek */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in oklab, var(--surface) 88%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); color: var(--text); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; gap: 12px 22px; padding: 10px 0; flex-wrap: wrap; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; flex: none; border-radius: 8px; }
.brand-word { font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: 1.28rem; letter-spacing: var(--heading-tracking); line-height: 1; }
.tagline { margin: 0; color: var(--text-2); font-size: .92rem; }
.partner-lockup { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.partner-lockup > span { color: var(--text-3); font-size: .8rem; white-space: nowrap; }
.partner-plate { display: inline-flex; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; line-height: 0; }
.partner-plate img { height: 26px; width: auto; display: block; }
@media (max-width: 640px) {
  .tagline { display: none; }
  .top-inner { gap: 10px 14px; }
  .top .partner-lockup { order: 3; flex-basis: 100%; margin-left: 0; padding-left: 0; border-left: 0; }
  .partner-lockup > span { font-size: .8rem; }
  .partner-plate img { height: 24px; }
}
.partner-hero .partner-plate { border: 1px solid var(--line); padding: 8px 14px; }
.partner-hero .partner-plate img { height: 44px; }
.demo-tag { display: inline-block; font-size: .78rem; font-weight: 600; color: var(--warn); background: var(--warn-bg); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }

/* kroki */
.steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 22px 0 14px; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; color: var(--ink-2); background: transparent; font-weight: 600; font-size: .95rem; }
.steps li span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); font-size: .85rem; }
.steps li.is-current { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.steps li.is-current span { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.steps li.is-done span { background: var(--brand); border-color: var(--brand); color: var(--brand-contrast); }

.panel { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--radius-l); padding: clamp(18px, 3vw, 32px); margin-bottom: 28px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }

/* formularze */
.lbl { display: block; font-weight: 600; margin: 14px 0 6px; }
.hint { font-weight: 400; color: var(--ink-2); }
textarea, input[type=number], input[type=email], input[type=tel], select {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-s); padding: 10px 12px; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 7.5em; font-variant-numeric: tabular-nums; }
textarea:focus, input:focus, select:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 4px color-mix(in oklab, var(--focus) 18%, transparent); }
.formats { margin-top: 8px; color: var(--ink-2); font-size: .95rem; }
.formats summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.formats ul { padding-left: 1.1em; margin: 6px 0 0; }
.formats li { margin-bottom: 4px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.actions.end { justify-content: flex-end; }
.btn { font: inherit; font-weight: 600; letter-spacing: -0.005em; border-radius: var(--radius-btn); padding: 11px 20px; cursor: pointer; border: 1px solid transparent; min-height: 46px; transition: background-color .15s, border-color .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-contrast); border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn-primary[disabled] { opacity: .55; cursor: progress; }
.btn-quiet { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-quiet:hover { background: var(--surface-2); }
.btn-x { border: 0; background: transparent; font-size: 1.6rem; line-height: 1; color: var(--text-2); cursor: pointer; padding: 2px 8px; border-radius: 8px; }
.btn-x:hover { background: var(--surface-2); color: var(--err); }
.form-msg { min-height: 1.4em; margin-top: 10px; color: var(--ink-2); }
.form-msg.is-error { color: var(--err); font-weight: 600; }

/* mapa */
.map-card { margin: 0; }
.map { position: relative; width: 100%; aspect-ratio: 4 / 3; background: var(--surface-2); border-radius: var(--radius-l); overflow: hidden; border: 1px solid var(--line); }
.map svg { width: 100%; height: 100%; display: block; }
.map figcaption, .map-card figcaption { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 8px; font-size: .9rem; color: var(--ink-2); }
.toggle { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.map-note { margin-left: auto; }
.map .classmap { opacity: .82; }
.map .parcel-shape { fill: color-mix(in oklab, var(--accent) 12%, transparent); stroke: var(--rape); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.map .parcel-shape.is-active { fill: color-mix(in oklab, var(--accent) 24%, transparent); stroke-width: 4; }
.map .parcel-label { font: 700 13px var(--font); fill: #fff; paint-order: stroke; stroke: rgba(30,40,20,.85); stroke-width: 3px; }

/* lista działek */
.parcels { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; margin-top: 22px; }
.parcel { border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); box-shadow: var(--shadow); padding: 14px 16px 16px; }
.parcel-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.parcel-title { margin: 0; }
.parcel-meta { color: var(--ink-2); font-size: .92rem; margin: 2px 0 10px; }
.soil { display: flex; height: 22px; border-radius: 4px; overflow: hidden; background: repeating-linear-gradient(135deg, var(--surface-3) 0 6px, var(--surface-2) 6px 12px); }
.soil span { height: 100%; transition: flex-grow .5s ease; }
.parcel-body { margin-top: 10px; font-size: .95rem; }
.thumb { display: block; width: 100%; max-height: 260px; margin: 4px 0 10px; background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--surface) 6px 12px); border-radius: var(--radius-s); }
.thumb-labels text { font-family: var(--font); font-weight: 700; fill: var(--text); paint-order: stroke; stroke: rgba(255,255,255,.85); }
.frag-table { width: 100%; border-collapse: collapse; }
.frag-table td { padding: 4px 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.frag-table tr:last-child td { border-bottom: 0; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.status { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.progress { flex: 1; height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .3s ease; }
.badge { display: inline-block; font-size: .8rem; font-weight: 650; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.badge.ok { background: var(--brand-soft-2); color: var(--brand-strong); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.note { font-size: .88rem; color: var(--ink-2); margin: 8px 0 0; }
.note.warn { color: var(--warn); }
.alt { border-left: 4px solid var(--warn); background: var(--warn-bg); padding: 10px 12px; border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.alt.err { border-color: var(--err); background: var(--err-bg); }
.alt select { margin: 8px 0; }
.shares { display: grid; grid-template-columns: auto 90px auto; gap: 6px 8px; align-items: center; margin-top: 8px; }
.shares input, .manual select { padding: 6px 8px; }
.manual { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.manual select { width: auto; }
.totals { margin-top: 18px; padding: 12px 16px; border-radius: var(--radius-s); background: var(--surface-2); display: flex; gap: 24px; flex-wrap: wrap; }
.totals b { font-variant-numeric: tabular-nums; }

/* pytania */
.qs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; margin-top: 10px; }
@media (max-width: 760px) { .qs { grid-template-columns: 1fr; } }
.qs .actions { grid-column: 1 / -1; }
.qs .form-msg { grid-column: 1 / -1; }
.q { border: 1px solid var(--line); border-radius: var(--radius-l); padding: 14px 16px; margin: 0; background: var(--surface); }
.q legend { font-weight: 600; padding: 0 4px; }
.q-hint { color: var(--ink-2); font-size: .9rem; margin: 2px 0 8px; }
.choices { display: flex; gap: 8px; flex-wrap: wrap; }
.choices label { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-btn); padding: 8px 14px; cursor: pointer; background: var(--surface); transition: border-color .15s, background-color .15s; }
.choices label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.choices input { accent-color: var(--brand); width: 18px; height: 18px; }
.inline { display: flex; align-items: center; gap: 8px; max-width: 220px; }

/* wyniki */
.result-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.compare { overflow-x: auto; margin: 10px 0 24px; }
.compare table { border-collapse: collapse; width: 100%; min-width: 560px; }
.compare th, .compare td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare thead th { font-size: .95rem; }
.compare tbody th { font-weight: 600; color: var(--ink-2); width: 26%; }
.compare .big { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.compare .best { background: var(--brand-soft); }
.variants { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.variant { border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.variant > header { grid-column: 1 / -1; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1.6fr) auto; gap: 4px 24px; align-items: end; }
.variant > header h3, .variant > header .vsum { grid-column: 1; }
.variant > header .vtotals { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 10px; }
.variant > section:nth-of-type(odd) { border-right: 1px solid var(--line); }
@media (max-width: 860px) {
  .variant { grid-template-columns: minmax(0, 1fr); }
  .variant > header { grid-template-columns: minmax(0, 1fr); }
  .variant > header .vtotals { grid-column: 1; grid-row: auto; margin-top: 8px; flex-wrap: wrap; }
  .variant > section:nth-of-type(odd) { border-right: 0; }
}
.variant .vid { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: var(--text); color: var(--surface); font-weight: 600; font-size: .9rem; margin-right: 10px; }
.variant h3 { display: flex; align-items: center; font-size: 1.12rem; }
.variant .vsum { color: var(--ink-2); font-size: .95rem; margin: 6px 0 0; }
.variant .vtotal { display: flex; flex-direction: column; padding: 8px 14px; border-radius: var(--radius-s); background: var(--surface-2); min-width: 150px; }
.variant .vtotal span { font-size: .82rem; color: var(--ink-2); }
.variant .vtotal strong { font-size: 1.6rem; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.variant .vprofit { background: var(--brand-soft); box-shadow: inset 0 0 0 1.5px var(--brand); }
.variant .vprofit strong { color: var(--brand); }
.compare tr.profit-row th, .compare tr.profit-row td { background: var(--brand-soft); }
.compare tr.profit-row td.best { background: var(--brand-soft-2); }
.variant section { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.variant section:last-child { border-bottom: 0; }
.variant h4 { margin: 0 0 8px; font-size: .98rem; }
.crop-bar { display: flex; height: 14px; border-radius: 3px; overflow: hidden; margin-bottom: 10px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { font-weight: 600; color: var(--ink-2); }
.tbl tr.not-met td { color: var(--text-3); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.tbl tr.optional td { color: var(--ink-2); font-style: italic; }
.tbl tfoot td { font-weight: 700; border-top: 2px solid var(--text); border-bottom: 0; }
.sub { color: var(--ink-2); font-size: .82rem; display: block; }
.urgent { color: var(--warn); font-weight: 600; }
.check { list-style: none; padding: 0; margin: 0; font-size: .92rem; }
.check li { padding-left: 1.4em; position: relative; margin-bottom: 5px; }
.check li::before { content: ""; position: absolute; left: 0; top: .45em; width: .7em; height: .7em; border: 2px solid var(--brand); border-radius: 3px; }
.pc { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: .9rem; }
.pc ul { margin: 0; padding-left: 1.1em; }
details.alloc summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: .92rem; }
.notes { margin-top: 22px; font-size: .95rem; }
.notes .alt { margin-bottom: 8px; }
.foot { color: var(--ink-2); font-size: .88rem; padding: 10px 0 40px; }
.foot p { max-width: 90ch; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .pc { grid-template-columns: 1fr; }
  .map-note { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print {
  .top, .steps, #step1, #step2, .no-print, .foot, .site-foot, #step3 .actions, #step3 .btn, #ownPrices, details > summary { display: none !important; }
  body { background: #fff; font-size: 11px; color: #000; }
  .panel { border: 0; padding: 0; box-shadow: none; }
  .print-only { display: block !important; font-size: 10px; color: #333; border-bottom: 1px solid #999; padding-bottom: 6px; }
  .variants { grid-template-columns: 1fr; }
  .variant { break-before: page; break-inside: auto; }
  .variant section, .tbl tr { break-inside: avoid; }
  .compare { break-after: page; }
  a { color: #000; text-decoration: none; }
}
.print-only { display: none; }
.file-btn { cursor: pointer; }

/* przedplon, opłacalność, tabela do wniosku */
.q-wide { grid-column: 1 / -1; }
.prev-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 16px; }
.prev-list label { display: grid; gap: 4px; font-size: .95rem; }
.prev-list select { width: 100%; }
.econ td.num { white-space: nowrap; }
.econ tr.result td { font-weight: 700; border-top: 2px solid var(--text); }
.econ tr.minus td.num { color: var(--warn); }
.decl td:first-child { font-weight: 700; width: 2.5em; }
.decl .pays { font-size: .85rem; color: var(--text-2); }
.badge.onw { background: #e9eef8; color: #22406f; }
.badge.natura { background: #fff1d6; color: #7a4b00; }

details.decl-wrap summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: .92rem; }

[hidden] { display: none !important; }

.own { margin: 14px 0 6px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); padding: 10px 16px; }
.own summary { cursor: pointer; font-weight: 600; color: var(--brand); }
.tbl-scroll { overflow-x: auto; max-width: 100%; }
.tune-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 12px 20px; margin: 10px 0 4px; }
.tune-crop { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px 6px; background: var(--surface); }
.tune-crop h5 { margin: 0 0 6px; font-size: .98rem; font-weight: 600; }
.tune { margin: 4px 0 10px; }
.tune-head { display: flex; align-items: baseline; gap: 8px; }
.tune-lbl { font-size: .85rem; color: var(--ink-2); min-width: 2.8em; }
.tune output { font-weight: 600; font-variant-numeric: tabular-nums; }
.tune.is-own output { color: var(--warn); }
.tune-reset { margin-left: auto; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; font: inherit; font-size: .8rem; padding: 1px 9px; color: var(--ink-2); cursor: pointer; }
.tune-reset:hover { color: var(--ink); border-color: var(--ink-2); }
.tune-track { position: relative; height: 30px; }
.tune-track input[type=range] { position: relative; z-index: 1; width: 100%; height: 30px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.tune-track input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--line); }
.tune-track input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line); }
.tune-track input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--brand); }
.tune-track input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--brand); }
.tune.is-own input[type=range]::-webkit-slider-thumb { background: var(--warn); box-shadow: 0 0 0 1px var(--warn); }
.tune.is-own input[type=range]::-moz-range-thumb { background: var(--warn); box-shadow: 0 0 0 1px var(--warn); }
.tune-track input[type=range]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.tune-mark { position: absolute; top: 6px; width: 2px; height: 18px; background: var(--ink-2); left: calc(11px + (100% - 22px) * var(--p)); transform: translateX(-1px); pointer-events: none; z-index: 2; }
.tune-foot { display: flex; justify-content: space-between; gap: 8px; font-size: .78rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tune-def { text-align: center; flex: 1; }
.scen td { font-size: .9rem; }
.sub.eco { color: var(--brand); }

/* partner sezonu */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.brand + .partner-lockup { margin-left: 2px; padding-left: 18px; border-left: 1px solid var(--line); }
.partner-box { margin: 22px 0; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-top: 4px solid var(--accent); border-radius: var(--radius-l); padding: clamp(18px, 3vw, 28px); }
.pb-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.pb-head .partner-plate { border: 1px solid var(--line); }
.pb-head h2 { margin: 0; font-size: clamp(1.25rem, 1.05rem + .8vw, 1.6rem); }
.pb-kicker { margin: 0 0 2px; color: var(--ink-2); font-size: .92rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pb-lead { color: var(--ink-2); max-width: 70ch; }
.pb-consents { border: 0; padding: 0; margin: 10px 0 4px; display: grid; gap: 10px; }
.pb-consent { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); cursor: pointer; transition: border-color .15s, background-color .15s; }
.pb-consent:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.pb-consent input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--brand); }
.pb-consent span { color: var(--ink-2); font-size: .95rem; }
.pb-consent b { display: block; color: var(--ink); font-size: 1.02rem; margin-bottom: 2px; }
.pb-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 0 18px; }
.pb-fields input, .pb-fields select { width: 100%; }
.pb-preview { margin: 14px 0 6px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-s); font-size: .95rem; }
.pb-preview p { margin: 0 0 4px; }
.pb-preview ul { margin: 0 0 8px; padding-left: 1.2em; color: var(--ink-2); }
.pb-never { color: var(--brand); }
.pb-legal { font-size: .85rem; color: var(--ink-2); max-width: 80ch; }
.pb-done { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.pb-done h2 { margin: 0 0 4px; font-size: 1.35rem; }
.pb-done p { margin: 0; color: var(--ink-2); }
.foot-partner { color: var(--ink-2); font-size: .88rem; }

.variant .vprofit.neg { background: var(--err-bg); box-shadow: inset 0 0 0 1.5px var(--err); }
.variant .vprofit.neg strong { color: var(--err); }
/* wykluczanie upraw w wynikach */
.crop-chips { margin: 4px 0 16px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); }
.crop-chips p { margin: 0 0 8px; color: var(--ink-2); }
.crop-chips b { color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-weight: 600; font-size: .95rem; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px; border-radius: var(--radius-btn); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); cursor: pointer; }
.chip span { font-weight: 400; color: var(--ink-2); font-size: .85rem; }
.chip i { font-style: normal; font-size: 1.1rem; color: var(--err); }
.chip:hover { border-color: var(--err); }
.chip-off { background: var(--surface-2); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.35); }
.chip-off i { color: var(--brand); }
.chip-off:hover { border-color: var(--brand); }
.chips-off { margin: 10px 0 0 !important; }

/* ekran przed wynikami */
.gate { margin: 8px 0 24px; display: grid; gap: 16px; }
.gate-ready { padding: 20px 22px; background: var(--text); color: var(--bg); border-radius: var(--radius-l); }
.gate-ready h2 { margin: 0 0 6px; color: var(--bg); }
.gate-ready p { margin: 0; color: color-mix(in oklab, var(--bg) 78%, transparent); max-width: 80ch; }
.gate-ready b { color: var(--accent); }
.gate-partner { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-top: 4px solid var(--accent); border-radius: var(--radius-l); padding: clamp(18px, 3vw, 28px); }
.gate .pb-skip { border-color: var(--line-strong); }
.pb-fields .lbl input, .pb-fields .lbl select { display: block; margin-top: 6px; font-weight: 400; }
#step3:has(#gate:not([hidden])) .result-head .actions { display: none; }
.variant section { overflow-x: auto; }
@media (max-width: 480px) { .panel { padding: 16px 12px; } .variant section { padding: 12px; } .tbl { font-size: .86rem; } }
.check-inline { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; color: var(--ink-2); font-size: .95rem; cursor: pointer; }
.check-inline input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }

/* Nagłówek na telefonie: lockup partnera w drugim wierszu bez kreski, węższa marka i przycisk */
@media (max-width: 640px) { .top .brand + .partner-lockup { margin-left: 0; padding-left: 0; border-left: 0; } }
@media (max-width: 430px) {
  .brand { gap: 8px; }
  .brand-word { font-size: 1.15rem; }
  .brand-mark { width: 28px; height: 28px; }
  .site-nav { min-width: 0; }
  .site-nav .btn { padding: 8px 12px; font-size: .9rem; white-space: nowrap; }
}


/* ── elementy wspólne neutralnego stylu ── */
.eyebrow { font: 500 .72rem/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--brand); margin: 0 0 12px; display: inline-flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.btn-x { border-radius: 8px; }
::selection { background: var(--accent-soft); }

/* ── mapa pól w wariancie ── */
.variant > .vmap-sec { grid-column: 1 / -1; padding: 14px 18px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.vmap-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.vmap-head h4 { margin: 0; }
.vmap-btns { display: flex; gap: 6px; }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: .9rem; }
.vmap-btns .vmap-edit[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.vmap-grid { position: relative; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.vmap-grid.is-multi { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.vmap-grid.is-multi .vmap { height: clamp(220px, 28vw, 340px); }
.vmap-grid[data-panes="2"].is-multi { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.vmap-grid.is-multi .vmap-wait { position: static; }
.vmap-cap { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 999px; background: color-mix(in oklab, var(--surface) 88%, transparent); font-size: .78rem; color: var(--text-2); pointer-events: none; max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vmap { position: relative; width: 100%; height: clamp(280px, 56vw, 540px); border-radius: var(--radius-s, 10px); overflow: hidden; background: repeating-linear-gradient(45deg, var(--surface-2) 0 6px, var(--bg) 6px 12px); border: 1px solid var(--line); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.vmap canvas, .vmap svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.vmap-grid.is-pointer .vmap { cursor: pointer; }
.vmap-grid.is-editing .vmap { outline: 2px solid var(--accent); outline-offset: -2px; cursor: crosshair; }
.vmap-svg .vmap-parcel { stroke: #1F261D; stroke-width: 1.6px; stroke-linejoin: round; fill-opacity: 1; transition: fill-opacity .12s; }
.vmap-svg .vmap-parcel:not(.is-flat) { fill: none; pointer-events: none; }
.vmap-svg .vmap-parcel.is-dim { fill-opacity: .3; }
.vmap-svg text { font-family: var(--font); font-weight: 700; fill: #fff; paint-order: stroke; stroke: rgba(25,32,22,.85); pointer-events: none; }
.vmap-svg .vmap-flabel { stroke: rgba(25,32,22,.78); stroke-linejoin: round; }
.vmap-svg .vmap-flabel .l2 { font-weight: 500; }
.vmap-hint { margin: -4px 0 10px; font-size: .86rem; color: var(--text-2); }
.vmap-wait { min-height: 200px; display: grid; place-items: center; margin: 0; color: var(--text-2); font-size: .9rem; }
.vmap-tip { position: absolute; left: 0; top: 0; z-index: 2; max-width: min(300px, 80%); padding: 9px 11px; border-radius: 10px; background: color-mix(in oklab, var(--surface) 94%, transparent); backdrop-filter: blur(6px); box-shadow: var(--shadow-lg); border: 1px solid var(--line); font-size: .86rem; line-height: 1.35; pointer-events: none; display: flex; flex-direction: column; gap: 2px; }
.vmap-tip[hidden] { display: none; }
.vmap-tip .t-crop { display: flex; align-items: center; font-size: .95rem; }
.vmap-tip .t-sub { color: var(--text-2); }
.vmap-tip .t-eco { color: var(--brand); }
.vmap-tip .t-warn { color: var(--err, #B42318); }
.vmap-tip .t-hint { color: var(--text-3); font-size: .78rem; margin-top: 2px; }
.vmap-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0; margin: 10px 0 0; font-size: .88rem; color: var(--text-2); }
.vmap-legend li { display: inline-flex; align-items: center; padding: 2px 6px; border-radius: 6px; cursor: default; transition: background .12s; }
.vmap-legend li b { margin-left: 5px; color: var(--text); font-weight: 600; }
.vmap-legend li.is-hl, .vmap-legend li:hover { background: var(--surface-2); }
.alloc tbody tr { transition: background .12s; }
.alloc tbody tr.is-hl, .alloc tbody tr:hover { background: var(--accent-soft); }
.vmap-editbar { margin-top: 10px; padding: 12px 14px; border-radius: var(--radius-s, 10px); background: var(--accent-soft); }
.vmap-editbar .vmap-help { margin: 0 0 6px; font-size: .9rem; }
.vmap-editbar .vmap-sel { margin: 0 0 8px; font-size: .9rem; }
.vmap-editbar .actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.vmap-merge { background: var(--brand); color: var(--brand-contrast); border-color: var(--brand); }
.vmap-merge[disabled], .vmap-split[disabled], .vmap-reset[disabled] { opacity: .5; cursor: not-allowed; }
.vmap-sec:fullscreen { background: var(--surface); padding: 20px; overflow: auto; }
.vmap-sec:fullscreen .vmap-grid:not(.is-multi) .vmap { height: calc(100vh - 170px); }
.vmap-sec:fullscreen .vmap-grid.is-multi .vmap { height: clamp(260px, 40vh, 520px); }
@media (max-width: 480px) { .variant > .vmap-sec { padding: 12px; } .vmap { height: 300px; } }
@media print { .vmap-btns, .vmap-editbar { display: none !important; } }

/* ── krok 1: pola uprawne ── */
.fields-card { margin-top: 22px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); box-shadow: var(--shadow); }
.fields-card h2 { font-size: 1.15rem; margin: 0; }
.fields-lead { margin: 0 0 12px; color: var(--text-2); font-size: .94rem; max-width: 80ch; }
.fields-card:fullscreen { overflow: auto; }
.fields-card:fullscreen .vmap-grid:not(.is-multi) .vmap { height: calc(100vh - 330px); }
.vmap-orto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.vmap-btns .toggle { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--text-2); margin-right: 4px; cursor: pointer; }
.fields-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; font-size: .9rem; }
.fields-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: start; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line); transition: background .12s; }
.fields-list li:hover { background: var(--surface-2); }
.fields-list .swatch { margin: 3px 0 0; }
.fields-list .sub { display: block; color: var(--text-2); font-size: .82rem; }
.fields-list .num { text-align: right; white-space: nowrap; font-weight: 600; }
.fields-list .tag { display: inline-block; padding: 0 6px; border-radius: 999px; background: var(--accent-soft); font-size: .75rem; font-weight: 600; }
.t-warn { color: var(--err, #B42318); }
.parcel .to-fields { margin-top: 10px; }
.vmap-grid.has-orto .vmap-parcel.is-flat { fill-opacity: .55; }
.vmap-grid.has-orto .vmap-svg .vmap-parcel { stroke: #fff; stroke-width: 2px; }
