/* Arkusz, wersja pokazowa dla KRM Druk Miller Sp. k. (escale). Wszystkie style w tym pliku (CSP: style-src 'self').
   Kolory marki klienta tylko w :root: --marka (naglowki, belka), --akcent (jedyny kolor elementow interaktywnych),
   --sygnal (znak marki i to, co czeka na decyzje). Czerwony tylko przy bledach, zielony tylko przy rzeczach zalatwionych.
   Kroje: wlasne pliki woff2 w static/ (licencja OFL) przez @font-face, nigdy z Google Fonts ani CDN. */

@font-face { font-family: "Judson"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/judson-400-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Judson"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/judson-400-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Judson"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/judson-700-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Judson"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/judson-700-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/poppins-400-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/poppins-400-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/poppins-600-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/poppins-600-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/poppins-700-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/poppins-700-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;
  --tlo: #f4f3ef;
  --karta: #faf9f6;
  --bialy: #ffffff;
  --atrament: #14213a;
  --tekst2: #3b4660;
  --szary: #596378;
  --linia: #dcdad2;
  --linia2: #ebe9e2;
  --marka: #072b61;
  --marka-ciemna: #051f47;
  --akcent: #0b4aa8;
  --akcent-ciemny: #083a86;
  --akcent-jasny: #e8eef8;
  --akcent-sredni: #a9c0e4;
  --sygnal: #c9a84c;
  --sygnal-tekst: #7a5f14;
  --sygnal-jasny: #f8f1dc;
  --czerwony: #b42318;
  --zielony: #1d7348;
  --zielony-jasny: #e2f1e9;
  --wyswietlacz: "Judson", Georgia, "Times New Roman", serif;
  --tekst: "Poppins", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --ruch: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html, body { overscroll-behavior: none; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--tlo); color: var(--atrament); font: 14.5px/1.55 var(--tekst); font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent; }
a { color: var(--akcent); }
h1, h2, h3 { font-family: var(--wyswietlacz); font-weight: 600; margin: 0; letter-spacing: -0.005em; }
p { margin: 0; }
button, select, input { font: inherit; }
:focus-visible { outline: 2px solid var(--akcent); outline-offset: 2px; }
.belka :focus-visible { outline-color: #fff; }
[hidden] { display: none !important; }

/* ---------- belka ---------- */
.belka { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; padding: 10px 24px 13px;
  background: var(--marka-ciemna); color: #fff; box-shadow: inset 0 -3px 0 var(--sygnal); }
.znak { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-width: 0; }
.znak-kreska { width: 1px; height: 22px; background: rgb(255 255 255 / 0.3); }
.znak-nazwa { font-family: var(--wyswietlacz); font-size: 24px; font-weight: 700; letter-spacing: 0.01em; }
.znak-opis { font-size: 12px; color: #b9c8dc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-nav { display: flex; gap: 4px; margin-left: auto; }
.role-nav a { display: inline-flex; align-items: center; gap: 6px; color: #d3deeb; text-decoration: none; padding: 6px 12px; border-radius: 6px; font-size: 14px;
  white-space: nowrap; transition: background var(--ruch), color var(--ruch); }
@media (hover: hover) { .role-nav a:hover { background: rgb(255 255 255 / 0.1); color: #fff; } }
.role-nav a.aktywny { background: #fff; color: var(--marka-ciemna); font-weight: 600; }
.kropka { font-style: normal; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: var(--sygnal); color: var(--marka-ciemna); display: inline-flex; align-items: center; justify-content: center; }
.belka-prawo { display: flex; align-items: center; gap: 12px; }
.pokaz { font-size: 12px; color: #b9c8dc; border: 1px solid rgb(255 255 255 / 0.22); padding: 3px 9px; border-radius: 99px; white-space: nowrap;
  text-decoration: none; line-height: 18px; transition: border-color var(--ruch); }
@media (hover: hover) { .pokaz:hover { border-color: rgb(255 255 255 / 0.6); } }

/* ---------- przyciski ---------- */
.przycisk { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 8px 14px;
  border: 1px solid var(--akcent); border-radius: 6px; background: var(--akcent); color: #fff; font-weight: 600; font-size: 14px;
  text-decoration: none; cursor: pointer; line-height: 1.2; text-align: center; position: relative; overflow: hidden; isolation: isolate;
  transition: background var(--ruch), border-color var(--ruch), color var(--ruch), transform var(--ruch); }
.przycisk:active:not(:disabled) { transform: scale(0.97) translateY(1px); transition-duration: 90ms; }
/* Polysk przejezdza po glownym przycisku przy najechaniu (0,75 s, lagodnie). */
.przycisk:not(.drugi):not(.cichy)::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 25%, rgb(255 255 255 / 0.26) 50%, transparent 75%); transform: translateX(-130%); }
@media (hover: hover) {
  .przycisk:not(.drugi):not(.cichy):not(:disabled):hover::after { transform: translateX(130%); transition: transform 750ms cubic-bezier(0.37, 0, 0.63, 1); }
  .przycisk:hover { background: var(--akcent-ciemny); border-color: var(--akcent-ciemny); }
  .przycisk.drugi:hover { border-color: var(--akcent); background: var(--akcent-jasny); }
  .przycisk.cichy:hover { border-color: #d3deeb; color: #fff; background: transparent; }
}
.przycisk.drugi { background: var(--bialy); color: var(--akcent); border-color: var(--linia); }
.przycisk.cichy { white-space: nowrap; background: transparent; border-color: rgb(255 255 255 / 0.25); color: #d3deeb; font-weight: 400; min-height: 30px; padding: 4px 10px; font-size: 13px; }
.przycisk:disabled, .przycisk:disabled:hover { cursor: not-allowed; background: #e3e8ee; border-color: #e3e8ee; color: #6b7684; transform: none; }
.przycisk.duzy { min-height: 48px; padding: 12px 20px; font-size: 16px; }
.rzad { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---------- uklad stron ---------- */
main { max-width: 1240px; margin: 0 auto; padding: 32px 24px 80px; }
main > section + section { margin-top: 44px; }
.oko { font-size: 13px; font-weight: 600; color: var(--szary); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.oko::before { content: ""; width: 14px; height: 3px; background: var(--sygnal); flex: none; }
.wstep { font-size: 17px; color: var(--tekst2); max-width: 66ch; margin-top: 14px; }
.sekcja { font-family: var(--tekst); font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--szary); font-weight: 600; margin-bottom: 14px; }
.cichy { color: var(--szary); }
.pusto { color: var(--szary); background: var(--bialy); border: 1px dashed var(--linia); border-radius: 10px; padding: 16px 18px; }
.strona-glowa h1 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; color: var(--marka); max-width: 30ch; }
.h1-pod { font-weight: 400; color: var(--szary); font-size: 0.6em; letter-spacing: 0; }
/* Sekcje zwykle ponizej pierwszego ekranu: przegladarka uklada je dopiero blisko widoku (nowy ekran szybciej na wolnym
   laptopie). Wysokosc zastepcza z poprzedniego rysowania ustawia app.js (containIntrinsicSize). Nie dawaj tego sekcjom,
   ktore sa celami przewodnika ponizej innych sekcji z content-visibility. */
main > .stopka { content-visibility: auto; contain-intrinsic-size: auto 480px; }

/* Zmiana ekranu (View Transitions, app.js render): stary ekran widac do chwili podmiany, potem jedno przenikanie 300 ms.
   Identyczne piksele (belka) stoja w miejscu. Warstwy przewodnika i powiadomienie maja wlasne nazwy i sa zywe. */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 300ms; animation-timing-function: cubic-bezier(0.37, 0, 0.63, 1); }
::view-transition-group(przewodnik), ::view-transition-group(przewodnik-karta), ::view-transition-group(tost) { animation: none; }
::view-transition-old(przewodnik), ::view-transition-old(przewodnik-karta), ::view-transition-old(tost) { display: none; }
::view-transition-new(przewodnik), ::view-transition-new(przewodnik-karta), ::view-transition-new(tost) { animation: none; }
/* Przegladarka bez View Transitions: krotkie przenikanie nowego ekranu od krycia 0,4 (strona nie znika). */
main.widok-wejscie { animation: widok-wejscie 300ms cubic-bezier(0.37, 0, 0.63, 1) both; }
@keyframes widok-wejscie { from { opacity: 0.4; } to { opacity: 1; } }
/* Niewidoczne kopie ekranow do rozgrzewki ukladu tekstu (app.js, rozgrzej). */
.rozgrzewka { position: fixed; left: 0; top: 0; width: 1366px; height: 0; overflow: hidden; visibility: hidden; pointer-events: none; }

/* ---------- start ---------- */
.hero { padding: 36px 0 8px; }
.hero h1 { font-size: clamp(34px, 5.4vw, 66px); line-height: 1.04; max-width: 21ch; font-weight: 700; letter-spacing: -0.02em; color: var(--marka); }
.hero h1 .akcent { color: var(--atrament); display: block; }
.hero .wstep { font-size: 19px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 28px; }
.scenariusz { margin-top: 48px; background: var(--bialy); border: 1px solid var(--linia); border-radius: 14px; padding: 26px 28px; box-shadow: 0 1px 2px rgb(0 0 0 / 0.04); }
.scen-glowa { display: grid; gap: 6px; max-width: 80ch; }
.scen-glowa .sekcja { margin: 0; color: var(--marka); }
.scen-glowa p { color: var(--tekst2); font-size: 16px; }
.scen-sterowanie { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 20px 0 0; }
.scen-wynik { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.scen-wynik li { border-top: 3px solid var(--akcent); padding: 12px 2px 0; display: flex; flex-direction: column; gap: 2px; }
.scen-wynik li.uwaga { border-top-color: var(--sygnal); }
/* Wynik przykladu wchodzi kartami po kolei (jedyny ruch po kliknieciu przykladu). */
.scen-wynik.animuj li { opacity: 0; transform: translateY(8px); animation: wjazd 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.scen-wynik.animuj li:nth-child(2) { animation-delay: 0.12s; }
.scen-wynik.animuj li:nth-child(3) { animation-delay: 0.24s; }
@keyframes wjazd { to { opacity: 1; transform: none; } }
.wyn-co { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--szary); font-weight: 600; }
.scen-wynik b { font-family: var(--wyswietlacz); font-size: 26px; font-weight: 700; color: var(--marka); line-height: 1.15; }
.scen-wynik li.uwaga b { color: var(--sygnal-tekst); }
.scen-wynik span:last-child { font-size: 14px; color: var(--tekst2); }

/* ---------- tabela i znaczki ---------- */
.tabela-box { overflow-x: auto; background: var(--bialy); border: 1px solid var(--linia); border-radius: 10px; }
.tabela { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabela th { text-align: left; font-size: 12px; font-weight: 600; color: var(--szary); text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 14px;
  border-bottom: 1px solid var(--linia); background: var(--karta); white-space: nowrap; }
.tabela td { padding: 11px 14px; border-bottom: 1px solid var(--linia2); vertical-align: middle; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela tr.uwaga td:first-child { box-shadow: inset 4px 0 0 var(--sygnal); }
.tabela .mocny { display: block; font-weight: 600; color: var(--marka); text-decoration: none; font-size: 15px; }
@media (hover: hover) { .tabela .mocny:hover { text-decoration: underline; } }
.tabela .cichy { font-size: 12px; }
.tabela .num { text-align: right; white-space: nowrap; }
.znaczek { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--linia2); color: var(--tekst2); font-weight: 600; white-space: nowrap; }

/* ---------- sprawy ---------- */
.sprawy { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 14px; }
.sprawa { position: relative; background: var(--bialy); border: 1px solid var(--linia); border-radius: 10px; padding: 18px 18px 16px 24px;
  display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.sprawa::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--sygnal); }
.sprawa.brak::before, .sprawa.limit::before { background: var(--czerwony); }
.sprawa-znak { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; color: var(--szary); }
.sprawa h3 { font-size: 19px; line-height: 1.2; color: var(--marka); overflow-wrap: anywhere; }
.sprawa p { color: var(--tekst2); font-size: 14px; flex: 1; }
.sprawa-akcje { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* ---------- projekt ---------- */
.zakladki { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px; }
.zakladki a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; text-decoration: none; color: var(--atrament);
  border: 1px solid var(--linia); background: var(--bialy); font-size: 14px; min-height: 36px; transition: border-color var(--ruch), background var(--ruch); }
@media (hover: hover) { .zakladki a:hover { border-color: var(--akcent); } }
.zakladki a.aktywny { background: var(--marka); color: #fff; border-color: var(--marka); }
/* Etap: ten sam odstep niezaleznie od tego, co stoi nad nim (gdy karta sprawy nad nim sie zwija, przewodnik z gory wie,
   gdzie etap stanie). Kazda zmiana odstepu zalezna od sasiada daje skok na koncu ruchu. */
main > .strona-glowa + * { margin-top: 20px; }
.etapy { margin-top: 20px; background: var(--bialy); border: 1px solid var(--linia); border-radius: 12px; padding: 18px 20px; }
.etapy-lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; position: relative; }
.etapy-wsk { position: absolute; z-index: 0; border-radius: 8px; background: var(--marka); pointer-events: none; }
.etapy-lista li { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--szary); padding: 8px 10px;
  border-radius: 8px; background: var(--karta); min-width: 0; line-height: 1.25; }
.etapy-lista i { font-style: normal; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--linia); display: inline-flex;
  align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--bialy); }
.etapy-lista li.zrobione { color: var(--zielony); }
.etapy-lista li.zrobione i { background: var(--zielony); border-color: var(--zielony); color: #fff; }
.etapy-lista li.teraz { background: transparent; color: #fff; font-weight: 600; }
.etapy-lista li.teraz i { border-color: #fff; color: var(--marka); }
.etap-opis { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.etap-opis p { max-width: 74ch; color: var(--tekst2); }
.etap-opis p b { color: var(--atrament); }
.etap-akcje { display: flex; flex-wrap: wrap; gap: 8px; }
.wynik-liczby { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; background: var(--bialy); border: 1px solid var(--linia); border-radius: 12px; }
.wynik-liczby div { padding: 16px 20px; }
.wynik-liczby div + div { border-left: 1px solid var(--linia2); }
.wynik-liczby dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--szary); font-weight: 600; }
.wynik-liczby dd { margin: 2px 0 0; font-family: var(--wyswietlacz); font-size: 32px; font-weight: 700; color: var(--marka); line-height: 1.1; white-space: nowrap; }

/* ---------- motyw poligraficzny: znaczniki ciecia, kropki CMYK ---------- */
.cmyk { display: inline-flex; gap: 3px; align-items: center; }
.cmyk i { display: block; width: 8px; height: 8px; border-radius: 50%; }
.cmyk .c { background: #1fb5e8; }
.cmyk .m { background: #e5338a; }
.cmyk .y { background: #f2d230; }
.cmyk .k { background: #101820; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.5); }
.hero { position: relative; padding: 44px 0 8px 28px; }
.hero::before, .hero::after { content: ""; position: absolute; width: 18px; height: 18px; border: 0 solid var(--marka); opacity: 0.5; pointer-events: none; }
.hero::before { left: 0; top: 14px; border-left-width: 1.5px; border-top-width: 1.5px; }
.hero::after { left: 0; bottom: -6px; border-left-width: 1.5px; border-bottom-width: 1.5px; }
.hero h1 { font-weight: 700; letter-spacing: -0.01em; }
.strona-glowa h1, .tour-tytul, .scen-wynik b, .wynik-liczby dd { letter-spacing: 0; }
.wynik-liczby dd { font-weight: 700; }
.opis-zam { color: var(--tekst2); font-size: 14px; margin-top: 8px; max-width: 80ch; }
.uwaga-cena { font-size: 12.5px; margin-top: 10px; max-width: 80ch; }
.znaczek.ok { background: var(--zielony-jasny); color: var(--zielony); }
.znaczek.uwaga { background: var(--sygnal-jasny); color: var(--sygnal-tekst); }
.przycisk.maly { min-height: 34px; padding: 4px 10px; font-size: 13px; font-weight: 500; }
.sprawa.dpi::before, .sprawa.wymiar::before { background: var(--czerwony); }
.sprawa.spad::before, .sprawa.rgb::before { background: var(--sygnal); }

/* ---------- kalkulator ---------- */
.kalkulator-widok > section { background: var(--bialy); border: 1px solid var(--linia); border-radius: 12px; padding: 20px 22px; }
.kalkulator-widok > .strona-glowa { background: none; border: 0; padding: 0; border-radius: 0; }
.kalkulator-widok > section + section { margin-top: 18px; }
.kalkulator-widok > .strona-glowa + section { margin-top: 20px; }
.wybory { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.wybor { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 12px 14px; min-height: 64px; border: 1.5px solid var(--linia);
  border-radius: 10px; background: var(--bialy); color: var(--atrament); cursor: pointer; transition: border-color var(--ruch), background var(--ruch); }
.wybor b { font-weight: 600; font-size: 14px; }
.wybor span { font-size: 12.5px; color: var(--szary); }
@media (hover: hover) { .wybor:hover { border-color: var(--akcent); } }
.wybor.aktywny { border-color: var(--marka); background: var(--akcent-jasny); box-shadow: inset 0 0 0 1px var(--marka); }
.wybor.maly { min-height: 44px; flex-direction: row; align-items: center; padding: 8px 14px; font-weight: 500; font-size: 14px; }
.pola { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.pole { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pole > span { font-size: 12px; font-weight: 600; color: var(--szary); text-transform: uppercase; letter-spacing: 0.06em; }
.pole select { width: 100%; min-height: 44px; padding: 8px 10px; font-size: 16px; border: 1.5px solid var(--linia); border-radius: 8px; background: var(--bialy); color: var(--atrament); }
.pole select:focus-visible { border-color: var(--akcent); }
.przelacznik { display: flex; gap: 8px; }
.kalk-cena .wynik-liczby { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kalk-cena .wynik-liczby dd { font-size: 26px; }
.pliki-kolumny { display: grid; grid-template-columns: minmax(150px, 0.8fr) repeat(2, minmax(0, 1.5fr)); gap: 16px; margin-top: 14px; align-items: start; }
.wstep-pliki { color: var(--tekst2); max-width: 80ch; }
.podglad-spadu svg { display: block; width: 100%; max-width: 190px; height: auto; }
.sp-spad { fill: #fbeeee; stroke: var(--czerwony); stroke-width: 1; stroke-dasharray: 4 3; }
.sp-ciecie { fill: #fff; stroke: var(--atrament); stroke-width: 1.2; }
.sp-bezpieczny { fill: none; stroke: var(--zielony); stroke-width: 1; stroke-dasharray: 3 3; }
.legenda { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-size: 12px; color: var(--tekst2); }
.legenda li { padding-left: 16px; position: relative; }
.legenda li::before { content: ""; position: absolute; left: 0; top: 6px; width: 10px; height: 0; border-top: 2px solid; }
.l-spad::before { border-color: var(--czerwony); border-top-style: dashed; }
.l-ciecie::before { border-color: var(--atrament); }
.l-bezpieczny::before { border-color: var(--zielony); border-top-style: dashed; }
.plik-pole { border: 1px solid var(--linia2); border-radius: 10px; padding: 14px; background: var(--karta); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.plik-pole h3 { font-size: 20px; color: var(--marka); }
.plik-etykieta { cursor: pointer; }
.plik-etykieta input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.plik-etykieta:focus-within { outline: 2px solid var(--akcent); outline-offset: 2px; }
.probki { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; }
.plik-wynik { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 12px; border-radius: 8px; background: var(--bialy); border-left: 4px solid var(--zielony); min-width: 0; }
.plik-wynik.uwaga { border-left-color: var(--sygnal); }
.plik-wynik b { font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.plik-wynik .cichy { font-size: 12.5px; }
.kalk-wyslij p { color: var(--tekst2); max-width: 80ch; }
.pliki-zam .tabela td:nth-child(2) { overflow-wrap: anywhere; }
/* Pliki maja ten sam odstep, czy nad nimi sa sprawy, czy nie: gdy ostatnia sprawa sie zwija, nic nie skacze na koncu ruchu. */
main.projekt-widok > section.pliki-zam { margin-top: 40px; }
@media (max-width: 1000px) {
  .wybory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pola { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kalk-cena .wynik-liczby { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kalk-cena .wynik-liczby div:nth-child(3) { border-left: 0; }
  .kalk-cena .wynik-liczby div:nth-child(n+3) { border-top: 1px solid var(--linia2); }
  .pliki-kolumny { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .podglad-spadu { grid-column: 1 / -1; display: flex; gap: 16px; align-items: center; }
  .podglad-spadu svg { max-width: 120px; flex: none; }
  .podglad-spadu .legenda { margin: 0; }
}
@media (max-width: 640px) {
  .kalkulator-widok > section { padding: 16px 14px; }
  .pola, .pliki-kolumny { grid-template-columns: minmax(0, 1fr); }
  .wybory { gap: 8px; }
  .kalk-cena .wynik-liczby { grid-template-columns: minmax(0, 1fr); }
  .kalk-cena .wynik-liczby div + div { border-left: 0; border-top: 1px solid var(--linia2); }
  .kalk-cena .wynik-liczby dd { font-size: 24px; }
  .przelacznik .wybor { flex: 1; justify-content: center; }
  .podglad-spadu { flex-direction: column; align-items: flex-start; }
  .kalk-wyslij .przycisk { width: 100%; }
  .hero { padding-left: 18px; }
  .probki .przycisk { min-height: 40px; }
}

/* ---------- powiadomienie ---------- */
.tost { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 50;
  background: var(--marka-ciemna); color: #fff; padding: 12px 18px; border-radius: 10px; max-width: min(560px, calc(100vw - 32px)); font-size: 14px;
  box-shadow: 0 10px 30px -12px rgb(2 42 87 / 0.5); transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 4px solid var(--sygnal); }
.tost.widoczny { opacity: 1; transform: translate(-50%, 0); }
.tost b { display: block; font-weight: 600; }
.tost span { display: block; font-size: 13px; color: #c9d7ea; margin-top: 2px; }

/* ---------- przewodnik ---------- */
.tour { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; }
.tour-ciemne { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: rgb(8 20 36 / 0.5); transform-origin: 0 0; will-change: transform; }
.tour-dziura { position: absolute; left: 0; top: 0; width: 0; height: 0; border-radius: 8px; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--sygnal); will-change: transform; }
.tour-karta { position: fixed; z-index: 60; left: 0; top: 0; width: 390px; max-width: calc(100vw - 32px); background: var(--bialy); color: var(--atrament);
  border-radius: 14px; padding: 16px 18px; box-shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 24px 48px -20px rgb(2 42 87 / 0.45); will-change: transform;
  max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain; }
.tour-karta.srodek { width: 450px; }
.tour-gora { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tour-rozdzialy { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.tour-rozdzialy li { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 99px; background: var(--linia2); color: var(--szary); }
.tour-rozdzialy li.za { background: var(--akcent-jasny); color: var(--akcent-ciemny); }
.tour-rozdzialy li.teraz { background: var(--marka); color: #fff; }
.tour-zamknij { border: 0; background: none; color: var(--szary); font-size: 13px; cursor: pointer; padding: 4px 8px; text-decoration: underline; min-height: 36px; }
@media (hover: hover) { .tour-zamknij:hover { color: var(--atrament); } }
.tour-licznik { margin-top: 12px; font-size: 12px; color: var(--szary); }
.tour-tytul { font-size: 23px; line-height: 1.15; margin-top: 2px; color: var(--marka); }
.tour-tekst { margin-top: 8px; font-size: 15px; color: var(--tekst2); }
.tour-zadanie { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--sygnal-tekst); padding-left: 10px; border-left: 3px solid var(--sygnal); }
.tour-dol { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 16px; }
.tour-wstecz { margin-right: auto; border: 0; background: none; color: var(--akcent); font-weight: 600; cursor: pointer; padding: 8px 8px 8px 4px; font-size: 14px; min-height: 40px; }
@media (hover: hover) { .tour-wstecz:hover { text-decoration: underline; } }
.tour-propozycja { position: fixed; z-index: 55; right: 20px; bottom: 20px; width: 330px; max-width: calc(100vw - 32px); background: var(--bialy);
  border-radius: 12px; padding: 16px 18px; border: 1px solid var(--linia); box-shadow: 0 20px 40px -20px rgb(2 42 87 / 0.4); border-top: 4px solid var(--sygnal); }
.tour-propozycja b { font-family: var(--wyswietlacz); font-size: 18px; color: var(--marka); }
.tour-propozycja p { font-size: 14px; color: var(--tekst2); margin-top: 4px; }
.tour-propozycja .tour-dol { margin-top: 10px; }
/* Stara tresc karty przy zmianie kroku: lezy na nowej i gasnie (przenikanie, przewodnik.js zmienKarte). */
.tour-stara { position: absolute; margin: 0; pointer-events: none; }
.tour-klik { transform: scale(0.94) !important; transition: transform 80ms cubic-bezier(0.4, 0, 0.2, 1) !important; }
/* Niskie ekrany laptopow: karta ciasniejsza, zeby zmiescila sie obok albo pod podswietleniem. */
@media (max-height: 780px) and (min-width: 700px) {
  .tour-karta { padding: 12px 16px; width: 360px; }
  .tour-karta.srodek { width: 420px; }
  .tour-licznik { margin-top: 6px; }
  .tour-tytul { font-size: 19px; }
  .tour-tekst { font-size: 14px; margin-top: 6px; }
  .tour-zadanie { margin-top: 6px; }
  .tour-dol { margin-top: 10px; }
  .tour-dol .przycisk { min-height: 34px; padding: 6px 12px; }
}
/* Bardzo niskie okna (ok. 650 px): karta szersza i nizsza, zeby zmiescila sie pod celem wysokosci ok. 300 px. */
@media (max-height: 680px) and (min-width: 1000px) {
  .tour-karta { width: 450px; padding: 10px 16px; }
  .tour-licznik { margin-top: 4px; }
  .tour-tekst { line-height: 1.4; }
  .tour-dol { margin-top: 8px; }
}

/* ---------- srednie ekrany ---------- */
@media (max-width: 1100px) { .znak-opis, .pokaz { display: none; } }
@media (max-width: 1000px) {
  .belka { flex-wrap: wrap; gap: 8px 16px; }
  .role-nav { order: 3; margin-left: 0; width: 100%; }
  .belka-prawo { margin-left: auto; }
  .scen-wynik { grid-template-columns: minmax(0, 1fr); }
  .etapy-lista li span { display: none; }
  .etapy-lista li.teraz span { display: inline; }
}

/* ---------- telefon ---------- */
@media (max-width: 640px) {
  .belka { position: static; padding: 10px max(16px, env(safe-area-inset-right)) 13px max(16px, env(safe-area-inset-left)); }
  .znak-nazwa { font-size: 18px; }
  .znak-kreska { display: none; }
  .belka-prawo { gap: 6px; }
  .przycisk.cichy { min-height: 40px; padding: 6px 10px; }
  .role-nav a { flex: 1; justify-content: center; padding: 10px 6px; min-height: 44px; }
  main { padding: 22px max(16px, env(safe-area-inset-right)) 64px max(16px, env(safe-area-inset-left)); }
  main > section + section { margin-top: 36px; }
  .hero { padding-top: 12px; }
  .hero h1 { font-size: 38px; }
  .hero .wstep { font-size: 17px; }
  .hero-cta .przycisk { width: 100%; }
  .scenariusz { padding: 18px 16px; border-radius: 12px; margin-top: 32px; }
  .scen-sterowanie .przycisk { width: 100%; }
  .zakladki { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 20px; padding-bottom: 2px; }
  .zakladki a { flex: none; }
  .etapy { padding: 14px; }
  .etap-akcje, .etap-akcje .przycisk { width: 100%; }
  .wynik-liczby { grid-template-columns: minmax(0, 1fr); }
  .wynik-liczby div + div { border-left: 0; border-top: 1px solid var(--linia2); }
  .tost { left: max(16px, env(safe-area-inset-left)); right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom));
    max-width: none; transform: translateY(20px); }
  .tost.widoczny { transform: none; }
  .tour-rozdzialy li:not(.teraz) { display: none; }
  .tour-tytul { font-size: 20px; }
  .tour-dol .przycisk, .tour-zamknij, .tour-wstecz { min-height: 44px; }
}
/* Telefon w pionie i niskie okna: karta przewodnika przyklejona do dolu, podswietlenie konczy sie nad nia. */
@media (max-width: 699px) {
  .tour-karta, .tour-karta.srodek { top: auto; left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right));
    bottom: calc(12px + env(safe-area-inset-bottom)); width: auto; max-width: none; transform: none !important; max-height: 46vh; }
  body.tour-wlaczony main { padding-bottom: 340px; }
  /* Na malych telefonach tekst karty sie przewija, a przyciski stoja przyklejone u dolu karty (zawsze widoczne). */
  .tour-dol { position: sticky; bottom: -16px; margin: 12px -18px -16px; padding: 10px 18px 16px; background: var(--bialy);
    box-shadow: 0 -10px 12px -12px rgb(2 42 87 / 0.25); }
  .tour-propozycja { right: 12px; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); width: auto; }
}
@media (max-height: 500px) {
  .belka { position: static; }
  .tour-karta, .tour-karta.srodek { top: auto; left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); bottom: 8px;
    width: auto; max-width: none; transform: none !important; max-height: 55vh; }
}
@media (pointer: coarse) { .przycisk { min-height: 44px; } .przycisk.cichy { min-height: 40px; } .zakladki a { min-height: 44px; } .znak { min-height: 44px; } }

/* Ograniczony ruch (ustawienie systemu): bez przesuwania, skalowania i polysku, ale z przenikaniem (strona nie jest sztywna).
   Klasa ruch-pelny (adres z ?ruch=pelny) przywraca pelny ruch. */
@keyframes zanik { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  :root:not(.ruch-pelny) .scen-wynik.animuj li { animation-name: zanik; transform: none; }
  :root:not(.ruch-pelny) .przycisk:active:not(:disabled), :root:not(.ruch-pelny) .tour-klik { transform: none !important; }
  :root:not(.ruch-pelny) .przycisk:not(.drugi):not(.cichy)::after { display: none; }
  :root:not(.ruch-pelny) .tost, :root:not(.ruch-pelny) .tost.widoczny { transform: translate(-50%, 0); }
}
@media (prefers-reduced-motion: reduce) and (max-width: 640px) { :root:not(.ruch-pelny) .tost, :root:not(.ruch-pelny) .tost.widoczny { transform: none; } }
