/* =========================================================
   Justcos Technology Co., Limited — legal stylesheet
   Shared by privacy.html and terms-of-service.html
   Light olive theme · olive #7C8A3D · deep olive #4A5122
   ========================================================= */

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

html {
  scroll-behavior: smooth;
}

.legal-page {
  background-color: #FAFAF3;
  color: #26291A;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.legal-page a {
  color: #7C8A3D;
}

.legal-page a:hover {
  color: #4A5122;
}

/* ---------- Header ---------- */

.legal-header {
  background-color: #4A5122;
  color: #FFFFFF;
  padding: 48px 0 44px;
  border-bottom: 1px solid #7C8A3D;
}

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

.legal-brand {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #D3D9A8;
  text-decoration: none;
  margin-bottom: 22px;
}

.legal-brand:hover {
  color: #FFFFFF;
}

.legal-header h1 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #FFFFFF;
  line-height: 1.12;
  margin-bottom: 14px;
}

.legal-header .legal-meta {
  font-size: 16px;
  color: #D3D9A8;
}

/* ---------- Content ---------- */

.legal-content {
  padding: 48px 0 24px;
}

.legal-content .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* scope isolation: never paint legal sections */
.legal-page .legal-content section {
  background-color: transparent !important;
}

/* table of contents */

.toc {
  background-color: #FFFFFF;
  border: 1px solid #E6E7D6;
  border-radius: 12px;
  padding: 28px 30px;
  margin-bottom: 48px;
}

.toc h2 {
  font-size: 18px;
  font-weight: 700;
  color: #4A5122;
  margin-bottom: 16px;
}

.toc ol {
  list-style: none;
  counter-reset: toc;
  columns: 2;
  column-gap: 36px;
}

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

.toc a {
  color: #4A5122;
  text-decoration: none;
  font-size: 15px;
}

.toc a:hover {
  color: #7C8A3D;
  text-decoration: underline;
}

/* sections */

.legal-content section {
  margin-bottom: 44px;
}

.legal-content h2 {
  font-size: 24px;
  font-weight: 800;
  color: #4A5122;
  margin-bottom: 14px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.legal-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: #26291A;
  margin: 22px 0 8px;
}

.legal-content p {
  font-size: 16px;
  color: #26291A;
  margin-bottom: 14px;
}

.legal-content ul {
  margin: 0 0 16px 22px;
}

.legal-content li {
  font-size: 16px;
  color: #26291A;
  margin-bottom: 8px;
}

.legal-content a {
  color: #7C8A3D;
}

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

/* ---------- Footer ---------- */

.legal-footer {
  border-top: 2px solid #7C8A3D;
  background-color: #FAFAF3;
  margin-top: 24px;
  padding: 24px 0;
}

.legal-footer .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

.legal-footer p {
  font-size: 14px;
  color: #4A5122;
}

.legal-footer a {
  color: #7C8A3D;
  text-decoration: none;
}

.legal-footer a:hover {
  color: #4A5122;
}

/* ---------- Responsive ---------- */

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

  .toc ol {
    columns: 1;
  }
}
