/* ============================================
   Legal pages (이용약관 · 개인정보처리방침)
   - tokens.css 필요
   ============================================ */

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

.legal-container {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-gutter);
}

/* ---- Header ---- */
.legal-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.legal-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.legal-brand {
  font-weight: 800;
  font-size: 1.125rem;
  color: var(--color-text);
  text-decoration: none;
}

.legal-nav {
  display: flex;
  gap: 1.25rem;
}

.legal-nav a {
  font-size: var(--text-small);
  color: var(--color-text-subtle);
  text-decoration: none;
}

.legal-nav a:hover {
  color: var(--color-text);
}

.legal-nav a[aria-current='page'] {
  color: var(--color-text);
  font-weight: 700;
}

/* ---- Document ---- */
.legal-doc {
  padding: 3rem 0 5rem;
}

.legal-doc h1 {
  font-size: var(--text-display);
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 0.5rem;
}

.legal-meta {
  color: var(--color-text-subtle);
  font-size: var(--text-small);
  margin: 0 0 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.legal-doc h2 {
  font-size: var(--text-heading);
  font-weight: 800;
  margin: 3rem 0 1rem;
}

.legal-doc h3 {
  font-size: var(--text-lead);
  font-weight: 700;
  margin: 2rem 0 0.75rem;
}

.legal-doc h4 {
  font-size: var(--text-base);
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
}

.legal-doc p {
  margin: 0.75rem 0;
}

.legal-doc ol,
.legal-doc ul {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.legal-doc li {
  margin: 0.375rem 0;
}

.legal-doc a {
  color: var(--blue-50);
  text-decoration: none;
}

.legal-doc a:hover {
  text-decoration: underline;
}

/* ---- Tables ---- */
.legal-doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: var(--text-small);
  display: block;
  overflow-x: auto;
}

.legal-doc th,
.legal-doc td {
  border: 1px solid var(--color-border);
  padding: 0.625rem 0.875rem;
  text-align: left;
  vertical-align: top;
  min-width: 6rem;
}

.legal-doc th {
  background: var(--color-bg-gray);
  font-weight: 700;
  white-space: nowrap;
}

/* ---- Blockquote (산정 예시 등) ---- */
.legal-doc blockquote {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  background: var(--color-bg-gray);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius-md);
}

.legal-doc blockquote p {
  margin: 0.375rem 0;
}

/* ---- Footer ---- */
.legal-footer {
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 0 3.5rem;
  color: var(--color-text-subtle);
  font-size: var(--text-tiny);
  line-height: 1.8;
}

.legal-footer a {
  color: inherit;
  text-decoration: none;
}

.legal-footer a:hover {
  color: var(--color-text);
}

.legal-copy {
  margin-top: 1rem;
  color: var(--gray-500);
}
