*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: #111827;
  background: #f8fafc;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Hide the page only while a pending English swap is applied, so Polish (the
   source language) never flashes and English users don't see a Polish flash.
   The class is added by an inline <head> script and removed by legal-i18n.js
   (with a timeout fail-safe), so the page is always revealed. */
html.i18n-cloak body {
  visibility: hidden;
}

a {
  color: #047857;
  font-weight: 760;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.legal-shell {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.legal-nav,
.legal-card,
.legal-footer {
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
}

.legal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}

.legal-nav img {
  height: 2.4rem;
  width: auto;
}

.legal-nav__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.legal-nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  color: #475569;
  font-size: 0.9rem;
}

/* PL | EN switcher — mirrors the landing's `.lang-switch`, shared key
   `mscanner:lang`. */
.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #fff;
  flex: 0 0 auto;
}

.lang-switch__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #6b7280;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.lang-switch__btn + .lang-switch__btn {
  border-left: 1px solid #e5e7eb;
}

.lang-switch__btn:hover {
  color: #111827;
  background: #f8fafc;
}

.lang-switch__btn.is-active {
  background: #111827;
  color: #fff;
}

.legal-card {
  border-radius: 1.4rem;
  padding: clamp(1.3rem, 4vw, 3rem);
}

.legal-eyebrow {
  color: #059669;
  font-size: 0.78rem;
  font-weight: 860;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

h2 {
  margin: 2rem 0 0.55rem;
  font-size: 1.2rem;
  line-height: 1.25;
}

p,
li {
  color: #475569;
}

ul {
  padding-left: 1.2rem;
}

code {
  border: 1px solid #e5e7eb;
  border-radius: 0.45rem;
  background: #f8fafc;
  color: #0f172a;
  padding: 0.1rem 0.32rem;
  font-size: 0.92em;
}

.legal-meta {
  color: #64748b;
  font-size: 0.92rem;
  margin-bottom: 2rem;
}

.legal-box {
  border: 1px solid #d1fae5;
  border-radius: 1rem;
  background: #ecfdf5;
  padding: 1rem;
  margin: 1.25rem 0;
}

.legal-box p {
  margin: 0;
}

.legal-footer {
  border-radius: 1rem;
  padding: 1rem;
  margin-top: 1rem;
  color: #64748b;
  font-size: 0.88rem;
}

@media (max-width: 640px) {
  .legal-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .legal-nav__actions {
    width: 100%;
    justify-content: space-between;
  }

  .legal-nav__links {
    width: auto;
  }

  h1 {
    overflow-wrap: anywhere;
  }
}
