@font-face { font-family: "Bricolage"; src: url(/assets/fonts/bricolage-latin.woff2) format("woff2"); font-weight: 400 800; font-display: swap; 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: "Bricolage"; src: url(/assets/fonts/bricolage-latin-ext.woff2) format("woff2"); font-weight: 400 800; font-display: swap; 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 {
  --papier: #f4eee2;
  --karta: #fffdf8;
  --klapka: #ebe2cf;
  --tusz: #1a1813;
  --szary: #6b6355;
  --linia: #ddd2bd;
  --zielen: #0d6b4b;
  --zielen-ciemna: #08503a;
  --zielen-jasna: #dcebdf;
  --pieczec: #e0522f;
  --r: 18px;
  --cien: 0 1px 0 rgba(26, 24, 19, .04), 0 12px 32px -12px rgba(26, 24, 19, .18);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--papier); color: var(--tusz);
  font: 400 17px/1.55 "Bricolage", ui-sans-serif, system-ui, sans-serif;
  font-variation-settings: "opsz" 14;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--zielen); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--zielen-ciemna); }
:focus-visible { outline: 3px solid var(--pieczec); outline-offset: 2px; border-radius: 6px; }
h1, h2 { font-weight: 800; letter-spacing: -.025em; line-height: 1.05; font-variation-settings: "opsz" 96; text-wrap: balance; }
h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--karta); padding: 8px 12px; z-index: 10; }
.cicho { color: var(--szary); font-size: 15px; }
main > section, main > article, .top, .stopka { max-width: 1120px; margin-inline: auto; padding-inline: 24px; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 22px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--tusz); text-decoration: none; font-size: 19px; letter-spacing: -.01em; }
.logo svg { width: 34px; height: 34px; }
.logo b { font-weight: 800; color: var(--zielen); }
.top nav { display: flex; gap: 4px; }
.top nav a { color: var(--szary); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: 15px; }
.top nav a:hover { color: var(--tusz); background: rgba(26, 24, 19, .05); }
.top nav a[aria-current] { color: var(--tusz); background: var(--karta); box-shadow: inset 0 0 0 1px var(--linia); }

/* Hero */
.hero { padding-block: 44px 32px; }
.hero-znak { margin: 0 0 18px; color: var(--szary); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.hero-znak a { color: inherit; }
.hero h1 { font-size: clamp(42px, 6.4vw, 80px); margin: 0 0 22px; max-width: 18ch; }
.hero h1 span { display: block; color: var(--zielen); }
.hero--okazja h1 { max-width: 16ch; font-size: clamp(40px, 6.2vw, 76px); }
.hero-lead { font-size: clamp(18px, 2vw, 21px); color: #3c372e; max-width: 58ch; margin: 0; text-wrap: pretty; }

/* Tool */
.narzedzie { padding-block: 12px 72px; }
.okazje { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.okazja { padding: 11px 20px; border-radius: 999px; background: transparent; color: var(--tusz); text-decoration: none; font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--linia); transition: background .15s, box-shadow .15s; }
.okazja:hover { color: var(--tusz); box-shadow: inset 0 0 0 1.5px var(--tusz); }
.okazja--wybrana, .okazja--wybrana:hover { background: var(--tusz); color: var(--papier); box-shadow: none; }
.narzedzie-siatka { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: stretch; }
.filtry { background: var(--karta); border-radius: var(--r); padding: 28px; box-shadow: var(--cien); display: flex; flex-direction: column; gap: 8px; }
.filtry-uwaga { margin: auto 0 0; padding-top: 20px; font-size: 14px; color: var(--szary); text-wrap: pretty; }
.filtry label { font-weight: 600; font-size: 15px; margin-top: 10px; }
.filtry label:first-child { margin-top: 0; }
select, .kwota-pole input {
  font: inherit; color: var(--tusz); background: var(--papier); border: 1.5px solid transparent; border-radius: 12px;
  padding: 13px 14px; width: 100%; transition: border-color .15s, background .15s;
}
select { appearance: none; padding-right: 40px; cursor: pointer;
  background: var(--papier) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%231a1813' stroke-width='1.8'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 16px center; }
select:hover, .kwota-pole input:hover { border-color: var(--linia); }
select:focus, .kwota-pole input:focus { outline: none; border-color: var(--zielen); background-color: var(--karta); }
.blad-pola { border-color: var(--pieczec) !important; }

/* Envelope */
#wynik { display: flex; }
.koperta { flex: 1;
  position: relative; background: var(--karta); border-radius: var(--r); box-shadow: var(--cien);
  padding: 92px 32px 28px; overflow: hidden; transition: opacity .2s;
}
#wynik.laduje .koperta { opacity: .55; }
.koperta-klapka { position: absolute; inset: 0 0 auto; height: 74px; background: var(--klapka); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.koperta-klapka::after { content: "zł"; position: absolute; left: 50%; bottom: -2px; translate: -50% 0; width: 46px; height: 46px; border-radius: 50%; background: var(--pieczec); color: #fff3ec; display: grid; place-items: center; font-weight: 800; font-size: 15px; letter-spacing: -.02em; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .18); }
.koperta-grupa { margin: 0 0 18px; font-size: 14px; color: var(--szary); text-align: center; }
.koperta-etykieta { margin: 0; text-align: center; font-weight: 600; }
.koperta-kwota { margin: 2px 0 6px; text-align: center; font-weight: 800; font-size: clamp(56px, 8vw, 88px); line-height: 1; letter-spacing: -.04em; font-variation-settings: "opsz" 96; color: var(--zielen); font-variant-numeric: tabular-nums; }
.koperta-kwota--media { color: var(--szary); font-size: clamp(40px, 6vw, 60px); }
.koperta-zakres { margin: 0 auto; text-align: center; max-width: 40ch; color: #3c372e; text-wrap: pretty; }
.koperta-stopka { margin: 20px 0 0; text-align: center; font-size: 14px; color: var(--szary); text-wrap: pretty; }
.slupki { list-style: none; margin: 26px 0 0; padding: 0; display: flex; justify-content: center; align-items: flex-end; gap: 6px; height: 110px; border-bottom: 1.5px solid var(--linia); }
.slupki li { flex: 1; max-width: 72px; height: 100%; display: flex; align-items: flex-end; position: relative; }
.slupek { display: block; width: 100%; height: max(var(--h), 3px); background: var(--zielen-jasna); border-radius: 6px 6px 0 0; transition: height .3s, background .15s; }
.slupki li.mediana .slupek { background: var(--zielen); }
.slupki li:hover .slupek { background: #3f8a6c; }
.os { display: flex; justify-content: space-between; margin: 6px 0 0; font-size: 12px; color: var(--szary); font-variant-numeric: tabular-nums; }
.slupek-opis { position: absolute; bottom: calc(100% + 6px); left: 50%; translate: -50% 0; white-space: nowrap; background: var(--tusz); color: var(--papier); font-size: 13px; padding: 4px 8px; border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 2; }
.slupki li:hover .slupek-opis { opacity: 1; }
.licznik { display: flex; justify-content: center; gap: 8px; margin-top: 22px; }
.licznik span { width: 34px; height: 8px; border-radius: 99px; background: var(--klapka); }
.licznik span.pelny { background: var(--zielen); }

/* Add form */
.dopisz { margin-top: 20px; background: var(--tusz); color: var(--papier); border-radius: var(--r); padding: 32px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px 32px; align-items: center; }
.dopisz h2 { font-size: clamp(24px, 2.6vw, 30px); margin: 0 0 8px; }
.dopisz-tekst p { margin: 0; color: #c9c0ad; font-size: 16px; }
.dopisz-pola { display: flex; flex-wrap: wrap; gap: 10px; }
.kwota-pole { position: relative; flex: 1 1 140px; }
.dopisz-pola .przycisk { flex: none; }
.kwota-pole input { background: var(--karta); font-size: 22px; font-weight: 700; padding: 12px 48px 12px 16px; font-variant-numeric: tabular-nums; }
.kwota-zl { position: absolute; right: 16px; top: 50%; translate: 0 -50%; color: var(--szary); font-weight: 700; font-size: 18px; }
.lata { border: 0; margin: 0; padding: 4px; display: flex; gap: 2px; background: rgba(255, 255, 255, .08); border-radius: 12px; }
.lata label { position: relative; }
.lata input { position: absolute; opacity: 0; }
.lata span { display: block; padding: 10px 12px; border-radius: 9px; color: #c9c0ad; cursor: pointer; font-weight: 600; font-variant-numeric: tabular-nums; }
.lata input:checked + span { background: var(--papier); color: var(--tusz); }
.lata input:focus-visible + span { outline: 3px solid var(--pieczec); }
.miodek { position: absolute; left: -9999px; }
.przycisk { font: inherit; font-weight: 700; border: 0; border-radius: 12px; padding: 14px 22px; background: var(--pieczec); color: #fff; cursor: pointer; transition: background .15s, transform .1s; }
.przycisk:hover { background: #c94524; }
.przycisk:active { transform: translateY(1px); }
.przycisk[disabled] { opacity: .6; cursor: progress; }
.filtry .przycisk { background: var(--tusz); margin-top: 14px; }
.dopisz-info { grid-column: 1 / -1; margin: 0; min-height: 0; font-size: 16px; }
.dopisz-info:empty { display: none; }
.dopisz-info.ok { color: #b9e4c9; }
.dopisz-info.zle { color: #ffb6a1; }
.dopisz-info b { color: #fff; }

/* Sections */
.dlaczego, .okazje-karty, .tabela-sekcja { padding-block: 0 72px; }
.trzy { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.trzy > div { border-top: 2px solid var(--tusz); padding-top: 16px; }
.trzy p { margin: 0; color: #3c372e; }
.duza { font-size: 56px !important; font-weight: 800; letter-spacing: -.04em; line-height: 1; margin-bottom: 12px !important; color: var(--tusz) !important; font-variation-settings: "opsz" 96; }
.karty { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.karta { background: var(--karta); border-radius: var(--r); padding: 24px; text-decoration: none; color: var(--tusz); box-shadow: var(--cien); display: grid; gap: 4px; transition: transform .2s, box-shadow .2s; }
.karta:hover { color: var(--tusz); transform: translateY(-3px); box-shadow: 0 1px 0 rgba(26, 24, 19, .04), 0 20px 40px -16px rgba(26, 24, 19, .28); }
.karta-nazwa { font-weight: 800; font-size: 24px; letter-spacing: -.02em; }
.karta-opis { color: var(--szary); font-size: 15px; }
.karta-liczba { margin-top: 18px; font-size: 14px; color: var(--zielen); font-weight: 600; }
.tabela-ramka { background: var(--karta); border-radius: var(--r); box-shadow: var(--cien); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 14px 20px; border-bottom: 1px solid #efe7d7; white-space: nowrap; }
thead th { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--szary); font-weight: 600; }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 600; }
tbody th a { color: var(--tusz); text-decoration: none; }
tbody th a:hover { color: var(--zielen); text-decoration: underline; }
td:nth-child(2) { font-weight: 700; color: var(--zielen); }
tr.zbieramy td { color: var(--szary); font-weight: 400; }
.tabela-sekcja .cicho { margin: 14px 0 0; max-width: 75ch; }
.pusto { margin: 0; padding: 22px 24px; border: 1.5px dashed var(--linia); border-radius: var(--r); color: #3c372e; max-width: 760px; text-wrap: pretty; }
.sekcja-lead { margin: -8px 0 20px; max-width: 68ch; color: #3c372e; text-wrap: pretty; }
.przypisy { display: flex; flex-wrap: wrap; gap: 4px; white-space: normal; }
.przypisy a { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 99px; background: var(--papier); color: var(--szary); font-size: 13px; font-weight: 600; text-decoration: none; }
.przypisy a:hover { background: var(--zielen); color: #fff; }
.tabela-media td:nth-child(2) { white-space: nowrap; }
.zrodla { margin: 20px 0 0; padding-left: 24px; columns: 2; column-gap: 40px; font-size: 14px; color: var(--szary); }
.zrodla li { margin-bottom: 8px; break-inside: avoid; scroll-margin-top: 24px; }
.zrodla li:target { color: var(--tusz); }
.zrodla b { color: var(--tusz); font-weight: 600; }
@media (max-width: 860px) { .zrodla { columns: 1; } }

/* Text pages */
.tekst { max-width: 760px !important; padding-block: 56px 72px; }
.tekst h1 { font-size: clamp(40px, 6vw, 64px); margin: 0 0 20px; }
.tekst h2 { font-size: 24px; margin: 40px 0 10px; }
.tekst p, .tekst li { color: #3c372e; }
.tekst ul { padding-left: 20px; }
.tekst li { margin-bottom: 8px; }

/* Footer */
.stopka { border-top: 1px solid var(--linia); padding-block: 32px 48px; display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; color: var(--szary); font-size: 15px; }
.stopka p { margin: 0; }
.stopka a { color: var(--szary); margin-right: 20px; }
.stopka-haslo { flex-basis: 100%; color: var(--tusz); font-weight: 600; }

@media (max-width: 860px) {
  .narzedzie-siatka, .dopisz { grid-template-columns: 1fr; }
  .trzy { grid-template-columns: 1fr; gap: 28px; }
  .karty { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top nav { display: none; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  main > section, main > article, .top, .stopka { padding-inline: 16px; }
  .hero { padding-block: 24px 24px; }
  .hero-znak { margin-bottom: 12px; }
  .filtry, .dopisz { padding: 20px; }
  .filtry { gap: 6px; }
  .filtry label { margin-top: 6px; font-size: 14px; }
  .filtry-uwaga { display: none; }
  select { padding-block: 11px; }
  .koperta { padding: 84px 20px 24px; }
  .okazje { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .okazja { padding: 10px 15px; flex: none; }
  .karty { grid-template-columns: 1fr; }
  .dopisz-pola .przycisk { flex-basis: 100%; }
  .tabela-relacje th:nth-child(3), .tabela-relacje td:nth-child(3),
  .tabela-media th:nth-child(3), .tabela-media td:nth-child(3) { display: none; }
  th, td { padding: 12px 14px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
