/* ============================================================
   HANGJI — Legal stylesheet (privacy / terms-of-service)
   Light theme: warm white + deep ink + graphite headings.
   Loaded ONLY by legal pages; never style.css.
   ============================================================ */

:root {
  --paper: #F8F7F3;
  --ink: #22262E;
  --graphite: #3B4351;
  --graphite-deep: #2B323D;
  --stone: #C7B893;
  --mist: #E3E6EA;
  --line: #D6D2C6;
  --white: #FFFFFF;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
  background-color: var(--paper);
  font-family: "Georgia", "Times New Roman", serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--graphite);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

::selection {
  background: var(--graphite);
  color: var(--white);
}

/* ---------------- Legal page wrapper ---------------- */
.legal-page {
  min-height: 100vh;
}

/* ---------------- Legal header (div or header, never section) ---------------- */
.legal-header {
  background: linear-gradient(135deg, #3B4351 0%, #2B323D 100%);
  color: var(--white);
  padding: 64px 0 56px;
}

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

.legal-header .legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.legal-header .brand-mark {
  width: 16px;
  height: 16px;
  background-color: var(--white);
  border-radius: 2px;
}

.legal-header .brand-text {
  font-family: "Arial", "Helvetica", sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--white);
}

.legal-header h1 {
  font-family: "Arial", "Helvetica", sans-serif;
  font-size: 40px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--white);
  max-width: 780px;
  margin-bottom: 16px;
}

.legal-header .legal-updated {
  font-family: "Arial", "Helvetica", sans-serif;
  font-size: 14px;
  color: #DDE1E6;
  letter-spacing: 0.02em;
}

/* ---------------- Legal content ---------------- */
.legal-content {
  padding: 56px 0 72px;
}

/* Scope isolation: any stray section background inside legal content is neutralised */
.legal-page .legal-content section {
  background-color: transparent !important;
}

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

/* Back-to-home link */
.legal-home-link {
  display: inline-block;
  margin-bottom: 36px;
  font-family: "Arial", "Helvetica", sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  background-color: var(--graphite);
  border-radius: 999px;
  padding: 11px 22px;
  letter-spacing: 0.03em;
  transition: background-color 0.2s ease;
}

.legal-home-link:hover {
  background-color: var(--graphite-deep);
  text-decoration: none;
}

/* ---------------- Table of contents ---------------- */
.legal-toc {
  background-color: var(--mist);
  border: 1px solid var(--graphite);
  border-radius: 14px;
  padding: 28px 30px;
  margin-bottom: 48px;
}

.legal-toc h2 {
  font-family: "Arial", "Helvetica", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--graphite);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  border: none;
  padding: 0;
}

.legal-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.legal-toc li {
  margin: 0;
}

.legal-toc a {
  display: inline-block;
  font-family: "Arial", "Helvetica", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  padding: 4px 0;
  border-bottom: 1px dashed transparent;
}

.legal-toc a:hover {
  color: var(--graphite);
  border-bottom-color: var(--graphite);
  text-decoration: none;
}

.legal-toc a::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--graphite);
  margin-right: 12px;
  vertical-align: middle;
}

/* ---------------- Legal sections ---------------- */
.legal-content section.legal-section {
  margin-bottom: 44px;
}

.legal-content h2 {
  font-family: "Arial", "Helvetica", sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--graphite);
  border-bottom: 2px solid var(--stone);
  padding-bottom: 10px;
  margin-bottom: 18px;
  scroll-margin-top: 24px;
}

.legal-content h3 {
  font-family: "Arial", "Helvetica", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 22px;
  margin-bottom: 10px;
}

.legal-content p {
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 16px;
}

.legal-content ul {
  margin: 0 0 18px 0;
  padding: 0;
  list-style: none;
}

.legal-content ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  font-size: 16px;
  color: var(--ink);
}

.legal-content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 9px;
  height: 9px;
  background-color: var(--graphite);
}

.legal-content strong {
  color: var(--graphite);
  font-weight: 700;
}

/* Address block */
.legal-address {
  background-color: var(--stone);
  border: 1px solid var(--graphite);
  border-radius: 10px;
  padding: 18px 22px;
  font-size: 15px;
  color: var(--ink);
  margin: 18px 0;
}

/* ---------------- Legal footer ---------------- */
.legal-footer {
  background-color: var(--paper);
  border-top: 2px solid var(--graphite);
  padding: 34px 0;
}

.legal-footer .container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.legal-footer p {
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 10px;
}

.legal-footer a {
  color: var(--graphite);
  font-weight: 700;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 640px) {
  .legal-header {
    padding: 48px 0 42px;
  }

  .legal-header h1 {
    font-size: 30px;
  }

  .legal-content {
    padding: 40px 0 56px;
  }

  .legal-toc {
    padding: 22px;
  }
}
