/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #0d1321;
  --ink-soft: #2a3347;
  --ink-muted: #5a6478;
  --ink-faint: #9aa0ad;
  --surface: #fcfcfc;
  --surface-warm: #f0f1f3;
  --card: #ffffff;
  --accent: #05b2dc;
  --accent-light: #03a0c8;
  --accent-glow: rgba(5, 178, 220, 0.1);
  --green: #2a7d5f;
  --green-soft: rgba(42, 125, 95, 0.08);
  --amber: #b8860b;
  --radius: 14px;
  --radius-sm: 10px;
  --font-display: 'Space Grotesk', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
}

html, body {
  height: 100%;
  overflow: hidden;
}

/* Tryb scroll dla onboarding (FON), strony sukcesu, polityki i regulaminow */
html:has(.onb-body),
html:has(.legal-body),
body.onb-body,
body.legal-body {
  height: auto;
  overflow: auto;
}

/* ============================================
   Regulaminy / polityki / dokumenty prawne
   ============================================ */
body.legal-body { background: #fafbfc; color: var(--ink); font-family: var(--font-body); }
.legal-nav {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky; top: 0; z-index: 10;
}
.legal-nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.legal-logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--ink);
  text-decoration: none;
}
.legal-logo span { color: var(--accent-light); }
.legal-logo .ext { color: var(--ink-muted); font-weight: 500; }
.legal-back {
  font-size: 0.92rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.legal-back:hover { text-decoration: underline; }

.legal-doc {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.legal-doc--index { max-width: 980px; }

.legal-doc h1 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  margin: 0 0 12px 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.25;
}
.legal-lead { color: var(--ink-muted); font-size: 1rem; margin-bottom: 32px; }

.legal-doc-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  padding: 14px 18px;
  background: #f0fbfe;
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  margin-bottom: 28px;
  font-size: 0.93rem;
}
.legal-badge {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
}
.legal-meta { color: var(--ink-muted); }
.legal-meta strong { color: var(--ink); }
.legal-print {
  margin-left: auto;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.legal-print:hover { text-decoration: underline; }

.legal-content {
  line-height: 1.7;
  color: var(--ink-soft);
  font-size: 0.97rem;
}
.legal-content h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin: 32px 0 12px 0;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent);
}
.legal-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin: 24px 0 8px 0;
}
.legal-content p { margin: 10px 0; }
.legal-content ol, .legal-content ul { margin: 10px 0 14px 0; padding-left: 24px; }
.legal-content ol li, .legal-content ul li { margin-bottom: 6px; }
.legal-content strong { color: var(--ink); }
.legal-content blockquote {
  margin: 14px 0;
  padding: 10px 16px;
  border-left: 3px solid var(--accent);
  background: #f0fbfe;
  color: var(--ink-soft);
}
.legal-content code {
  background: #f0f1f3;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 0.92em;
}
.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 0.93rem;
}
.legal-content table th, .legal-content table td {
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  text-align: left;
}
.legal-content table th { background: #f0fbfe; font-weight: 600; color: var(--ink); }
.legal-content hr { border: 0; border-top: 1px solid #e5e7eb; margin: 24px 0; }
.legal-content a { color: var(--accent); text-decoration: underline; }

.legal-footer {
  text-align: center;
  padding: 30px 24px;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  font-size: 0.86rem;
  color: var(--ink-muted);
}
.legal-footer p { margin: 4px 0; }
.legal-footer a { color: var(--accent); text-decoration: none; }
.legal-footer a:hover { text-decoration: underline; }

/* Index regulaminow — tabele */
.legal-notice {
  background: #fffbeb;
  border-left: 3px solid #d97706;
  padding: 12px 16px;
  margin: 24px 0;
  border-radius: 6px;
  font-size: 0.92rem;
  color: #78350f;
}
.legal-notice a { color: #92400e; }
.sec-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
  text-transform: uppercase;
  margin-top: 36px;
  margin-bottom: 4px;
}
.sec-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 18px 0;
  color: var(--ink);
}
.doc-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.94rem;
}
.doc-table thead th {
  background: #f9fafb;
  text-align: left;
  padding: 12px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e5e7eb;
}
.doc-table tbody td {
  padding: 14px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}
.doc-table tbody tr:last-child td { border-bottom: 0; }
.doc-table tbody tr:hover { background: #fafbfc; }
.doc-table tbody td a { color: var(--ink); text-decoration: none; font-weight: 500; }
.doc-table tbody td a:hover { color: var(--accent); }
.doc-table .btn-link {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
}
.ver-pill {
  display: inline-block;
  padding: 3px 8px;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
}
.ver-pill--old { background: #9aa0ad; }

.archive-section { margin-top: 44px; }
.archive-toggle {
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.archive-toggle:hover { border-color: var(--accent); }
.archive-toggle .arrow { color: var(--accent); }
.archive-content { margin-top: 16px; }

@media print {
  .legal-nav, .legal-back, .legal-print, .legal-footer { display: none; }
  .legal-doc { padding: 0; max-width: 100%; }
  body.legal-body { background: #fff; }
  .legal-content { font-size: 11pt; }
  .legal-content h2 { page-break-after: avoid; }
  .legal-content ol li, .legal-content ul li { page-break-inside: avoid; }
}
body {
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== GRAIN ===== */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 28px;
  height: 56px;
  display: flex;
  align-items: center;
  background: rgba(246,245,241,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.header-inner {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.logo span { color: var(--accent-light); }

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.header-step {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.header-progress {
  width: 80px;
  height: 3px;
  background: var(--surface-warm);
  border-radius: 3px;
  overflow: hidden;
}
.header-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-wstecz {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 6px 10px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn-wstecz:hover {
  color: var(--ink);
  background: rgba(0,0,0,0.05);
}

/* "Od nowa" w nagłówku — secondary button, dyskretny, ale dostępny.
   Realna potrzeba z Clarity 05.05 05:42 (user klikał Wróć × 3 zamiast resetu). */
.btn-reset-header {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid rgba(0,0,0,0.1);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-reset-header:hover {
  color: var(--ink);
  border-color: rgba(0,0,0,0.2);
  background: rgba(0,0,0,0.03);
}
.btn-reset-header:active { transform: scale(0.97); }

/* ===== SLIDES CONTAINER ===== */
.slides {
  position: fixed;
  inset: 0;
  top: 56px;
}

/* ===== SINGLE SLIDE ===== */
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateX(60px);
  transition:
    opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.slide.aktywny {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  z-index: 2;
}
.slide.wychodzi {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-60px);
  z-index: 1;
}

.slide-inner {
  width: 100%;
  max-width: 560px;
  padding: 24px 28px;
  /* Scroll gdy content wyzszy niz viewport (mobile maly ekran) */
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-warm) transparent;
  -webkit-overflow-scrolling: touch;
}
.slide-inner--wynik {
  max-width: 600px;
  padding-bottom: 48px;
}

/* ===== HERO SLIDE ===== */
.hero-content {
  text-align: center;
}
.hero-kicker {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  margin-bottom: 24px;
}
.hero-content h1 {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 400;
  line-height: 1.12;
  color: var(--ink);
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}
.hero-content h1 em {
  font-style: normal;
  font-weight: 700;
  color: var(--accent);
}
.hero-sub {
  font-size: 17px;
  color: var(--ink-muted);
  line-height: 1.6;
  margin-bottom: 36px;
}
.btn-start {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 17px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.01em;
}
.btn-start:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26,58,92,0.2);
}
.hero-meta {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 13px;
  color: var(--ink-faint);
}

/* ===== SLIDE HEADER ===== */
.slide-header {
  margin-bottom: 28px;
}
.slide-numer {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.slide-header h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 10px;
}
.slide-opis {
  font-size: 15px;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* ===== OPCJE GRID ===== */
.opcje-grid {
  display: grid;
  gap: 10px;
}
.opcje-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.opcje-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ===== OPCJA ===== */
.opcja {
  background: var(--card);
  border: 1.5px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-sm);
  padding: 20px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  font-family: var(--font-body);
  position: relative;
}
.opcja:hover {
  border-color: rgba(26,58,92,0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.opcja.wybrana {
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 1px var(--accent), 0 4px 20px rgba(26,58,92,0.1);
}

.opcja-visual {
  color: var(--ink-muted);
  transition: color 0.2s;
}
.opcja.wybrana .opcja-visual { color: var(--accent); }

.opcja-text { display: flex; flex-direction: column; gap: 2px; }
.opcja-tytul { font-size: 14px; font-weight: 600; color: var(--ink); }
.opcja-opis { font-size: 12px; color: var(--ink-muted); }

/* Document buttons */
.opcje-dokumenty .opcja {
  padding: 14px 10px;
  gap: 6px;
}
.opcje-dokumenty .opcja-ikona { font-size: 20px; }

/* Neutral (nie wiem) opcja */
.opcja--neutral {
  border-style: dashed;
  border-color: rgba(0,0,0,0.1);
  background: var(--surface-warm);
}
.opcja--neutral .opcja-visual { color: var(--ink-faint); }
.opcja--neutral .opcja-tytul { color: var(--ink-muted); }
.opcja--neutral:hover { border-color: var(--accent); background: var(--accent-glow); }
.opcja--neutral.wybrana { border-style: solid; background: white; }

/* Full width opcja */
.opcja--full {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 14px 18px;
  grid-column: 1 / -1;
}
.opcja--full .opcja-text { display: flex; flex-direction: column; gap: 2px; }

/* cols-span-2 — opcja rozciągnięta w siatce cols-2 */
.cols-span-2 { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 12px; text-align: left; padding: 14px 18px; }

/* ===== BTN DALEJ ===== */
.btn-dalej {
  width: 100%;
  padding: 16px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-dalej:hover:not(:disabled) {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26,58,92,0.2);
}
.btn-dalej:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Spinner — ukryty domyślnie, widoczny w trakcie wysyłki */
.btn-dalej .btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
}
.btn-dalej.is-loading {
  cursor: wait;
  opacity: 0.85;
}
.btn-dalej.is-loading .btn-label { opacity: 0.6; }
.btn-dalej.is-loading .btn-spinner { display: inline-block; }
.btn-dalej.is-loading .btn-arrow { display: none; }
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* ===== PRACOWNICY ===== */
.pracownicy-lista {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.pracownik-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card);
  border: 1.5px solid rgba(0,0,0,0.07);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.pracownik-info { display: flex; flex-direction: column; gap: 1px; }
.pracownik-label { font-size: 15px; font-weight: 500; color: var(--ink); }
.pracownik-cena { font-size: 12px; color: var(--ink-faint); }

.licznik { display: flex; align-items: center; gap: 16px; }
.licznik-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,0.1);
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  transition: all 0.15s;
}
.licznik-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}
.licznik-btn:active { transform: scale(0.9); }
.licznik-val {
  font-size: 22px;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ===== WYCIĄGI BANKOWE (krok WB) ===== */
.wb-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.wb-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: 1.5px solid rgba(0,0,0,0.07);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  transition: opacity 0.2s;
}
.wb-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.wb-label { font-size: 15px; font-weight: 500; color: var(--ink); }
.wb-hint { font-size: 12px; color: var(--ink-faint); }
.wb-counter { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.wb-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,0.1);
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  transition: all 0.15s;
  flex-shrink: 0;
}
.wb-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}
.wb-btn:active:not(:disabled) { transform: scale(0.9); }
.wb-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.wb-input {
  width: 70px;
  height: 40px;
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: var(--radius-sm);
  background: white;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
  -moz-appearance: textfield;
  appearance: textfield;
}
.wb-input::-webkit-outer-spin-button,
.wb-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.wb-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.wb-input:disabled {
  background: rgba(0,0,0,0.03);
  cursor: not-allowed;
}
.wb-magazyn { display: flex; gap: 8px; flex-shrink: 0; }
.wb-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  min-height: 48px; /* mobile-friendly hit area (Apple 44pt / Material 48dp) */
  min-width: 72px;
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: var(--radius-sm);
  background: white;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
  transition: all 0.15s;
}
.wb-toggle:hover { border-color: var(--accent); }
.wb-toggle:active { transform: scale(0.97); }
.wb-toggle input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.wb-toggle:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-glow, rgba(0,150,80,0.06));
  font-weight: 600;
}
.wb-toggle:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.wb-toggle--big { padding: 14px 18px; font-size: 15px; }
.wb-toggle--big strong.extras-cena {
  margin-left: 6px;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}

/* ===== Krok pracowników: zakres obsługi UoP ===== */
.prac-zakres-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 14px 0 22px 0;
  padding: 12px;
  background: rgba(0,0,0,0.02);
  border-radius: var(--radius-sm);
}
.prac-zakres-label {
  font-size: 14px;
  color: var(--ink-muted);
  margin-right: 4px;
}

/* ===== Krok extras (branża + op walutowe) ===== */
.extras-section {
  margin-bottom: 24px;
}
.extras-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5pt;
  color: var(--ink-muted);
  margin: 0 0 10px 0;
}
.extras-radio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.extras-hint {
  font-size: 13px;
  color: var(--ink-faint);
  margin: 0 0 12px 0;
}

/* ===== WYNIK ===== */
.wynik-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1.5px solid rgba(0,0,0,0.06);
  padding: 36px 32px;
  text-align: center;
  margin-bottom: 20px;
}
.wynik-top { margin-bottom: 24px; }
.wynik-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 18px;
}
.wynik-cena {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 400;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: 4px;
  border-radius: 8px;
  padding: 4px 8px;
  transition: background 0.15s, transform 0.15s;
}
.wynik-cena[role="button"] { cursor: copy; }
.wynik-cena[role="button"]:hover {
  background: var(--accent-glow, rgba(5,178,220,0.08));
}
.wynik-cena[role="button"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.wynik-cena.copied {
  background: rgba(0,150,80,0.12);
  transform: scale(1.02);
}
.wynik-cena.copy-error {
  background: rgba(220,80,80,0.12);
}
.wynik-netto { font-size: 14px; color: var(--ink-muted); }
.wynik-copy-hint {
  display: block;
  min-height: 18px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--accent, #05b2dc);
  font-weight: 600;
  transition: opacity 0.2s;
}

.wynik-breakdown { max-width: 380px; margin: 0 auto 16px; }

.skladnik {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: var(--ink-soft);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.skladnik:last-child { border-bottom: none; }
.skladnik span:last-child {
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.wynik-disclaimer { font-size: 12px; color: var(--ink-faint); font-style: italic; line-height: 1.5; margin-top: 12px; }

.wynik-actions-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}
.btn-quote-pdf {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--accent-glow, rgba(5,178,220,0.10));
  border: 1.5px solid rgba(5,178,220,0.35);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent, #05b2dc);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.btn-quote-pdf:hover:not(:disabled) {
  background: var(--accent, #05b2dc);
  color: white;
  border-color: var(--accent, #05b2dc);
}
.btn-quote-pdf:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn-quote-pdf:disabled { cursor: progress; opacity: 0.7; }
.btn-restart {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: none;
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s;
}
.btn-restart:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== EMAIL GATE — form field ===== */
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field label { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.form-field input {
  padding: 14px 16px;
  font-size: 15px;
  font-family: var(--font-body);
  border: 1.5px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  transition: all 0.2s;
  margin-bottom: 14px;
}
.form-field input.is-invalid {
  border-color: #d44;
  background: rgba(220, 50, 50, 0.04);
}
.form-error {
  margin: -8px 0 12px 0;
  font-size: 13px;
  color: #c33;
  line-height: 1.4;
}
.form-field input:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ===== WYNIK KONTAKT — inbound CTA ===== */
.wynik-kontakt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 8px 0 24px;
  text-align: center;
}
.wynik-email-confirm {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--green);
  font-weight: 500;
  background: var(--green-soft);
  border: 1px solid rgba(42,125,95,0.15);
  border-radius: 8px;
  padding: 10px 14px;
  max-width: 380px;
  width: 100%;
}
.wynik-rodo {
  font-size: 11px;
  color: var(--ink-faint);
  line-height: 1.6;
}
.wynik-rodo a { color: var(--ink-muted); text-decoration: underline; }

/* ===== KEYBOARD HINT (desktop) ===== */
@media (min-width: 769px) {
  .opcja::after {
    content: '';
    position: absolute;
    bottom: 6px;
    right: 8px;
    font-size: 10px;
    color: var(--ink-faint);
    opacity: 0;
    transition: opacity 0.2s;
  }
}

/* ===== CTA do FON na stronie wyniku ===== */
.wynik-cta-fon {
  display: inline-flex;
  margin-top: 8px;
  margin-bottom: 8px;
  width: 100%;
  justify-content: center;
}
.wynik-cta-info {
  font-size: 13px;
  color: var(--ink-faint);
  margin: 0 0 18px 0;
  text-align: center;
}
/* ===== ONBOARDING (FON form) ===== */
.onb-body { background: var(--bg, #fafafa); min-height: 100vh; }
.onb-main { padding: 40px 20px 80px; }
.onb-container {
  max-width: 760px;
  margin: 0 auto;
}
.onb-container--narrow { max-width: 600px; }
.onb-hero { text-align: center; margin-bottom: 40px; }
.onb-hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--ink);
}
.onb-sub { color: var(--ink-muted); font-size: 16px; margin: 0 0 16px 0; }
.onb-cena-box {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 18px;
  background: var(--accent-glow, rgba(0,150,80,0.08));
  border: 1.5px solid var(--accent, #1a8a4f);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.onb-cena-label { color: var(--ink-muted); }
.onb-cena-val { font-size: 22px; font-weight: 700; color: var(--accent, #1a8a4f); }
.onb-cena-netto { font-size: 12px; color: var(--ink-faint); }

.onb-section {
  background: white;
  border: 1.5px solid rgba(0,0,0,0.07);
  border-radius: var(--radius-md, 12px);
  padding: 24px;
  margin-bottom: 16px;
}
.onb-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.onb-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.onb-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.onb-field { display: flex; flex-direction: column; gap: 4px; }
.onb-field--full { grid-column: 1 / -1; }
.btn-pobierz-dane {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  align-self: flex-start;
}
.btn-pobierz-dane:hover { background: var(--accent-light); }
.btn-pobierz-dane:disabled { opacity: 0.5; cursor: wait; }

/* Master checkbox "akceptuje wszystkie zgody" */
.onb-zgoda-all {
  background: #f0fbfe;
  border: 1px solid var(--accent);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

/* Podswietlenie pol z bledami walidacji */
.onb-field--error label,
.onb-field--error .onb-label-static {
  color: #b91c1c;
}
.onb-input-error,
.onb-field--error input,
.onb-field--error select,
.onb-field--error textarea {
  border-color: #b91c1c !important;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12) !important;
  background: #fef2f2;
}
.onb-checkbox-label.onb-field--error {
  background: #fef2f2;
  border: 1px solid #b91c1c;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.onb-field label,
.onb-label-static {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 2px;
}
.onb-field input[type="text"],
.onb-field input[type="email"],
.onb-field input[type="tel"],
.onb-field input[type="number"],
.onb-field input[type="date"],
.onb-field select {
  height: 42px;
  padding: 0 12px;
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: var(--radius-sm);
  background: white;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.onb-field input:focus,
.onb-field select:focus {
  outline: none;
  border-color: var(--accent, #1a8a4f);
  box-shadow: 0 0 0 3px var(--accent-glow, rgba(0,150,80,0.12));
}
.onb-field small {
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 2px;
}

.onb-radio-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.onb-radio-row--wrap { gap: 6px; }
.onb-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: var(--radius-sm);
  background: white;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
  user-select: none;
}
.onb-radio--small { padding: 6px 10px; font-size: 13px; }
.onb-radio:hover { border-color: var(--accent, #1a8a4f); }
.onb-radio input[type="radio"] {
  margin: 0;
  accent-color: var(--accent, #1a8a4f);
}
.onb-radio:has(input:checked) {
  border-color: var(--accent, #1a8a4f);
  background: var(--accent-glow, rgba(0,150,80,0.06));
  font-weight: 500;
}
.onb-checkbox-label {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.4;
}
.onb-checkbox-label input[type="checkbox"] {
  margin: 2px 0 0 0;
  flex-shrink: 0;
  accent-color: var(--accent, #1a8a4f);
}
.onb-checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.onb-zgody {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.onb-zgody label {
  padding: 10px;
  background: rgba(0,0,0,0.02);
  border-radius: var(--radius-sm);
}
.onb-zgody a { color: var(--accent, #1a8a4f); }

.onb-error {
  background: #fee;
  color: #a02020;
  border: 1.5px solid #f5b5b5;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
}

.onb-submit {
  width: 100%;
  margin-top: 20px;
  font-size: 17px !important;
}
.onb-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.onb-info {
  font-size: 13px;
  color: var(--ink-muted);
  text-align: center;
  margin-top: 16px;
  line-height: 1.6;
}
.onb-info a { color: var(--accent, #1a8a4f); }

/* === Onboarding success === */
.onb-success-card {
  background: white;
  border: 1.5px solid rgba(0,0,0,0.07);
  border-radius: var(--radius-md, 12px);
  padding: 40px 32px;
  text-align: center;
}
.onb-success-icon { color: var(--accent, #1a8a4f); margin-bottom: 16px; }
.onb-success-card h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  margin: 0 0 12px 0;
}
.onb-success-sub { color: var(--ink-muted); margin: 0 0 24px 0; }
.onb-pdf-status {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: rgba(0,0,0,0.04);
  border-radius: var(--radius-sm);
}
.onb-spinner {
  width: 20px; height: 20px;
  border: 2.5px solid rgba(0,0,0,0.15);
  border-top-color: var(--accent, #1a8a4f);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.onb-pdf-error {
  background: #fff8e1;
  color: #5a3a00;
  border: 1.5px solid #ffd966;
  padding: 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  text-align: left;
}
.onb-instrukcja {
  margin-top: 32px;
  background: white;
  border: 1.5px solid rgba(0,0,0,0.07);
  border-radius: var(--radius-md, 12px);
  padding: 28px;
}
.onb-instrukcja h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  margin: 0 0 16px 0;
}
.onb-kroki {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}
.onb-kroki li { line-height: 1.5; font-size: 15px; }
.onb-kroki ul { margin-top: 6px; padding-left: 20px; }
.onb-info-box {
  margin-top: 20px;
  padding: 14px 18px;
  background: rgba(0,150,80,0.04);
  border-left: 3px solid var(--accent, #1a8a4f);
  border-radius: 4px;
  font-size: 14px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .header { padding: 0 16px; }
  .hero-content h1 { font-size: 32px; }
  .hero-sub { font-size: 15px; }
  .hero-meta { gap: 12px; font-size: 12px; flex-wrap: wrap; justify-content: center; }
  .btn-start { padding: 14px 28px; font-size: 16px; }
  .slide-inner { padding: 20px 20px; }
  .slide-header h2 { font-size: 24px; }
  .opcje-grid.cols-2 { grid-template-columns: 1fr; }
  .opcje-grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .wynik-cena { font-size: 36px; }
  .wynik-card { padding: 28px 20px; }
  .onb-grid { grid-template-columns: 1fr; }
  .onb-checkbox-grid { grid-template-columns: 1fr; }
  .onb-section { padding: 16px; }
  .onb-hero h1 { font-size: 26px; }
  .onb-success-card { padding: 28px 20px; }

  /* Krok WB — pionowy stack na mobile, większe touch targets */
  .wb-row { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px; }
  .wb-counter { justify-content: space-between; }
  .wb-magazyn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .wb-toggle { justify-content: center; padding: 14px; min-height: 48px; }

  /* "Od nowa" na mobile — zostawiamy tylko ikonę, tekst chowamy */
  .header-right { gap: 10px; }
  .btn-reset-header { padding: 6px 8px; }
  .btn-reset-header span { display: none; }

  /* Info popover na mobile — full-width minus padding */
  .info-popover {
    max-width: calc(100vw - 24px) !important;
    left: 12px !important;
    right: 12px;
  }
}

/* ===== INFO TOOLTIPS — Sprint 3 (2026-05-07) =====
   Klikalne ikonki ⓘ przy pojęciach księgowych. Heatmap Clarity 7d
   potwierdził że użytkownicy klikają w nazwy pojęć szukając wyjaśnień. */
.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-glow, rgba(5,178,220,0.12));
  color: var(--accent, #05b2dc);
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
  cursor: help;
  margin-left: 6px;
  vertical-align: middle;
  user-select: none;
  border: 0;
  font-family: inherit;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.info-icon:hover,
.info-icon:focus-visible,
.info-icon[aria-expanded="true"] {
  background: var(--accent, #05b2dc);
  color: white;
  transform: scale(1.1);
  outline: none;
}
/* Wewnątrz button .opcja — pozycjonowane absolutnie w prawym górnym rogu */
.opcja { position: relative; }
.opcja .info-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  margin: 0;
  z-index: 2;
}

/* Info popover — globalny, jeden na stronie */
.info-popover {
  position: fixed;
  background: white;
  border: 1px solid var(--ink-faint, #d6dadf);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(13,19,33,0.12), 0 2px 6px rgba(13,19,33,0.06);
  padding: 16px 18px 14px;
  max-width: 320px;
  font-size: 14px;
  line-height: 1.5;
  z-index: 9999;
  color: var(--ink, #0d1321);
}
.info-popover[hidden] { display: none; }
.info-popover-title {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent, #05b2dc);
  padding-right: 24px; /* miejsce na X */
  line-height: 1.3;
}
.info-popover-text {
  margin: 0;
  font-size: 13px;
  color: var(--ink-muted, #5a6478);
  line-height: 1.55;
}
.info-popover-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: var(--ink-faint, #9aa0ad);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  padding: 0;
}
.info-popover-close:hover { background: rgba(0,0,0,0.05); color: var(--ink); }
