:root {
  --granat: #1c3354;
  --granat-jasny: #2c4a76;
  --tekst: #14181f;
  --szary: #5d6674;
  --linia: #d8dce3;
  --tlo: #f4f5f7;
  --bialy: #fff;
  --akcent: #c8a04a;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--tlo); color: var(--tekst);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px; line-height: 1.5;
}

/* --- pasek górny --- */
.top { position: sticky; top: 0; z-index: 30; background: var(--granat); color: #fff;
       box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.top-in { max-width: 980px; margin: 0 auto; padding: 10px 18px;
          display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.top-txt { flex: 1 1 260px; }
.top h1 { margin: 0; font-size: 18px; letter-spacing: -.2px; }
.top p { margin: 1px 0 0 0; font-size: 12px; color: #b9c6da; }
.top a { color: #b9c6da; }
.progres { flex: 0 0 210px; }
.progres-licz { font-size: 12px; color: #b9c6da; text-align: right; margin-bottom: 4px; }
.pasek { height: 5px; background: rgba(255,255,255,.22); border-radius: 3px; overflow: hidden; }
.pasek-fill { height: 100%; width: 0; background: var(--akcent); transition: width .2s; }

main { max-width: 980px; margin: 0 auto; padding: 18px 18px 70px; }

.karta { background: var(--bialy); border: 1px solid var(--linia); border-radius: 10px;
         padding: 16px 18px; margin-bottom: 16px; }
.osoba-lab { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.osoba { width: 100%; max-width: 420px; padding: 10px 12px; font-size: 16px;
         border: 1px solid var(--linia); border-radius: 7px; background: #fffdf5; }
.osoba:focus { outline: 2px solid var(--granat-jasny); outline-offset: 1px; }
.instr-h { margin: 0 0 8px 0; font-size: 15px; }
.instr ul { margin: 0; padding-left: 18px; }
.instr li { margin-bottom: 5px; font-size: 14px; color: #2c333f; }

/* --- sekcje i zagadnienia --- */
.sekcja { background: var(--bialy); border: 1px solid var(--linia); border-radius: 10px;
          padding: 16px 20px 6px; margin-bottom: 16px; }
.sek-h { display: flex; align-items: center; gap: 10px; margin: 0 0 16px 0;
         font-size: 17px; padding-bottom: 9px; border-bottom: 2px solid var(--granat); }
.sek-id { display: inline-flex; align-items: center; justify-content: center;
          width: 26px; height: 26px; border-radius: 50%; background: var(--granat);
          color: #fff; font-size: 13px; font-weight: 700; flex: 0 0 auto; }

.blok { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px dashed var(--linia); }
.sekcja .blok:last-child { border-bottom: 0; }
.pyt { margin: 0 0 10px 0; font-size: 15px; line-height: 1.45; }
.pyt-id { display: inline-block; font-weight: 700; color: var(--granat);
          margin-right: 7px; font-size: 13px; }

/* --- wielokrotny wybór: banki jako klikalne chipy --- */
.chipy { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-block; }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip span { display: inline-block; padding: 8px 15px; border: 1.5px solid #c9cfd8;
             border-radius: 999px; background: #fff; font-size: 14px; cursor: pointer;
             user-select: none; transition: background .12s, border-color .12s, color .12s; }
.chip span:hover { border-color: var(--granat-jasny); }
.chip input:checked + span { background: var(--granat); border-color: var(--granat);
                             color: #fff; font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--granat-jasny); outline-offset: 2px; }
.chip-nw span { border-style: dashed; color: var(--szary); }
.chip-nw input:checked + span { background: #8a8f98; border-color: #8a8f98; color: #fff; }

/* --- pole przy każdym banku --- */
.siatka { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 12px; }
.pb { display: flex; flex-direction: column; gap: 3px; }
.pb-lab { font-size: 12px; font-weight: 600; color: var(--szary); }
.pb-nw { grid-column: 1 / -1; }
.pb-nw .pb-lab { font-style: italic; font-weight: 500; }
.pb-nw input { border-style: dashed; }

.pole { font: inherit; }
.txt { width: 100%; font-size: 14px; padding: 8px 9px; border: 1px solid #c9cfd8;
       border-radius: 6px; background: #fffdf5; }
.ta { display: block; width: 100%; font-size: 14.5px; padding: 9px 10px; line-height: 1.5;
      border: 1px solid #c9cfd8; border-radius: 7px; background: #fffdf5; resize: vertical; }
.txt:focus, .ta:focus { outline: 2px solid var(--granat-jasny); outline-offset: 0; background: #fff; }

/* --- wysyłka --- */
.wyslij-box { text-align: center; }
.btn { background: var(--granat); color: #fff; border: 0; border-radius: 8px;
       padding: 14px 34px; font-size: 16px; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--granat-jasny); }
.mini { font-size: 12px; color: var(--szary); margin: 9px 0 0 0; }

/* --- podziękowanie / wyniki --- */
.centrum { max-width: 620px; margin: 60px auto; text-align: center; }
.centrum .karta { padding: 30px 26px; }
.ptak { font-size: 34px; margin-bottom: 8px; }
.lista { width: 100%; border-collapse: collapse; background: #fff; }
.lista th, .lista td { border: 1px solid var(--linia); padding: 8px 10px; text-align: left; font-size: 14px; }
.lista th { background: #eef1f5; font-size: 12px; }
.lista a { color: var(--granat); }

/* --- podgląd odpowiedzi --- */
.odp { background: #fffdf5; border: 1px solid var(--linia); border-radius: 7px;
       padding: 8px 10px; white-space: pre-wrap; font-size: 14.5px; }
.odp.pusto { color: #a8aeb8; font-style: italic; background: #f7f8f9; }
.chip-ro { display: inline-block; padding: 6px 13px; border-radius: 999px; font-size: 13.5px;
           border: 1.5px solid #dfe3e9; color: #a8aeb8; background: #fafbfc; }
.chip-ro.on { background: var(--granat); border-color: var(--granat); color: #fff; font-weight: 600; }
.chip-ro.nw.on { background: #8a8f98; border-color: #8a8f98; }
.pary { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 12px; }
.para { border: 1px solid var(--linia); border-radius: 7px; padding: 6px 9px; background: #fff; }
.para b { display: block; font-size: 12px; color: var(--szary); font-weight: 600; }
.para span { font-size: 14.5px; }
.para.pusta span { color: #b9bec7; font-style: italic; }

@media (max-width: 720px) {
  main { padding: 14px 12px 60px; }
  .sekcja, .karta { padding: 13px 14px 4px; border-radius: 9px; }
  .karta { padding-bottom: 14px; }
  .progres { flex: 1 1 100%; }
  .progres-licz { text-align: left; }
  .chip span { padding: 9px 14px; font-size: 14.5px; }
  .siatka, .pary { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* --- wydruk: ten sam test na papierze --- */
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; font-size: 10pt; }
  main { max-width: none; padding: 0; }
  .top { position: static; box-shadow: none; background: #fff; color: #000;
         border-bottom: 2px solid #000; padding-bottom: 4px; }
  .top p { color: #444; }
  .progres, .wyslij-box, .instr { display: none; }
  .karta, .sekcja { border: 0; padding: 0; margin: 0 0 10px 0; }
  .sek-h { font-size: 13pt; border-bottom: 1.5pt solid #000; margin-top: 10px; }
  .sek-id { background: #000; }
  .blok { break-inside: avoid; page-break-inside: avoid;
          border-bottom: 1px dashed #bbb; padding-bottom: 10px; margin-bottom: 10px; }
  .osoba { border: 0; border-bottom: 1px solid #000; background: #fff; border-radius: 0; }
  .chip span { background: #fff !important; color: #000 !important; border: 1px solid #666; }
  .chip span::before { content: "\2610\00a0"; }
  .txt, .ta { background: #fff; border: 1px solid #999; }
}
