@font-face {
  font-family: "Playfair Display";
  src: url("/assets/playfair-display-latin.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/source-serif-4-latin.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: light;
  color: #262522;
  background: #f6efe2;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background-color: #f6efe2;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  background-image: url("/assets/paper-grain.png");
  background-size: 320px 320px;
  opacity: 0.045;
  mix-blend-mode: multiply;
}

a {
  color: #286047;
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 3px solid #c95e4b;
  outline-offset: 3px;
}

.legal-header {
  border-bottom: 1px solid #ddd1bf;
  background: rgba(246, 239, 226, 0.94);
}

.legal-header__inner {
  display: flex;
  width: min(100% - 2rem, 1100px);
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #262522;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.18rem;
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.legal-header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 0.8rem 1.1rem;
}

.legal-header nav a {
  color: #5f5a50;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.legal-header nav a:hover {
  color: #286047;
  text-decoration: underline;
}

.legal-layout {
  display: grid;
  width: min(100% - 2rem, 1100px);
  grid-template-columns: 220px minmax(0, 760px);
  gap: 4rem;
  margin: 0 auto;
  padding: 5rem 0 6rem;
}

.legal-toc {
  position: sticky;
  top: 1.5rem;
  align-self: start;
  padding-top: 0.3rem;
}

.legal-toc strong {
  display: block;
  margin-bottom: 0.75rem;
  color: #6f685b;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.legal-toc a {
  display: block;
  margin-bottom: 0.5rem;
  color: #6f685b;
  font-size: 0.82rem;
  text-decoration: none;
}

.legal-toc a:hover {
  color: #286047;
  text-decoration: underline;
}

.legal-content {
  min-width: 0;
}

.legal-content h1,
.legal-content h2,
.legal-content h3 {
  color: #262522;
  font-family: "Playfair Display", Georgia, serif;
  letter-spacing: 0;
  text-wrap: balance;
}

.legal-content h1 {
  margin: 0 0 0.8rem;
  font-size: 4.6rem;
  line-height: 1;
}

.legal-content h2 {
  margin: 3.2rem 0 0.85rem;
  padding-top: 0.3rem;
  font-size: 1.85rem;
  line-height: 1.15;
}

.legal-content h3 {
  margin: 1.8rem 0 0.5rem;
  font-size: 1.2rem;
}

.legal-content p,
.legal-content li {
  color: #4d4941;
}

.legal-content li {
  margin-bottom: 0.55rem;
  padding-left: 0.25rem;
}

.legal-content ul,
.legal-content ol {
  padding-left: 1.35rem;
}

.effective {
  margin-bottom: 2.2rem;
  color: #6f685b;
  font-size: 0.82rem;
  font-weight: 700;
}

.legal-lead {
  color: #3b3b38 !important;
  font-size: 1.12rem;
  line-height: 1.7;
}

.notice {
  margin: 1.7rem 0;
  padding: 1rem 1.1rem;
  background: #fbf7ef;
  border: 1px solid #ddd1bf;
  border-left: 4px solid #3f7658;
  border-radius: 6px;
}

.notice--warning {
  border-left-color: #c69b3c;
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.5rem 0;
}

.legal-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.9rem;
  color: #fff;
  background: #286047;
  border: 1px solid #286047;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

.legal-button--secondary {
  color: #262522;
  background: transparent;
  border-color: #cfc2ad;
}

.bgg-block {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 1.2rem;
  background: #fbf7ef;
  border: 1px solid #ddd1bf;
  border-radius: 8px;
}

.bgg-block img {
  width: 180px;
  max-width: 100%;
}

.legal-footer {
  color: #cfc8ae;
  background: #07100f;
}

.legal-footer__inner {
  display: flex;
  width: min(100% - 2rem, 1100px);
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-inline: auto;
  padding: 2rem 0;
  font-size: 0.76rem;
}

.legal-footer p {
  margin: 0;
}

.legal-footer a {
  color: #e7d8bb;
}

@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; }
  :root {
    color: #eadfc8;
    background: #07100f;
  }

  body {
    background-color: #07100f;
  }

  body::before {
    opacity: 0.025;
    mix-blend-mode: screen;
  }

  .legal-header {
    background: rgba(7, 16, 15, 0.95);
    border-color: #2b352f;
  }

  .brand,
  .legal-content h1,
  .legal-content h2,
  .legal-content h3 {
    color: #eadfc8;
  }

  .legal-header nav a,
  .legal-toc strong,
  .legal-toc a,
  .effective,
  .legal-content p,
  .legal-content li {
    color: #aea993;
  }

  .legal-lead {
    color: #cfc8ae !important;
  }

  a {
    color: #92be75;
  }

  .notice,
  .bgg-block {
    background: #13201d;
    border-color: #2b352f;
  }

  .legal-button--secondary {
    color: #eadfc8;
    border-color: #48574e;
  }
}

@media (max-width: 760px) {
  .legal-content h1 {
    overflow-wrap: anywhere;
    font-size: 1.875rem;
  }

  .legal-header__inner {
    align-items: start;
    flex-direction: column;
    padding: 0.75rem 0;
  }

  .legal-header nav {
    justify-content: start;
  }

  .legal-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-top: 3rem;
  }

  .legal-toc {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.8rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ddd1bf;
  }

  .legal-toc strong {
    width: 100%;
  }

  .legal-toc a {
    margin: 0;
  }

  .legal-footer__inner {
    align-items: start;
    flex-direction: column;
  }
}
