/* Legal pages (privacy policy, terms): a dark header in the site's style, then readable text with a table of
   contents. Light and dark like the site (system setting or the theme chosen on the site, `aix-theme`).
   One language at a time: html[data-lang] shows the matching [lang] blocks (legal.js; both without JS). */
:root {
  color-scheme: light dark;
  --bg: #fff; --bg-2: #f4f6fa; --ink: #0e1220; --ink-2: #4a5168; --ink-3: #737b92; --line: #e3e7ef; --accent: #0a6e9c;
  --d-bg: #0b0e17; --d-text: #eef1f7; --d-text-2: #a3abc0; --d-line: rgba(255, 255, 255, .1);
  --grad: linear-gradient(90deg, #30b1e6 0%, #42ade1 22%, #59a8dc 36%, #82a1d4 54%, #b486bd 66%, #dc71ac 80%, #ff4fa3 100%);
  --wrap: 1120px; --gutter: clamp(16px, 4.5vw, 48px); --r: 22px;
  --mono: "Space Mono", ui-monospace, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #090b12; --bg-2: #10131d; --ink: #eef1f7; --ink-2: #a9b1c5; --ink-3: #7d859b; --line: #232838; --accent: #5cc3ee; }
}
:root[data-theme="dark"] { --bg: #090b12; --bg-2: #10131d; --ink: #eef1f7; --ink-2: #a9b1c5; --ink-3: #7d859b; --line: #232838; --accent: #5cc3ee; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 300 1rem/1.75 "Outfit", system-ui, sans-serif; }
/* only our own blocks: third-party content (the Cookiebot declaration renders with lang="en") is never hidden */
html[data-lang="pl"] :is(.lg-hero, .lg-toc, .lg-foot, .legal > article) [lang="en"], html[data-lang="pl"] .legal > article[lang="en"],
html[data-lang="en"] :is(.lg-hero, .lg-toc, .lg-foot, .legal > article) [lang="pl"], html[data-lang="en"] .legal > article[lang="pl"] { display: none !important; }

/* ---------- header ---------- */
.lg-hero { position: relative; overflow: hidden; background: var(--d-bg); color: var(--d-text); }
.lg-hero::before { /* soft brand glow */
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, rgba(48, 177, 230, .22), rgba(220, 113, 172, .12) 55%, transparent 75%);
  pointer-events: none;
}
.lg-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--grad); opacity: .8; }
.lg-bar, .lg-head, .lg-body { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); position: relative; }
.lg-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 22px; }
.lg-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--d-text); text-decoration: none; margin-right: auto; }
.lg-brand img { height: 24px; width: auto; display: block; }
.lg-brand b { font: 700 1.05rem/1 "Poppins", sans-serif; }
.lg-brand span { font: 300 1.05rem/1 "Poppins", sans-serif; }
.lg-links { display: flex; align-items: center; gap: 18px; font-size: .92rem; }
.lg-links a { color: var(--d-text-2); text-decoration: none; }
.lg-links a:hover { color: var(--d-text); }
.lg-lang { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--d-line); border-radius: 999px; }
.lg-lang button { border: 0; background: none; color: var(--d-text-2); font: 600 .78rem/1 "Outfit", sans-serif; letter-spacing: .06em; padding: 7px 11px; border-radius: 999px; cursor: pointer; }
.lg-lang button[aria-pressed="true"] { background: rgba(255, 255, 255, .1); color: var(--d-text); }
.lg-head { padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(44px, 7vw, 84px); }
.lg-kicker { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 22px; font: 400 .78rem/1.4 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--d-text-2); }
.lg-kicker::before { content: ""; width: 28px; height: 2px; border-radius: 2px; background: var(--grad); }
.lg-head h1 { margin: 0; max-width: 16ch; font: 700 clamp(2.4rem, 6vw, 4.4rem)/1.02 "Outfit", sans-serif; letter-spacing: -.035em; }
.lg-head h1 em { font: italic 400 1em/1 "Playfair Display", serif; letter-spacing: -.01em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.lg-lead { margin: 22px 0 0; max-width: 54ch; color: var(--d-text-2); font-size: clamp(1.02rem, 1.4vw, 1.15rem); }
.lg-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.lg-meta li { padding: 7px 12px; border: 1px solid var(--d-line); border-radius: 999px; font-size: .82rem; color: var(--d-text-2); }

/* ---------- content ---------- */
.lg-body { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); padding-top: clamp(36px, 5vw, 56px); padding-bottom: 80px; }
.lg-toc { position: sticky; top: 24px; align-self: start; font-size: .9rem; }
.lg-toc p { margin: 0 0 10px; font: 400 .72rem/1.4 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.lg-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.lg-toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; line-height: 1.4; }
.lg-toc a:hover { color: var(--ink); }
.lg-toc a.on { color: var(--ink); border-left-color: #82a1d4; font-weight: 500; }
.legal { min-width: 0; max-width: 760px; }
html:not([data-lang]) .legal article + article { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); } /* both languages only without JS */
.legal > section { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.legal h2 { font: 600 1.25rem/1.3 "Outfit", sans-serif; letter-spacing: -.01em; margin: 44px 0 12px; scroll-margin-top: 24px; }
.legal article > h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--ink); }
.legal a { color: var(--accent); }
.legal ol, .legal ul { padding-left: 1.3rem; }
.legal li { margin: 6px 0; }
.legal li::marker { color: var(--ink-3); }
.legal table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .93rem; display: block; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.legal tr:last-child td { border-bottom: 0; }
.legal th { font-weight: 600; background: var(--bg-2); }
.legal code { font: .88em var(--mono); background: var(--bg-2); padding: 1px 5px; border-radius: 5px; }
.legal-meta { color: var(--ink-2); margin: 0 0 16px; font-size: .95rem; } /* only without legal.js (old markup) */
.lg-foot { border-top: 1px solid var(--line); color: var(--ink-3); font-size: .88rem; }
.lg-foot div { max-width: var(--wrap); margin: 0 auto; padding: 24px var(--gutter); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.lg-foot a { color: var(--ink-2); }

@media (max-width: 900px) {
  .lg-body { grid-template-columns: 1fr; }
  .lg-toc { position: static; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); }
  .lg-toc ol { columns: 2; column-gap: 18px; border: 0; }
  .lg-toc a { padding-left: 0; border: 0; }
}
@media (max-width: 560px) { .lg-toc ol { columns: 1; } .lg-links .lg-hide-s { display: none; } }
@media print { .lg-hero { background: none; color: #000; } .lg-hero::before, .lg-bar, .lg-toc { display: none; } .lg-body { display: block; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
