/* =============================================================================
   RozliczeniaNiemcy.pl (KADOM) – Regulamin i Polityka prywatności
   (regulamin.php, privacy.php). Wszystkie reguły są w obrębie .lg, żeby nie
   gryzły się ze stylami z parts/headScript.php (Bootstrap) ani z czatem.
   Kolumna tekstu do 760 px, na telefonie 16 px marginesu, wersja do druku na dole.
   ============================================================================= */
:root {
  --lg-green: #198754;
  --lg-green-700: #12683f;
  --lg-green-900: #0a3f28;
  --lg-mint: #edf8f2;
  --lg-mint-2: #d5efe0;
  --lg-ink: #0f1a15;
  --lg-ink-2: #2c3a33;
  --lg-muted: #55635b;
  --lg-line: #e1e8e4;
  --lg-soft: #f5f8f6;
  --lg-gold-50: #fff7df;
  --lg-gold: #dfa300;
  --lg-font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

body.lg-body { margin: 0; background: #fff; color: var(--lg-ink); }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

.lg, .lg * { box-sizing: border-box; }
.lg { font-family: var(--lg-font); font-size: 16.5px; line-height: 1.65; color: var(--lg-ink); -webkit-font-smoothing: antialiased; }
.lg a { color: var(--lg-green-700); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.lg a:hover { color: var(--lg-green-900); text-decoration-thickness: 2px; }
.lg a:focus-visible, .lg button:focus-visible, .lg summary:focus-visible { outline: 3px solid var(--lg-green); outline-offset: 2px; border-radius: 4px; }

/* --- prosty nagłówek i stopka (gdy na serwerze nie ma parts/header.php, parts/footer.php) --- */
.lg-bar { border-bottom: 1px solid var(--lg-line); background: #fff; }
.lg-bar__in { max-width: 1120px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lg-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--lg-ink) !important; text-decoration: none !important; font-size: 17px; }
.lg-brand__mark { width: 34px; height: 34px; border-radius: 10px; background: var(--lg-green); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.lg-brand small { display: block; font-weight: 600; font-size: 12px; color: var(--lg-muted); line-height: 1.2; }
.lg-bar__nav { display: flex; gap: 8px; flex-wrap: wrap; }
.lg-bar__nav a { font-size: 14.5px; font-weight: 600; text-decoration: none; padding: 8px 12px; border-radius: 999px; color: var(--lg-ink-2); }
.lg-bar__nav a:hover { background: var(--lg-soft); }
.lg-bar__nav a.lg-cta { background: var(--lg-green); color: #fff; }
.lg-bar__nav a.lg-cta:hover { background: var(--lg-green-700); color: #fff; }

.lg-foot { border-top: 1px solid var(--lg-line); background: var(--lg-soft); margin-top: 56px; }
.lg-foot__in { max-width: 760px; margin: 0 auto; padding: 24px 16px 32px; font-size: 14px; color: var(--lg-muted); }
.lg-foot__in p { margin: 0 0 8px; }
.lg-foot__links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px !important; }
.lg-foot__links a { font-weight: 600; }

/* --- treść --- */
.lg-main { max-width: 760px; margin: 0 auto; padding: 28px 16px 8px; overflow-wrap: break-word; }   /* długie adresy (np. rozliczenianiemcy.pl/regulamin.php) łamią się przy 320 px */
.lg-crumbs { font-size: 13.5px; color: var(--lg-muted); margin: 0 0 14px; }
.lg-crumbs a { color: var(--lg-muted); }
.lg h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 8px; font-weight: 800; color: var(--lg-ink); }
.lg-lead { font-size: 17.5px; color: var(--lg-ink-2); margin: 0 0 6px; }
.lg-meta { font-size: 14px; color: var(--lg-muted); margin: 0 0 22px; }
.lg-meta b { color: var(--lg-ink-2); }

.lg h2 { font-size: 22px; line-height: 1.3; margin: 0 0 12px; font-weight: 800; letter-spacing: -.01em; color: var(--lg-ink); }
.lg h2 .lg-no { color: var(--lg-green); margin-right: 6px; white-space: nowrap; }
.lg h3 { font-size: 17.5px; line-height: 1.35; margin: 22px 0 8px; font-weight: 700; color: var(--lg-ink); }
.lg p { margin: 0 0 12px; }
.lg strong, .lg b { font-weight: 700; }

.lg-sec { padding: 26px 0 10px; border-top: 1px solid var(--lg-line); }
.lg-sec:first-of-type { border-top: 0; }
.lg-up { display: inline-block; font-size: 13px; color: var(--lg-muted) !important; margin: 4px 0 0; text-decoration: none !important; }
.lg-up:hover { color: var(--lg-green-700) !important; }

/* „W skrócie” */
.lg-sum { background: var(--lg-mint); border: 1px solid var(--lg-mint-2); border-radius: 18px; padding: 18px 18px 8px; margin: 0 0 22px; }
.lg-sum h2 { font-size: 18px; margin: 0 0 10px; }
.lg-sum ul { list-style: none; padding: 0; margin: 0; }
.lg-sum li { position: relative; padding-left: 28px; margin: 0 0 10px; }
.lg-sum li::before { content: ''; position: absolute; left: 4px; top: .5em; width: 12px; height: 7px; border-left: 3px solid var(--lg-green); border-bottom: 3px solid var(--lg-green); transform: rotate(-45deg); }
.lg-sum__note { font-size: 13.5px; color: var(--lg-muted); margin: 6px 0 10px !important; }

/* spis treści */
.lg-toc { border: 1px solid var(--lg-line); border-radius: 18px; padding: 0; margin: 0 0 10px; background: #fff; }
.lg-toc summary { cursor: pointer; padding: 14px 18px; font-weight: 800; font-size: 16px; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.lg-toc summary::-webkit-details-marker { display: none; }
.lg-toc summary::after { content: ''; width: 9px; height: 9px; border-right: 2.5px solid var(--lg-muted); border-bottom: 2.5px solid var(--lg-muted); transform: rotate(45deg); margin: -4px 4px 0 12px; transition: transform .15s; }
.lg-toc[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.lg-toc ol { margin: 0; padding: 0 18px 14px 18px; list-style: none; }
.lg-toc li { padding: 5px 0; border-top: 1px dashed var(--lg-line); font-size: 15px; break-inside: avoid; }
.lg-toc li:first-child { border-top: 0; }
.lg-toc a { text-decoration: none; display: flex; gap: 8px; }
.lg-toc a:hover span:last-child { text-decoration: underline; }
.lg-toc .lg-no { color: var(--lg-green); font-weight: 700; min-width: 2.6em; }
@media (min-width: 700px) { .lg-toc ol { columns: 2; column-gap: 28px; } }

/* ustępy (1., 2., 3.) i punkty (1), 2), 3)) */
.lg ol.lg-ust { margin: 0 0 8px; padding: 0; list-style: none; counter-reset: lg-ust; }
.lg ol.lg-ust > li { counter-increment: lg-ust; position: relative; padding-left: 2.1em; margin: 0 0 10px; }
.lg ol.lg-ust > li::before { content: counter(lg-ust) "."; position: absolute; left: 0; top: 0; font-weight: 700; color: var(--lg-green-700); min-width: 1.6em; }
.lg ol.lg-pkt { margin: 6px 0 4px; padding: 0; list-style: none; counter-reset: lg-pkt; }
.lg ol.lg-pkt > li { counter-increment: lg-pkt; position: relative; padding-left: 2em; margin: 0 0 6px; }
.lg ol.lg-pkt > li::before { content: counter(lg-pkt) ")"; position: absolute; left: 0; top: 0; color: var(--lg-muted); font-weight: 600; }
.lg ul.lg-list { margin: 6px 0 10px; padding-left: 1.3em; }
.lg ul.lg-list li { margin: 0 0 6px; }

/* ramki */
.lg-box { border-radius: 14px; padding: 14px 16px; margin: 12px 0 14px; background: var(--lg-soft); border: 1px solid var(--lg-line); }
.lg-box p:last-child, .lg-box ul:last-child { margin-bottom: 0; }
.lg-box--info { background: var(--lg-mint); border-color: var(--lg-mint-2); }
.lg-box--warn { background: var(--lg-gold-50); border-color: #f6dc8e; }
.lg-box__t { font-weight: 800; margin: 0 0 6px !important; }

/* tabela (na telefonie wiersze jako karty) */
.lg-table { width: 100%; border-collapse: collapse; margin: 10px 0 16px; font-size: 15px; }
.lg-table th, .lg-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--lg-line); }
.lg-table thead th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--lg-muted); background: var(--lg-soft); }
.lg-table td.lg-num { white-space: nowrap; font-weight: 700; }
@media (max-width: 599px) {
  .lg-table thead { display: none; }
  .lg-table, .lg-table tbody, .lg-table tr, .lg-table td { display: block; width: 100%; }
  .lg-table tr { border: 1px solid var(--lg-line); border-radius: 12px; padding: 6px 4px; margin: 0 0 10px; }
  .lg-table td { border: 0; padding: 4px 10px; }
  .lg-table td[data-label]::before { content: attr(data-label) ": "; color: var(--lg-muted); font-weight: 600; }
}

/* cele przetwarzania (karty zamiast szerokiej tabeli) */
.lg-purp { border: 1px solid var(--lg-line); border-radius: 14px; padding: 14px 16px 6px; margin: 0 0 12px; }
.lg-purp h3 { margin: 0 0 8px; font-size: 16.5px; }
.lg-purp dl { margin: 0; }
.lg-purp dt { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--lg-muted); font-weight: 700; margin: 0; }
.lg-purp dd { margin: 0 0 10px; }

/* wzór formularza odstąpienia */
.lg-form { border: 2px dashed #b9c6bf; border-radius: 14px; padding: 18px; margin: 14px 0; background: #fff; }
.lg-form p { margin: 0 0 14px; }
.lg-form .lg-line { display: block; border-bottom: 1px solid #9aa8a0; min-height: 28px; margin: 4px 0 2px; }
.lg-form small { color: var(--lg-muted); }
.lg-print { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 700; font-size: 15px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--lg-green); background: #fff; color: var(--lg-green-700); cursor: pointer; }
.lg-print:hover { background: var(--lg-mint); }

.lg-fill { color: var(--lg-muted); font-style: italic; }

/* --- druk --- */
@media print {
  @page { margin: 16mm 14mm; }
  body.lg-body { background: #fff; }
  .lg { font-size: 10.5pt; line-height: 1.45; color: #000; }
  .lg-bar, .lg-foot, .lg-up, .lg-print, .lg-crumbs, .lg-noprint, #k2-chat-root, .k2c-launcher { display: none !important; }
  .lg-main { max-width: none; padding: 0; }
  .lg a { color: #000; text-decoration: none; }
  .lg-sum, .lg-box, .lg-purp, .lg-toc { background: #fff !important; border-color: #999 !important; }
  .lg-box, .lg-purp { break-inside: avoid; }
  .lg-toc summary::after { display: none; }
  .lg h2, .lg h3 { break-after: avoid; }
  .lg ol.lg-ust > li { break-inside: avoid; }
  .lg-sec { border-top-color: #bbb; padding-top: 14px; }
  .lg-sec--appendix { break-before: page; }
  .lg-table thead th { background: #fff; }
}
