/* Legal and contact pages of mojpociag.pl — the landing page's palette, type and controls, set for reading. */

@font-face {
  font-family: "Encode Sans";
  src: url("/assets/fonts/encode-sans-variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #e6e9ee;
  --surface: #ffffff;
  --ink: #0f141c;
  --muted: #4d5562; /* darker than the landing's #6b7480: body-size hints need 4.5:1 on the surface */
  --line: #d3d8df;
  --accent: #f3a712;
  --link-line: #c98700;
  --gap-bg: #ffe1f0;
  --gap-ink: #5c003a;
  --gap-line: #c0007a;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0f16;
  --surface: #141b26;
  --ink: #f0f3f7;
  --muted: #a3adbb;
  --line: #2a3546;
  --accent: #f5b301;
  --link-line: #f5b301;
  --gap-bg: #4a0030;
  --gap-ink: #ffd1ea;
  --gap-line: #ff4fb0;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: "Encode Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: break-word;
  text-decoration-skip-ink: none; /* Encode Sans: skipping ink breaks underlines at spaces, dots and "@" */
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  background: var(--accent);
  color: #0f141c;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
}
.skip:focus { top: 12px; outline: 2px solid var(--ink); outline-offset: 2px; }

/* top bar — as on the landing page */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px clamp(16px, 5vw, 52px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--ink);
  text-decoration: none;
  padding: 6px 2px;
}
.brand .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px 1px color-mix(in srgb, var(--accent) 75%, transparent);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-moon { display: none; }
:root[data-theme="dark"] .theme-sun { display: none; }
:root[data-theme="dark"] .theme-moon { display: block; }

a:focus-visible,
button:focus-visible,
summary:focus-visible,
.brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* the document */
main {
  flex: 1;
  width: 100%;
  max-width: 50rem;
  margin: 0 auto;
  padding: 0 16px 48px;
}
main:focus { outline: none; }
.doc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(20px, 5vw, 48px);
}
.doc h1 {
  margin: 0 0 18px;
  font-size: clamp(26px, 5vw, 36px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.doc h2 {
  margin: 2.2em 0 0.6em;
  font-size: clamp(20px, 3.6vw, 24px);
  line-height: 1.25;
  font-weight: 750;
  scroll-margin-top: 16px;
}
.doc h2::before {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  margin-bottom: 12px;
  border-radius: 2px;
  background: var(--accent);
}
.doc h3 {
  margin: 1.8em 0 0.5em;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  scroll-margin-top: 16px;
}
.doc h4 { margin: 0 0 8px; font-size: 16px; font-weight: 700; }
.doc p { margin: 0 0 1em; }
.doc ul,
.doc ol { margin: 0 0 1em; padding-left: 1.4em; }
.doc li { margin: 0.35em 0; }
.doc li > p { margin: 0.35em 0; }
.doc li > ul,
.doc li > ol { margin: 0.35em 0; }
.doc a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--link-line);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.doc a:hover { text-decoration-color: var(--ink); }
.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--bg);
  border-radius: 5px;
  padding: 0.1em 0.35em;
}
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.2em;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.doc th,
.doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc th { background: var(--bg); font-weight: 700; }
.doc tbody tr:last-child td { border-bottom: 0; }
/* phones: each row becomes a card, each cell carries its column name — no sideways scrolling */
@media (max-width: 600px) {
  .table-wrap { border: 0; border-radius: 0; overflow: visible; }
  .doc table,
  .doc tbody,
  .doc tr,
  .doc td { display: block; width: 100%; }
  .doc thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .doc tbody tr { border: 1px solid var(--line); border-radius: 12px; margin: 0 0 12px; padding: 6px 0; }
  .doc td,
  .doc tbody tr:last-child td { border: 0; padding: 6px 14px; }
  .doc td::before {
    content: attr(data-label);
    content: attr(data-label) / "";
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
  }
}

.toc {
  margin: 0 0 8px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}
.doc .toc h2 { margin: 0 0 6px; font-size: 15px; }
.doc .toc h2::before { display: none; }
.toc ul { list-style: none; margin: 0; padding: 0; columns: 2 18rem; column-gap: 24px; }
.toc li { margin: 0 0 0.45em; break-inside: avoid; }

/* footer — as on the landing page */
.site-footer {
  text-align: center;
  padding: 8px 16px clamp(22px, 5vh, 40px);
  color: var(--muted);
  font-size: 14px;
}
.site-footer ul {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
}
.site-footer a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  display: inline-block;
  padding: 6px 2px;
}
.site-footer a[aria-current="page"] { font-weight: 700; text-decoration-color: var(--link-line); text-decoration-thickness: 2px; }
.byline { margin: 0; font-size: 12px; }

/* preview build only: unresolved placeholders, impossible to miss */
.preview-banner {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0;
  padding: 10px 16px;
  background: var(--gap-line);
  color: #ffffff;
  font-weight: 700;
  text-align: center;
}
mark.gap {
  background: var(--gap-bg);
  color: var(--gap-ink);
  outline: 2px dashed var(--gap-line);
  outline-offset: 1px;
  border-radius: 4px;
  padding: 0 4px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
mark.gap .gap-kind { font-weight: 800; letter-spacing: 0.04em; }

@media (prefers-reduced-motion: reduce) {
  .brand .dot { animation: none; }
}
@media print {
  .site-header .icon-btn,
  .skip,
  .toc { display: none; }
  body { background: #ffffff; }
  .doc { border: 0; padding: 0; }
}
