/* ==========================================================
   Legal documents
   Shared by every game's privacy policy and terms of service.
   Global colors, fonts, navigation, and footer: styles.css
   ========================================================== */

.legal-hero {
  padding-top: 45px;
}

/* Legal support information should remain comfortable to read. */
.legal-page .footer-bottom {
  font-size: 0.75rem;
  line-height: 1.7;
}

.legal-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 60px;
  color: #a6a99f;
  font-size: 0.78rem;
}

.legal-breadcrumb a:hover {
  color: #d3ff6b;
}

.legal-hero h1 {
  margin: 18px 0 20px;
  color: #f4f4ed;
  font-size: clamp(2.8rem, 6.6vw, 5.5rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.legal-title-dot {
  color: #d3ff6b;
}

.legal-intro {
  max-width: 750px;
  margin-bottom: 24px;
  color: #b7b9b0;
  font-size: 1.02rem;
  line-height: 1.8;
}

.legal-date {
  color: #a6a99f;
  font-size: 0.8rem;
  line-height: 1.7;
}

.legal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 44px;
  border-bottom: 1px solid #343730;
}

.legal-tabs a {
  padding: 17px 0;
  border-bottom: 2px solid transparent;
  color: #a6a99f;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.legal-tabs a[aria-current="page"] {
  border-bottom-color: #d3ff6b;
  color: #d3ff6b;
}

.legal-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: start;
  gap: 70px;
  padding-top: 52px;
  padding-bottom: 85px;
}

.legal-sidebar {
  position: sticky;
  top: 112px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  padding-right: 14px;
  scrollbar-color: #4f5448 transparent;
  scrollbar-width: thin;
}

.legal-toc h2 {
  margin: 0 0 18px;
  color: #f4f4ed;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.legal-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-toc li {
  margin-bottom: 6px;
}

.legal-toc a {
  display: block;
  padding: 5px 0;
  color: #9fa398;
  font-size: 0.76rem;
  line-height: 1.55;
  text-decoration: none;
  transition: color 180ms ease;
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
  color: #d3ff6b;
}

.legal-back {
  display: inline-block;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #343730;
  color: #d3ff6b;
  font-size: 0.8rem;
}

.legal-content {
  min-width: 0;
  max-width: 800px;
  color: #b7b9b0;
  font-size: 0.92rem;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.legal-content > p:first-child {
  margin-top: 0;
}

.legal-content p {
  margin: 0 0 18px;
}

.legal-content strong,
.legal-content b {
  color: #edf0e7;
  font-weight: 600;
}

.legal-content a {
  color: #d3ff6b;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.legal-content a:hover {
  color: #e6ffaf;
}

.legal-content ul,
.legal-content ol {
  margin: 14px 0 22px;
  padding-left: 23px;
}

.legal-content li {
  margin-bottom: 8px;
  padding-left: 4px;
}

.legal-content li::marker {
  color: #b6cc91;
}

.legal-section {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid #343730;
  scroll-margin-top: 116px;
}

.legal-section h2 {
  margin: 0 0 18px;
  color: #f4f4ed;
  font-size: clamp(1.25rem, 2.3vw, 1.65rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.legal-section h3 {
  margin: 26px 0 12px;
  color: #e8ebdf;
  font-size: 1.04rem;
  font-weight: 500;
  line-height: 1.45;
}

/* Preserve the original summaries while giving them one shared appearance. */
.legal-content .highlights,
.legal-content .overview,
.legal-content .notice,
.legal-content .contact,
.legal-content .contact-box,
.legal-content .legal-metadata {
  margin: 0 0 24px;
  padding: 24px;
  border: 1px solid #3c4730;
  border-radius: 12px;
  background: #1b2116;
}

.legal-content .highlights > strong {
  display: block;
  margin-bottom: 10px;
}

.legal-content .highlights p:last-child,
.legal-content .overview p:last-child,
.legal-content .notice p:last-child,
.legal-content .contact p:last-child,
.legal-content .contact-box p:last-child,
.legal-content .legal-metadata p:last-child {
  margin-bottom: 0;
}

.legal-content .grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.legal-content .data-card {
  padding: 20px;
  border: 1px solid #343730;
  border-radius: 12px;
  background: #181b16;
}

.legal-content .data-card b,
.legal-content .data-card span {
  display: block;
}

.legal-content .data-card b {
  margin-bottom: 8px;
  color: #d3ff6b;
}

.legal-content .table-wrap {
  margin: 24px 0;
  overflow-x: auto;
}

.legal-content table {
  width: 100%;
  min-width: 570px;
  border-collapse: collapse;
  font-size: 0.8rem;
  line-height: 1.7;
}

.legal-content th,
.legal-content td {
  padding: 15px;
  border: 1px solid #3d4237;
  text-align: left;
  vertical-align: top;
}

.legal-content th {
  background: #252c1d;
  color: #edf3e2;
  font-weight: 600;
}

.legal-content tr:nth-child(even) td {
  background: #181b16;
}

.legal-content .fine,
.legal-content .small,
.legal-content .document-note,
.legal-content .updated,
.legal-content .date {
  color: #9fa398;
  font-size: 0.8rem;
}

.legal-content .term-label {
  color: #d3ff6b;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.legal-content .btn {
  display: inline-block;
  margin-top: 8px;
  padding: 12px 18px;
  border-radius: 6px;
  background: #d3ff6b;
  color: #101110;
  font-weight: 600;
  text-decoration: none;
}

.legal-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 64px;
  padding-top: 38px;
  border-top: 1px solid #343730;
}

.legal-help h2 {
  margin: 14px 0 12px;
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.legal-help p:not(.eyebrow) {
  color: #a6a99f;
  font-size: 0.88rem;
}

.legal-help > a {
  color: #d3ff6b;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.legal-help > a span {
  margin-left: 10px;
}

/* The two directories let players choose the document for their game. */
.legal-directory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-block: 40px 72px;
}

.legal-directory-card {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 140px;
  padding: 30px;
  border: 1px solid #343730;
  border-radius: 12px;
  background: #191b18;
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.legal-directory-card:hover {
  transform: translateY(-4px);
  border-color: #7f9950;
  background: #20261a;
}

.legal-directory-card img {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 14px;
  object-fit: cover;
}

.legal-directory-card h2 {
  margin-bottom: 9px;
  font-size: 1.45rem;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.legal-directory-card p {
  margin: 0;
  color: #a6a99f;
  font-size: 0.8rem;
}

.legal-directory-arrow {
  margin-left: auto;
  color: #d3ff6b;
  font-size: 1.7rem;
}

@media (max-width: 960px) {
  .legal-layout {
    grid-template-columns: 205px minmax(0, 1fr);
    gap: 35px;
  }
}

@media (max-width: 740px) {
  .legal-directory {
    grid-template-columns: 1fr;
    padding-block: 30px 48px;
  }

  .legal-breadcrumb {
    margin-bottom: 42px;
  }

  .legal-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 35px;
    padding-top: 32px;
    padding-bottom: 55px;
  }

  .legal-sidebar {
    position: static;
    max-height: none;
    padding: 24px;
    border: 1px solid #343730;
    border-radius: 12px;
  }

  .legal-toc ol {
    columns: 2;
    column-gap: 28px;
  }

  .legal-toc li {
    break-inside: avoid;
  }

  .legal-content .grid {
    grid-template-columns: 1fr;
  }

  .legal-help {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
}

@media (max-width: 440px) {
  .legal-directory-card {
    gap: 16px;
    min-height: 120px;
    padding: 22px;
  }

  .legal-directory-card img {
    width: 52px;
    height: 52px;
  }

  .legal-directory-card h2 {
    font-size: 1.22rem;
  }

  .legal-hero {
    padding-top: 26px;
  }

  .legal-breadcrumb {
    gap: 8px;
    font-size: 0.7rem;
  }

  .legal-tabs {
    gap: 24px;
  }

  .legal-toc ol {
    columns: 1;
  }

  .legal-content .highlights,
  .legal-content .overview,
  .legal-content .notice,
  .legal-content .contact,
  .legal-content .contact-box,
  .legal-content .legal-metadata {
    padding: 20px;
  }
}

@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .legal-breadcrumb,
  .legal-tabs,
  .legal-sidebar,
  .legal-help {
    display: none;
  }

  body.legal-page {
    background: #fff;
    color: #111;
  }

  .legal-hero,
  .legal-layout {
    width: 100%;
    padding: 0;
  }

  .legal-layout {
    display: block;
  }

  .legal-content {
    max-width: none;
    color: #222;
  }

  .legal-hero h1,
  .legal-content h2,
  .legal-content h3,
  .legal-content strong,
  .legal-content b,
  .legal-content a {
    color: #111;
  }

  .legal-content .table-wrap {
    overflow: visible;
  }

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

@media (prefers-reduced-motion: reduce) {
  .legal-directory-card {
    transition: none;
  }

  .legal-directory-card:hover {
    transform: none;
  }
}
