/* BuyNest — dokumenty prawne (GitHub Pages) */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Pacifico&display=swap');

:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --surface-muted: #eee8de;
  --text: #1f2933;
  --text-secondary: #4b5563;
  --border: #d4cfc4;
  --primary: #2d6a4f;
  --primary-dark: #1b4332;
  --accent: #8b5e34;
  --accent-soft: #c9a227;
  --danger: #b64034;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(27, 67, 50, 0.08);
  --content-max: 52rem;
  --layout-max: 76rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--primary-dark);
}

.site-header {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.25rem 1rem;
}

.site-header__inner {
  max-width: var(--layout-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.site-logo:hover {
  color: inherit;
}

.site-logo img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.site-logo__wordmark {
  font-family: 'Pacifico', cursive;
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--primary-dark);
  line-height: 1.1;
}

.site-tagline {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  max-width: 36rem;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.75rem;
  padding: 0;
  list-style: none;
}

.legal-nav a {
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary-dark);
}

.legal-nav a:hover,
.legal-nav a[aria-current='page'] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg);
}

.lang-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  padding: 0;
  list-style: none;
}

.lang-switch a {
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text-secondary);
}

.lang-switch a:hover {
  color: var(--primary-dark);
  border-color: var(--primary);
}

.lang-switch a[aria-current='true'] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--primary-dark);
}

.layout {
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 960px) {
  .layout--with-toc {
    grid-template-columns: 14.5rem minmax(0, 1fr);
    align-items: start;
    gap: 2.25rem;
  }
}

.toc {
  position: sticky;
  top: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow);
}

.toc__title {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.toc ol {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.875rem;
}

.toc li {
  margin-bottom: 0.35rem;
}

.toc a {
  text-decoration: none;
  color: var(--text-secondary);
}

.toc a:hover {
  color: var(--primary);
}

.doc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2.25rem 2.5rem;
  box-shadow: var(--shadow);
  max-width: var(--content-max);
}

@media (min-width: 960px) {
  .doc-card {
    max-width: none;
  }
}

.doc-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.25;
}

.doc-meta {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.doc-meta strong {
  color: var(--text);
}

.lead {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--surface-muted);
}

.doc-card h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-dark);
  scroll-margin-top: 1rem;
}

.doc-card h2:first-of-type {
  margin-top: 0;
}

.doc-card h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.doc-card p {
  margin: 0 0 0.9rem;
}

.doc-card ul,
.doc-card ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

.doc-card li {
  margin-bottom: 0.45rem;
}

.doc-card li > ul {
  margin-top: 0.35rem;
  margin-bottom: 0.35rem;
}

.note {
  background: var(--surface-muted);
  border-left: 4px solid var(--accent-soft);
  border-radius: 0 10px 10px 0;
  padding: 0.9rem 1.1rem;
  margin: 1rem 0 1.25rem;
  font-size: 0.975rem;
}

.note--info {
  border-left-color: var(--primary);
}

.contact-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin: 1rem 0;
}

.contact-box a {
  font-weight: 600;
}

.site-footer {
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.site-footer a {
  font-weight: 600;
}

@media (max-width: 959px) {
  .toc {
    position: static;
    order: -1;
  }

  .layout--with-toc {
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .doc-card {
    padding: 1.35rem 1.1rem 1.75rem;
  }

  .site-logo__wordmark {
    font-size: 1.45rem;
  }
}
