/* ============================================================
   RAGNAROK LEGAL STYLESHEET
   Loaded by privacy.html and terms-of-service.html
   Scope isolated to .legal-page so it never leaks elsewhere.
   Strong contrast: rune-bone text on longhouse-night ground.
   Fully opaque decorative colors only.
   ============================================================ */

.legal-page {
  margin: 0;
  background-color: #17130E;
  color: #F0E8D8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.legal-page a {
  color: #F0C29A;
  text-decoration: none;
}

.legal-page a:hover {
  color: #FFD9B0;
  text-decoration: underline;
}

/* ---- Scope isolation: section backgrounds stay transparent ---- */
.legal-page .legal-content section {
  background-color: transparent !important;
}

/* ---- Legal header ---- */
.legal-head {
  background-color: #241E17;
  border-bottom: 4px solid #B65A38;
  padding: 22px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.legal-brand {
  font-family: "Arial Narrow", Arial, sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.14em;
  color: #F0E8D8;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.legal-brand::before {
  content: "";
  width: 14px;
  height: 16px;
  background-color: #3E6E71;
  border-radius: 8px 8px 2px 2px;
  display: inline-block;
}

.legal-home {
  font-family: "Arial Narrow", Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  color: #E8DCC2;
  background-color: transparent;
  border: 2px solid #5D6066;
  padding: 10px 16px;
}

.legal-home:hover {
  border-color: #B65A38;
  color: #FFD9B0;
  text-decoration: none;
}

/* ---- Main content ---- */
.legal-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 24px 20px;
}

.legal-title {
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 2.5rem;
  line-height: 1.12;
  color: #F0E8D8;
  margin: 0 0 10px;
  font-weight: 700;
}

.legal-updated {
  font-family: "Arial Narrow", Arial, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.82rem;
  color: #B65A38;
  margin: 0 0 28px;
}

.legal-intro {
  color: #F0E8D8;
  font-size: 1.12rem;
  margin: 0 0 36px;
  border-left: 5px solid #B65A38;
  padding-left: 20px;
}

/* ---- Table of contents ---- */
.legal-toc {
  background-color: #241E17;
  border-top: 4px solid #B65A38;
  padding: 28px;
  margin: 0 0 48px;
}

.legal-toc-title {
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #B65A38;
  margin: 0 0 18px;
}

.legal-toc-list {
  margin: 0;
  padding: 0 0 0 20px;
  columns: 2;
  column-gap: 30px;
}

.legal-toc-list li {
  break-inside: avoid;
  margin-bottom: 8px;
}

.legal-toc-list a {
  color: #E8DCC2;
  font-size: 0.98rem;
}

.legal-toc-list a:hover {
  color: #FFD9B0;
}

/* ---- Sections ---- */
.legal-content section {
  margin: 0 0 42px;
  padding-top: 12px;
  border-top: 1px solid #3E2B20;
}

.legal-h2 {
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: #F0E8D8;
  margin: 0 0 16px;
  padding-top: 8px;
  position: relative;
}

.legal-h2::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 14px;
  width: 9px;
  height: 9px;
  background-color: #3E6E71;
  border: 2px solid #B65A38;
  transform: rotate(45deg);
}

.legal-p {
  color: #F0E8D8;
  margin: 0 0 16px;
  text-align: justify;
}

/* ---- Footer ---- */
.legal-foot {
  background-color: #241E17;
  border-top: 4px solid #5D6066;
  margin-top: 20px;
  padding: 0 0 20px;
}

.legal-foot-plate {
  background-color: #5D6066;
  padding: 24px;
}

.legal-foot-org {
  font-family: "Arial Narrow", Arial, sans-serif;
  font-weight: 700;
  color: #17130E;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  margin: 0 0 6px;
  text-align: center;
}

.legal-foot-addr {
  color: #17130E;
  margin: 0 0 8px;
  text-align: center;
}

.legal-foot-contact {
  color: #17130E;
  margin: 0 0 4px;
  text-align: center;
  font-weight: 700;
}

.legal-foot-contact a {
  color: #17130E;
}

.legal-foot-contact a:hover {
  color: #241E17;
}

.legal-foot-sp {
  padding: 0 8px;
  color: #3A2E22;
}

.legal-foot-copy {
  color: #E8DCC2;
  text-align: center;
  padding: 22px 24px 0;
  margin: 0;
  line-height: 1.9;
}

.legal-foot-copy a {
  color: #F0C29A;
}

.legal-foot-copy a:hover {
  color: #FFD9B0;
}

/* ---- Responsive ---- */
@media (max-width: 720px) {
  .legal-toc-list {
    columns: 1;
  }
  .legal-content {
    padding-top: 32px;
  }
  .legal-title {
    font-size: 2rem;
  }
  .legal-h2 {
    font-size: 1.4rem;
  }
}
