/*
 * Styles for v3/legal_page.html — the shared template behind /privacy/ and /terms-of-use/.
 */

body:has(.legal-page) .v3-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 0;
}

.legal-page {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: calc(2 * var(--space-xl));
  width: 100%;
  padding: 80px 10% 43px 10%;
}

.legal-page__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
}

.legal-page__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-large);
  align-items: flex-start;
  width: 100%;
}

.legal-page__title {
  margin: 0;
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
}

.legal-page__last-updated {
  margin: 0;
  padding: 0;
  color: var(--color-text-secondary);
  font-family: var(--font-sans);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-default);
  letter-spacing: var(--letter-spacing-tight);
}

.legal-page__body {
  width: 100%;
  color: var(--color-text-secondary);
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-loose);
  letter-spacing: var(--letter-spacing-tight);
}

.legal-page__body h2 {
  margin: var(--space-xl) 0 var(--space-large);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: var(--font-size-large);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
}

.legal-page__body > :first-child {
  margin-top: 0;
}

.legal-page__body p {
  color: var(--color-text-secondary);
  margin: 0 0 1em 0;
  padding: 0;
}

.legal-page__body p:last-child {
  margin-bottom: 0;
}

.legal-page__body ul {
  list-style-type: disc;
  padding-left: 1em;
  margin: 0 0 1em 0;
}

.legal-page__body li {
  margin-bottom: var(--space-s);
}

.legal-page__body li::marker {
  font-size: var(--font-size-xs);
}

.legal-page__body a {
  color: var(--color-text-link-accent);
  font-weight: var(--font-weight-medium);
  text-decoration: underline;
}

.legal-page__top-copy {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.legal-page__top-image {
  top: 20px;
  position: sticky;
}

.legal-page__top-copy > :first-child {
  max-width: 40%;
}

.legal-page__top-copy > :last-child {
  max-width: 50%;
}

.legal-page__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  gap: 16px;
}

.legal-page__cards-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.legal-page-card {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  margin: 0;
  padding: var(--space-card);
  border-radius: var(--border-radius-l);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-stroke-weak);
  display: flex;
  flex-direction: column;
  gap: var(--space-default);
  position: relative;
  box-sizing: border-box;
  align-self: start;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.legal-page-card__icon {
  position: absolute;
  top: var(--space-card);
  right: var(--space-card);
  color: var(--color-icon-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  transition: color 0.2s ease;
}

.legal-page-card__title {
  margin: 0;
  font-size: var(--font-size-medium);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-default);
  letter-spacing: var(--letter-spacing-tight);
}

.legal-page-card__description {
  margin: 0;
  font-size: var(--font-size-base);
  line-height: var(--line-height-default);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--color-text-secondary);
  padding: 0;
  padding-right: 32px;
}

.legal-page-card p {
  padding: 0px;
}

.legal-page-card ul {
  list-style: unset;
  margin-top: 16px;
  margin-bottom: 16px;
  padding-left: 40px;
}

.legal-page-card .content-detail-icon__description {
  padding-right: 32px;
}


/* Responsive Adjustments */
@media (max-width: 1024px) {
  .legal-page {
    padding-top: 40px;
    padding-bottom: 64px;
  }

  .legal-page__inner {
    max-width: 656px;
  }
}

@media (max-width: 767px) {
  .legal-page {
    padding-top: 32px;
    padding-left: var(--space-medium);
    padding-right: var(--space-medium);
  }

  .legal-page__top-copy {
    flex-direction: column;
    gap: var(--space-xl);
  }

  .legal-page__top-copy > :first-child {
    max-width: 100%;
  }
  .legal-page__top-copy > :last-child {
    max-width: 100%;
  }

  .legal-page__cards {
    grid-template-columns: 1fr;
  }
}
