/* Strony prawne: regulamin, polityka prywatności, polityka cookies */

.back { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: .94rem; color: var(--text); padding: 8px 12px; border-radius: 8px; }
.back:hover { color: var(--accent-text); background: var(--soft); }
.back .ic { width: 18px; height: 18px; }

.legal { padding-block: clamp(40px, 6vw, 88px) clamp(64px, 8vw, 120px); }
.legal-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }

.legal-side { position: sticky; top: 96px; font-size: .92rem; max-height: calc(100vh - 120px); overflow: auto; padding-right: 8px; }
.legal-side .eyebrow { margin-bottom: 14px; }
.doc-switch { display: grid; gap: 4px; margin-bottom: 32px; }
.doc-switch a { padding: 9px 12px; border-radius: 8px; color: var(--text); font-weight: 500; }
.doc-switch a:hover { background: var(--soft); }
.doc-switch a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.side-title { font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; padding-left: 12px; }
.toc { display: grid; gap: 2px; counter-reset: none; }
.toc a { display: block; padding: 6px 12px; border-left: 2px solid var(--line); color: var(--muted); line-height: 1.4; }
.toc a:hover { color: var(--accent-text); border-color: var(--accent-text); }

.legal-body { max-width: 760px; }
.legal-body h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 20px; }
.legal-body > p:first-of-type { padding: 16px 20px; margin-bottom: 40px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--heading); font-size: .94rem; }
.legal-body h2 { font-size: 1.4rem; margin: 56px 0 18px; padding-top: 28px; border-top: 1px solid var(--line); scroll-margin-top: 96px; }
.legal-body h3 { font-size: 1.05rem; margin: 32px 0 10px; color: var(--heading); }
.legal-body p { margin-bottom: 14px; line-height: 1.75; }
.legal-body a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.legal-body ol { padding-left: 1.6em; margin-bottom: 14px; list-style: decimal; }
.legal-body ol > li { padding-left: 6px; margin-bottom: 10px; line-height: 1.7; }
.legal-body ol > li::marker { color: var(--accent-text); font-weight: 600; }
.legal-body ul { margin: 10px 0 4px; padding-left: 1.2em; list-style: disc; }
.legal-body ul li { margin-bottom: 6px; padding-left: 4px; }
.legal-body ul li::marker { color: #9AA8BD; }
.legal-body mark { background: #FFF3C4; color: #5B4500; padding: 1px 6px; border-radius: 4px; font-weight: 500; }

.legal-footer { border-top: 1px solid var(--line); background: var(--soft); padding-block: 28px; font-size: .88rem; color: var(--muted); }
.legal-footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; }
.legal-links a:hover, .legal-links .foot-link:hover { color: var(--accent-text); }
.legal-links [aria-current="page"] { color: var(--heading); font-weight: 600; }

@media (max-width: 900px) {
  .legal-grid { grid-template-columns: 1fr; }
  .legal-side { position: static; max-height: none; padding: 0; border-bottom: 1px solid var(--line); padding-bottom: 24px; }
  .toc { display: none; }
  .side-title { display: none; }
  .doc-switch { margin-bottom: 0; grid-auto-flow: row; }
}
@media print {
  .site-header, .legal-side, .legal-footer, .cookie-banner, .cookie-dialog { display: none !important; }
  .legal-grid { display: block; }
  .legal-body mark { background: none; color: inherit; }
}

/* przełącznik motywu w nagłówku stron prawnych */
.legal-page .bar-right { display: flex; align-items: center; gap: 8px; }
:root[data-theme="dark"] .legal-body mark { background: rgba(255,208,70,.16); color: #FFD966; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .legal-body mark { background: rgba(255,208,70,.16); color: #FFD966; } }

/* strona 404 */
.nf { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 64px 0; position: relative; overflow: hidden; }
.nf::before { content: ""; position: absolute; inset: -10% 0 auto 0; height: 70%; pointer-events: none; background: radial-gradient(40% 50% at 50% 30%, rgba(81,103,245,.16), transparent 70%), radial-gradient(30% 40% at 70% 40%, rgba(4,195,247,.12), transparent 70%); filter: blur(10px); }
.nf-in { position: relative; text-align: center; max-width: 560px; margin-inline: auto; }
.nf .nf-code { font-size: clamp(6rem, 22vw, 11rem); font-weight: 700; letter-spacing: -0.06em; line-height: 1; margin: 0 auto 8px; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nf h1 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin-bottom: 14px; }
.nf p { color: var(--muted); margin: 0 auto 32px; }
.nf .actions { justify-content: center; margin-bottom: 0; }


/* strona „Jak pracujemy" */
.legal-body > p.how-lead { padding: 0; margin-bottom: 20px; background: none; border: 0; border-radius: 0; font-size: 1.12rem; line-height: 1.7; color: var(--text); }
.how-note { padding: 14px 18px; margin-bottom: 36px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-sm); font-size: .9rem; color: var(--muted); }
.table-wrap { overflow-x: auto; margin: 18px 0 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
table.kv { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 620px; }
table.kv th, table.kv td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); line-height: 1.55; }
table.kv thead th { font-family: var(--mono); font-size: .7rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--soft); }
table.kv tbody th { color: var(--heading); font-weight: 600; white-space: nowrap; }
table.kv tbody tr:last-child > * { border-bottom: 0; }
.legal-body ul.chips-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; margin: 16px 0 4px; }
.legal-body ul.chips-list li { margin: 0; padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--heading); font-size: .9rem; }
.how-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 56px; padding: 28px 32px; border-radius: var(--r-lg); background: var(--inv-bg); color: #fff; }
.how-cta h3 { color: #fff; margin: 0 0 6px; }
.how-cta p { margin: 0; color: var(--inv-muted); max-width: 46ch; }
.how-cta .btn { text-decoration: none; color: #fff; }
