/* ================================================================
   LEGAL PAGES — shared stylesheet (privacy.html, terms-of-service.html)
   These legal pages load ONLY this file, so everything (reset, background,
   typography, header, content, footer) is defined here on flat opaque hex.
   Palette echoes the MARKET NIGHT theme: parchment reading sheet on a
   midnight shell with MARKET JADE accents.
   ================================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-size: 16px;
  margin: 0;
  line-height: 1.75;
  font-family: Georgia, "Times New Roman", serif;
  background: #1C2125;
  color: #262B2B;
  -webkit-font-smoothing: antialiased;
}

/* Scope-isolation: content sections never inherit a stray panel colour */
.legal-content section {
  background: transparent;
  border: 0;
}
.legal-content section {
  background: transparent !important;
}

::selection {
  background: #3F9B77;
  color: #FFFFFF;
}

a {
  color: #20865B;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-family: "Trebuchet MS", Verdana, sans-serif;
  color: #163224;
  font-weight: 700;
  line-height: 1.25;
}

/* ---------------- Skip link ---------------- */
.legal-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #3F9B77;
  color: #FFFFFF;
  padding: 10px 16px;
  z-index: 40;
}
.legal-skip:focus {
  left: 0;
  top: 0;
  position: absolute;
}

/* ---------------- Header band (solid, strong contrast) ---------------- */
.legal-header {
  background: #1C2125;
  border-bottom: 4px solid #3F9B77;
}
.legal-header {
  position: relative;
  z-index: 2;
}
.legal-header .legal-shell {
  padding-top: 18px;
  padding-bottom: 18px;
  max-width: 1080px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.legal-brand {
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-weight: 700;
  color: #F1ECDD;
  font-size: 1.1rem;
  letter-spacing: 1px;
  text-decoration: none;
  padding: 5px 12px;
  background: #3F9B77;
  color: #0B1D15;
  border-radius: 3px;
}
.legal-brand:hover {
  background: #4DAE86;
  color: #07100C;
  text-decoration: none;
}
.legal-header-tag {
  color: #9FD7C0;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ---------------- Main reading shell ---------------- */
.legal-content {
  background: #E9E4D5;
}
.legal-content > .legal-shell {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

/* ---------------- Title block ---------------- */
.legal-title-block {
  background: #F7F3E7;
  border-left: 8px solid #3F9B77;
  padding: 40px 42px 34px;
  margin-top: 44px;
  border-radius: 6px;
  box-shadow: 0 10px 24px #C3BCA7;
}
.legal-kicker {
  color: #1B5C3D;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 0.85rem;
  font-weight: 700;
}
.legal-title-block h1 {
  font-size: 2rem;
  color: #123324;
  margin: 10px 0 12px;
  line-height: 1.2;
}
.legal-updated {
  color: #5C6358;
  font-style: italic;
  font-size: 0.95rem;
}
.legal-intro {
  font-size: 1.1rem;
  color: #333B36;
  line-height: 1.85;
  padding: 30px 6px 6px;
}

/* ---------------- Table of contents ---------------- */
.legal-toc {
  background: #F7F3E7;
  border: 1px solid #CDC4AE;
  border-radius: 6px;
  padding: 28px 34px;
  margin: 34px 0 20px;
}
.legal-toc h2 {
  font-size: 1.35rem;
  color: #163A26;
  margin-bottom: 14px;
  border-bottom: 2px solid #3F9B77;
  display: inline-block;
  padding-bottom: 4px;
}
.legal-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 40px;
}
.legal-toc li {
  margin-bottom: 8px;
  break-inside: avoid;
}
.legal-toc a {
  color: #27663F;
  font-size: 1rem;
  line-height: 1.5;
}
.legal-toc a:before {
  content: "§ ";
  color: #3F9B77;
  font-weight: 700;
}
@media (max-width: 640px) {
  .legal-toc ol {
    columns: 1;
  }
}

/* ---------------- Content sections ---------------- */
.legal-content section {
  background: transparent;
  padding: 8px 0 6px;
}
.legal-content section h2 {
  font-size: 1.5rem;
  color: #143726;
  padding-top: 34px;
  margin-bottom: 12px;
  scroll-margin-top: 84px;
  scroll-margin-bottom: 40px;
}
.legal-content section p {
  color: #2C3330;
  font-size: 1.02rem;
  margin-bottom: 14px;
}
.legal-content section h2 + p {
  font-weight: normal;
}
.anchor-back {
  margin-top: 6px;
}
.anchor-back a {
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.85rem;
  letter-spacing: .5px;
  color: #2A6B47;
  font-weight: 700;
}
.anchor-back a:before {
  content: "↑ ";
  color: #3F9B77;
}
.anchor-back a:hover {
  text-decoration: none;
  color: #1B5236;
}

/* strong contrast guarantee for long body text */
.legal-content section p,
.legal-content section li {
  color: #23292A;
}

/* ---------------- Footer plaque ---------------- */
.legal-footer {
  background: #F7F3E7;
  border-top: 4px solid #3F9B77;
  border-left: 8px solid #3F9B77;
  border-radius: 0 6px 6px 0;
  padding: 30px 34px;
  margin-top: 46px;
}
.legal-footer p {
  color: #39504a;
  line-height: 1.9;
  font-size: 1rem;
}
.legal-footer p:first-child {
  color: #23322E;
  font-family: "Trebuchet MS", Verdana, sans-serif;
}
.legal-footer a {
  color: #25633F;
  font-weight: 700;
  margin-right: 12px;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.95rem;
}

/* responsive gutter tightening */
@media (max-width: 620px) {
  .legal-header .legal-shell {
    padding: 14px 16px;
  }
  .legal-content > .legal-shell {
    padding: 0 16px 30px;
  }
  .legal-title-block,
  .legal-toc,
  .legal-footer {
    padding: 20px 18px;
  }
  .legal-title-block {
    margin-top: 26px;
  }
}
