/* Legal pages (privacy-policy.html, terms-of-use.html, EN + KO).
   Long-form reading: one readable column, a contents list beside it on wide screens. */

.legal__head { max-width: 46rem; margin-bottom: var(--sp-40); }
.legal__head .h1 { margin-top: var(--sp-16); }

.legal__grid {
  display: grid;
  grid-template-columns: minmax(12rem, 16rem) minmax(0, 42rem);
  gap: var(--sp-56);
  align-items: start;
}

/* Contents */
.legal__toc { position: sticky; top: 6rem; max-height: calc(100vh - 8rem); overflow: auto; }
.legal__toc summary {
  font-size: var(--fs-label); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--_theme---page--text-muted); cursor: pointer; list-style: none; margin-bottom: var(--sp-12);
}
.legal__toc summary::-webkit-details-marker { display: none; }
.legal__toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-8); }
.legal__toc a {
  font-size: var(--fs-body-xs); line-height: 1.35; color: var(--color--grey-800); text-decoration: none;
}
.legal__toc a:hover { color: var(--_theme---page--text); text-decoration: underline; }

/* Body text */
.legal__body { font-size: var(--fs-body-s); line-height: 1.65; color: var(--color--grey-800); overflow-wrap: anywhere; }
.legal__body h2 {
  font-size: var(--fs-h5); font-weight: 500; line-height: 1.25; letter-spacing: -0.01em;
  color: var(--_theme---page--text); margin: var(--sp-40) 0 var(--sp-12);
  scroll-margin-top: 6rem;
}
.legal__body h2:first-child { margin-top: 0; }
.legal__body h3 {
  font-size: var(--fs-body-m); font-weight: 500; color: var(--_theme---page--text);
  margin: var(--sp-24) 0 var(--sp-8);
}
.legal__body p { margin: 0 0 var(--sp-12); }
.legal__body ol, .legal__body ul { margin: 0 0 var(--sp-16); padding-left: 1.4em; }
.legal__body li { margin-bottom: var(--sp-8); }
.legal__body li > ol, .legal__body li > ul { margin: var(--sp-8) 0 0; }
.legal__body strong { font-weight: 500; color: var(--_theme---page--text); }
.legal__body a { color: inherit; text-decoration: underline; }

/* Tables (consignees, overseas transfers, statutory retention). Wide tables
   scroll sideways inside their box, never the page. */
.legal__table { overflow-x: auto; margin: var(--sp-8) 0 var(--sp-24); border: 1px solid var(--color--grey-100); border-radius: 12px; }
.legal__table table { width: 100%; border-collapse: collapse; font-size: var(--fs-body-xs); line-height: 1.5; }
.legal__table table:has(th:nth-child(4)) { min-width: 48rem; }
.legal__table th, .legal__table td { padding: 0.7em 0.9em; text-align: start; vertical-align: top; }
.legal__table th { font-weight: 500; color: var(--_theme---page--text); background: var(--color--grey-50); white-space: nowrap; }
.legal__table td { border-top: 1px solid var(--color--grey-100); overflow-wrap: normal; }
:lang(ko) .legal__table td { word-break: keep-all; }

@media (max-width: 960px) {
  .legal__grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-32); }
  .legal__toc { position: static; max-height: none; border: 1px solid var(--color--grey-100); border-radius: 14px; padding: var(--sp-16); }
  .legal__toc summary { margin-bottom: 0; }
  .legal__toc details[open] summary { margin-bottom: var(--sp-12); }
}
