
.dok__head { padding-block: clamp(40px, 1.5rem + 3vw, 80px) clamp(36px, 1.25rem + 2.5vw, 64px); }
.dok__back {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: clamp(20px, 1rem + 1vw, 32px);
  font-size: var(--fs-small); font-weight: 600; color: var(--accent-text);
}
.dok__back::before { content: "‹"; font-size: 1.25em; line-height: 0; transform: translateY(-0.04em); transition: transform var(--dur) var(--ease); }
.dok__back:hover::before { transform: translate(-3px, -0.04em); }
.dok__head h1 {
  max-width: 16ch;
  font-family: var(--font-display); font-size: var(--fs-h2); font-weight: 600;
  line-height: 1.05; letter-spacing: -0.025em; color: var(--fg);
  text-wrap: balance;
}
.dok__head .doc__meta,
.dok__head .doc__intro {
  max-width: 46rem; margin-top: 20px;
  font-size: var(--fs-small); line-height: 1.6; color: var(--fg-2);
  text-wrap: pretty;
}
.dok__head .doc__intro { margin-top: 10px; }

.dok__grid {
  display: grid; grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  padding-block: clamp(32px, 1.5rem + 2vw, 64px) clamp(72px, 3rem + 4vw, 128px);
}
@media (min-width: 1000px) {
  .dok__grid { grid-template-columns: 240px minmax(0, 1fr); gap: 80px; }
}

.dok__toc {
  align-self: start;
  padding: 20px 22px; border-radius: var(--r-lg); background: var(--mist);
}
.dok__toc-tytul { margin-bottom: 8px; font-size: var(--fs-fine); font-weight: 600; color: var(--fg-3); }
.dok__toc li + li { margin-top: 2px; }
.dok__toc a {
  display: block; padding: 5px 0;
  font-size: var(--fs-small); font-weight: 500; line-height: 1.4; color: var(--fg-2);
  text-wrap: pretty;
  transition: color var(--dur) var(--ease);
}
.dok__toc a:hover { color: var(--accent-text); }
@media (min-width: 1000px) {
  .dok__toc {
    position: sticky; top: calc(var(--nav-h) + 32px);
    max-height: calc(100vh - var(--nav-h) - 64px); overflow-y: auto;
    padding: 0 0 0 18px; border-radius: 0; background: none;
    border-left: 1px solid var(--line);
  }
}

.dok__body {
  min-width: 0;
  font-size: var(--fs-body); line-height: 1.7; color: var(--fg-2);
  overflow-wrap: break-word;
}
.dok__body h2 {
  margin: 56px 0 20px; padding-top: 40px; border-top: 1px solid var(--line);
  font-family: var(--font-display); font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
  font-weight: 600; line-height: 1.25; letter-spacing: -0.012em; color: var(--fg);
  text-wrap: balance;
  scroll-margin-top: calc(var(--nav-h) + 16px);
}
.dok__body > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.dok__body p { margin-block: 0 14px; }
.dok__body strong { font-weight: 600; color: var(--fg); }
.dok__body sup { font-size: 0.7em; line-height: 0; }
.dok__body a {
  color: var(--accent-text);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  transition: text-decoration-color var(--dur) var(--ease);
}
.dok__body a:hover { text-decoration-color: currentColor; }

.dok__body ol.law { counter-reset: ust; }
.dok__body ol.law > li {
  counter-increment: ust; position: relative;
  padding-left: 36px; margin-bottom: 14px;
}
.dok__body ol.law > li::before {
  content: counter(ust) "."; position: absolute; left: 0; top: 0;
  min-width: 24px;
  font-weight: 600; color: var(--fg-3); font-variant-numeric: tabular-nums;
}
.dok__body ol.abc { margin-top: 8px; }
.dok__body ol.abc > li { position: relative; padding-left: 28px; margin-bottom: 6px; }
.dok__body ol.abc > li::before {
  content: attr(data-l) ")"; position: absolute; left: 0; top: 0;
  font-weight: 600; color: var(--fg-3);
}
.dok__body ul { margin-block: 0 16px; }
.dok__body ul > li { position: relative; padding-left: 22px; margin-bottom: 10px; }
.dok__body ul > li::before {
  content: ""; position: absolute; left: 4px; top: 0.72em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--fg-3);
}

.dok__body #formularz-odstapienia ~ ul {
  margin-top: 16px; padding: 22px 26px; border-radius: var(--r-lg); background: var(--mist);
}
.dok__body #formularz-odstapienia ~ ul > li:last-child { margin-bottom: 0; }

@media (max-width: 560px) {
  .dok__body { font-size: 1rem; line-height: 1.65; }
  .dok__body h2 { margin-top: 44px; padding-top: 32px; }
  .dok__body ol.law > li { padding-left: 30px; }
  .dok__body #formularz-odstapienia ~ ul { padding: 18px 18px; }
}

:root { --nav-h: 0px; }
