/* Dokumenty: „Odpowiedzialny rozwój” i strony prawne (src/lib/dokument.ts, main.dok).
   Założenie: dokument czyta się jak stronę serwisu, nie jak regulamin. Jedna kolumna tekstu, ale treść
   złożona w komponenty: metryczka pod tytułem, numerowane sekcje, spis z bieżącą pozycją, wiersze pojęć,
   panel tezy, rozwijane pytania. Kolory i krój z arek.css (granat #0B1A2E, niebieski #2B4C9B, Inter). */
html .dok { --d-granat: #0B1A2E; --d-niebieski: #2B4C9B; --d-tekst: #2A3850; --d-szary: #55617A; --d-linia: #E3E8F0; --d-tlo: #F4F7FC; --d-jasny: #EEF1F7; color: var(--d-tekst); }
html .dok .dok-wnetrze { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* tytuł i metryczka */
html .dok .dok-hero { padding: clamp(40px, 6vw, 80px) 0 clamp(28px, 4vw, 48px); background: linear-gradient(180deg, var(--d-jasny) 0%, #FFFFFF 100%); }
html .dok .dok-hero .dok-wnetrze { display: flex; flex-direction: column; gap: 18px; }
html .dok .dok-nad { display: flex; align-items: center; gap: 12px; margin: 6px 0 0; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--d-niebieski); }
html .dok .dok-nad::before { content: ""; flex: none; width: 28px; height: 2px; background: currentColor; }
html .dok h1 { margin: 0; max-width: 22ch; font-size: clamp(34px, 4.4vw, 58px); font-weight: 800; line-height: 1.05; letter-spacing: -.035em; color: var(--d-granat); text-wrap: balance; }
html .dok .dok-lead { margin: 0; max-width: 760px; font-size: clamp(17px, 1.35vw, 19.5px); line-height: 1.6; color: var(--d-tekst); }
html .dok .dok-metryka { display: flex; flex-wrap: wrap; gap: 0; margin: 14px 0 0; padding: 0; border-top: 1px solid #CBD4E3; font-size: inherit; }
html .dok .dok-metryka > div { display: flex; flex-direction: column; gap: 4px; padding: 16px 40px 0 0; margin-right: 40px; border-right: 1px solid var(--d-linia); }
html .dok .dok-metryka > div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
html .dok .dok-metryka dt { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--d-szary); }
html .dok .dok-metryka dd { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.01em; color: var(--d-granat); font-variant-numeric: tabular-nums; }

/* układ: spis po lewej, treść po prawej */
html .dok .dok-uklad { display: grid; grid-template-columns: 250px minmax(0, 780px); gap: clamp(40px, 6vw, 104px); padding-top: clamp(28px, 4vw, 56px); padding-bottom: clamp(56px, 8vw, 104px); }
html .dok .dok-uklad.dok-bez-spisu { grid-template-columns: minmax(0, 780px); }
html .dok .dok-spis { position: sticky; top: 104px; align-self: start; max-height: calc(100vh - 128px); overflow-y: auto; scrollbar-width: thin; padding: 0 0 4px; }
html .dok .dok-spis-t { margin: 0 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--d-szary); }
html .dok .dok-spis ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-left: 2px solid var(--d-linia); }
html .dok .dok-spis a { display: flex; gap: 10px; margin-left: -2px; padding: 7px 8px 7px 14px; border-left: 2px solid transparent; font-size: 14px; line-height: 1.4; color: var(--d-szary); text-decoration: none; transition: color .15s, border-color .15s; }
html .dok .dok-spis a span { flex: none; font-size: 12px; line-height: 1.65; font-weight: 600; font-variant-numeric: tabular-nums; color: #8A96AC; }
html .dok .dok-spis a:hover { color: var(--d-niebieski); }
html .dok .dok-spis a[aria-current] { border-left-color: var(--d-niebieski); color: var(--d-granat); font-weight: 700; }
html .dok .dok-spis a[aria-current] span { color: var(--d-niebieski); }
html .dok .dok-spis a:focus-visible, html .dok .dok-linki a:focus-visible, html .dok .dok-dalsze a:focus-visible { outline: 3px solid var(--d-niebieski); outline-offset: 2px; border-radius: 6px; }

/* treść */
html .dok .dok-tresc { min-width: 0; display: flex; flex-direction: column; font-size: 17.5px; line-height: 1.7; }
html .dok .dok-tresc p, html .dok .dok-tresc ul, html .dok .dok-tresc ol, html .dok .dok-tresc dl, html .dok .dok-tresc blockquote { margin: 0; }
html .dok .dok-wstep, html .dok .dok-sekcja { display: flex; flex-direction: column; gap: 18px; }
html .dok .dok-wstep { padding-bottom: clamp(28px, 4vw, 44px); }
html .dok .dok-wstep > p:first-child { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.55; color: var(--d-granat); }
html .dok .dok-sekcja { padding: clamp(32px, 4.5vw, 52px) 0; border-top: 1px solid var(--d-linia); }
html .dok .dok-tresc > .dok-sekcja:first-child { padding-top: 0; border-top: 0; }
html .dok .dok-nr { font-size: 13px; font-weight: 700; letter-spacing: .12em; line-height: 1; color: var(--d-niebieski); font-variant-numeric: tabular-nums; }
html .dok .dok-sekcja > h2 { margin: -6px 0 6px; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.14; font-weight: 800; letter-spacing: -.025em; color: var(--d-granat); text-wrap: balance; scroll-margin-top: 128px; }
html .dok .dok-tresc h3 { margin: 14px 0 0; font-size: 20px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; color: var(--d-granat); scroll-margin-top: 104px; }
html .dok .dok-tresc h4 { margin: 6px 0 0; font-size: 17.5px; font-weight: 700; color: var(--d-granat); }
html .dok .dok-tresc strong { color: var(--d-granat); }
html .dok .dok-tresc a:not([class]) { color: var(--d-niebieski); text-underline-offset: 3px; }

/* zwykłe listy: kreska zamiast kropki */
html .dok .dok-sekcja > ul:not([class]), html .dok .dok-wstep > ul:not([class]), html .dok .dok-tresc li > ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
html .dok .dok-tresc ul:not([class]) > li { position: relative; padding-left: 26px; }
html .dok .dok-tresc ul:not([class]) > li::before { content: ""; position: absolute; left: 0; top: .82em; width: 12px; height: 2px; background: var(--d-niebieski); }
html .dok .dok-tresc li > ul { margin-top: 10px; }
html .dok .dok-tresc ol { padding-left: 24px; display: flex; flex-direction: column; gap: 10px; }
html .dok .dok-tresc ol > li::marker { font-weight: 700; color: var(--d-niebieski); }

/* wiersze pojęć („**Pojęcie** – opis”) i pary z tabel dwukolumnowych */
html .dok .dok-terminy, html .dok .dok-pary { list-style: none; padding: 0; display: flex; flex-direction: column; font-size: 16.5px; line-height: 1.6; border-bottom: 1px solid var(--d-linia); }
html .dok .dok-terminy > li, html .dok .dok-pary > div { display: grid; grid-template-columns: minmax(0, 230px) minmax(0, 1fr); gap: 6px 32px; padding: 16px 0; border-top: 1px solid var(--d-linia); }
html .dok .dok-terminy b, html .dok .dok-pary dt { font-size: 16.5px; font-weight: 700; line-height: 1.4; color: var(--d-granat); }
html .dok .dok-pary dd { margin: 0; font-weight: 400; color: var(--d-tekst); }

/* lista dokumentów (tabela z linkami w pierwszej kolumnie) */
html .dok .dok-linki { list-style: none; padding: 0; display: flex; flex-direction: column; border-bottom: 1px solid var(--d-linia); }
html .dok .dok-tresc .dok-linki a { display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; align-items: center; gap: 20px; padding: 18px 12px 18px 0; border-top: 1px solid var(--d-linia); color: var(--d-granat); text-decoration: none; transition: padding .2s, background .2s; }
html .dok .dok-linki-t { font-size: 19px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
html .dok .dok-linki-o { font-size: 13.5px; color: var(--d-szary); text-align: right; }
html .dok .dok-linki a > span:last-child { color: var(--d-niebieski); transition: transform .2s; }
html .dok .dok-linki a:hover { padding-left: 12px; background: var(--d-tlo); }
html .dok .dok-linki a:hover .dok-linki-t { color: var(--d-niebieski); }
html .dok .dok-linki a:hover > span:last-child { transform: translateX(4px); }

/* teza: jedyny ciemny element w treści */
html .dok .dok-teza { margin: 10px 0; padding: clamp(24px, 3vw, 36px) clamp(24px, 3.4vw, 40px); border: 0; border-radius: 18px; background: var(--d-granat); color: #DCE4F2; font-size: clamp(18px, 1.5vw, 20.5px); line-height: 1.55; }
html .dok .dok-teza p + p { margin-top: 12px; }
html .dok .dok-teza strong { color: #FFFFFF; }
html .dok .dok-teza a { color: #FFFFFF; }

/* link „dalej” pod sekcją */
html .dok .dok-dalej { font-size: 16px; font-weight: 600; color: var(--d-szary); }
html .dok .dok-dalej a { color: var(--d-niebieski); text-decoration: none; }
html .dok .dok-dalej a:hover { text-decoration: underline; text-underline-offset: 3px; }
html .dok .dok-dalej > span { color: var(--d-niebieski); }

/* tabele wielokolumnowe */
html .dok .pp-tabela { margin: 4px 0; border-color: var(--d-linia); border-radius: 14px; }
html .dok .pp-tabela table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
html .dok .pp-tabela th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--d-szary); background: var(--d-tlo); }
html .dok .pp-tabela td { padding: 14px 16px; border-top: 1px solid var(--d-linia); vertical-align: top; }
html .dok .pp-tabela td:first-child { font-weight: 700; color: var(--d-granat); }

/* pytania */
html .dok .dok-faq { display: flex; flex-direction: column; border-top: 1px solid var(--d-linia); }
html .dok .dok-faq .faq-pyt > summary { cursor: pointer; list-style: none; min-height: 64px; padding: 16px 0; }
html .dok .dok-faq .faq-pyt > summary::-webkit-details-marker { display: none; }
html .dok .dok-faq .faq-pyt > summary h3 { display: flex; gap: 16px; margin: 0; font-size: 17.5px; font-weight: 700; line-height: 1.4; letter-spacing: 0; }
html .dok .dok-pyt-nr { flex: none; min-width: 22px; font-size: 13px; line-height: 1.9; font-weight: 700; color: #8A96AC; font-variant-numeric: tabular-nums; }
html .dok .dok-faq .faq-pyt > summary > span { transition: transform .2s; }
html .dok .dok-faq .faq-pyt[open] > summary > span { transform: rotate(45deg); }
html .dok .dok-faq .faq-pyt[open] > summary h3 { color: var(--d-niebieski); }
html .dok .dok-faq .faq-odp { padding: 0 0 22px 38px; max-width: none; font-size: 16.5px; }

/* nota o dokumencie */
html .dok .dok-nota { margin-top: 8px; padding: 22px 24px; border-radius: 14px; background: var(--d-tlo); display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; line-height: 1.6; color: var(--d-szary); }
html .dok .dok-nota-t { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--d-granat); }

/* sąsiednie dokumenty */
html .dok .dok-dalsze { padding: 0 0 clamp(56px, 8vw, 96px); }
html .dok .dok-dalsze .dok-wnetrze { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 16px; }
html .dok .dok-dalsze a { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 24px 56px 24px 26px; border: 1px solid var(--d-linia); border-radius: 16px; background: #FFFFFF; color: var(--d-granat); text-decoration: none; transition: border-color .2s, box-shadow .2s; }
html .dok .dok-dalsze-et { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--d-szary); }
html .dok .dok-dalsze-t { font-size: 20px; font-weight: 800; line-height: 1.25; letter-spacing: -.015em; text-wrap: balance; }
html .dok .dok-dalsze a > span:last-child { position: absolute; right: 24px; bottom: 24px; color: var(--d-niebieski); transition: transform .2s; }
html .dok .dok-dalsze a:hover { border-color: var(--d-niebieski); box-shadow: 0 10px 28px rgba(11, 26, 46, .08); }
html .dok .dok-dalsze a:hover > span:last-child { transform: translateX(4px); }

@media (max-width: 1020px) {
  html .dok .dok-uklad { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  html .dok .dok-spis { position: static; max-height: none; padding: 18px 20px; border: 1px solid var(--d-linia); border-radius: 14px; }
  html .dok .dok-spis ol { border-left: 0; }
  html .dok .dok-spis a { margin-left: 0; padding-left: 0; border-left: 0; }
  html .dok .dok-spis a[aria-current] { font-weight: 400; color: var(--d-szary); }
  html .dok .dok-spis a[aria-current] span { color: #8A96AC; }
}
@media (max-width: 640px) {
  html .dok .dok-wnetrze { padding: 0 16px; }
  html .dok .dok-tresc { font-size: 16.5px; }
  html .dok .dok-metryka { display: grid; grid-template-columns: 1fr 1fr; }
  html .dok .dok-metryka > div { margin: 0; padding: 14px 12px 0 0; border-right: 0; }
  html .dok .dok-terminy > li, html .dok .dok-pary > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  html .dok .dok-linki a { grid-template-columns: minmax(0, 1fr) 20px; gap: 4px 12px; }
  html .dok .dok-linki-o { grid-column: 1; grid-row: 2; text-align: left; }
  html .dok .dok-linki a > span:last-child { grid-column: 2; grid-row: 1 / 3; }
  html .dok .dok-faq .faq-odp { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) { html .dok * { transition: none !important; } }
@media print {
  html .dok .dok-spis, html .dok .dok-dalsze, html .dok .lpa-kontakt { display: none; }
  html .dok .dok-uklad { display: block; }
  html .dok .dok-teza { background: none; color: inherit; border: 1px solid #000; }
  html .dok .dok-teza strong { color: inherit; }
  html .dok details.faq-pyt > .faq-odp { display: block; }
}
