/* ============================================================
   HoYauChien — legal.css
   Shared stylesheet for privacy.html and terms-of-service.html
   Legal pages load ONLY this file. It defines its own page
   background and text colors with strong contrast.
   ============================================================ */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-size: 16px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background-color: #1E2124;
  color: #F1EBDD;
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: #9A6BB5;
  text-decoration: none;
}

a:hover {
  color: #F1EBDD;
  text-decoration: underline;
}

/* ---------- solid legal header with strong h1 contrast ---------- */

.legal-header {
  background-color: #131518;
  border-bottom: 3px solid #9A6BB5;
  padding: 28px 0 24px 0;
  display: block;
}

.legal-header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.legal-brand {
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #9A6BB5;
  font-weight: 700;
  margin: 0 0 6px 0;
}

.legal-header h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 36px;
  line-height: 1.18;
  color: #FDFCF8;
  margin: 0 0 10px 0;
}

.legal-header-sub {
  font-size: 14px;
  color: #F1EBDD;
  margin: 0;
}

.legal-back {
  display: inline-block;
  margin-top: 14px;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: #9A6BB5;
  border-bottom: 2px solid #9A6BB5;
  padding-bottom: 2px;
}

.legal-back:hover {
  color: #F1EBDD;
  border-color: #F1EBDD;
  text-decoration: none;
}

/* ---------- scope isolation for legal sections ---------- */

.legal-content section {
  background-color: transparent !important;
}

/* ---------- layout ---------- */

.legal-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.legal-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 34px 24px 56px 24px;
}

.legal-content h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  color: #FDFCF8;
  margin: 34px 0 12px 0;
  padding-top: 18px;
  border-top: 2px solid #454B52;
}

.legal-content h2:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.legal-content h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  color: #9A6BB5;
  margin: 20px 0 8px 0;
}

.legal-content p {
  margin: 0 0 14px 0;
  color: #F1EBDD;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 16px 0;
  padding-left: 24px;
  color: #F1EBDD;
}

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

.legal-content strong {
  color: #FDFCF8;
}

/* ---------- table of contents ---------- */

.legal-toc {
  max-width: 900px;
  margin: 0 auto;
  padding: 22px 24px;
  background-color: #2C3136;
  border-left: 7px solid #9A6BB5;
  border-radius: 4px;
  box-shadow: 0 6px 0 #131518;
}

.toc-heading {
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #9A6BB5;
  font-weight: 700;
  margin: 0 0 12px 0;
}

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

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

.toc-list a {
  color: #F1EBDD;
  font-size: 14px;
}

.toc-list a:hover {
  color: #9A6BB5;
}

/* ---------- callout ---------- */

.legal-note {
  background-color: #FDFCF8;
  color: #1E2124;
  border-left: 7px solid #C4594B;
  border-radius: 4px;
  padding: 18px 20px;
  margin: 22px 0;
}

.legal-note p {
  color: #1E2124;
  margin: 0;
  font-size: 15px;
}

.legal-note strong {
  color: #1E2124;
}

/* ---------- footer ---------- */

.legal-footer {
  background-color: #131518;
  border-top: 3px solid #454B52;
  padding: 30px 0 34px 0;
}

.legal-footer-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  color: #F1EBDD;
}

.legal-footer a {
  color: #9A6BB5;
}

.legal-footer-copy {
  color: #F1EBDD;
}

@media (max-width: 620px) {
  .legal-header h1 {
    font-size: 27px;
  }

  .toc-list {
    columns: 1;
  }
}
