/* Page-owned styles for Terms and Conditions */

.terms-main {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
  padding-block: var(--space-8) var(--space-9);
}

.terms-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  width: 100%;
}

.terms-section {
  width: 100%;
  border-inline-start: var(--border-width) solid var(--color-border);
  padding-inline-start: var(--space-5);
}

.terms-section--accent {
  border-inline-start-color: var(--color-accent);
}

.terms-section__inner {
  width: 100%;
  max-width: 800px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.terms-section__title {
  font-family: var(--font-heading);
  font-size: var(--text-h2-size);
  line-height: var(--text-h2-line-height);
  font-weight: var(--text-h1-weight);
  text-transform: uppercase;
  color: var(--color-text-primary);
  margin-block-end: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
  padding-block-end: var(--space-3);
  border-block-end: var(--border-width) solid var(--color-border);
}

.terms-section--intro .terms-section__title {
  font-size: var(--text-h1-size);
  line-height: var(--text-h1-line-height);
  border-block-end-color: var(--color-accent);
}

.terms-section__content {
  width: 100%;
  max-width: 65ch;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  text-align: left;
}

.terms-section__content--intro {
  max-width: 65ch;
}

.terms-section__content p,
.terms-section__content ul,
.terms-section__content ol,
.terms-section__content dl {
  margin-block-end: 0;
}

.terms-section__content p + p,
.terms-section__content p + ul,
.terms-section__content p + ol,
.terms-section__content ul + p,
.terms-section__content ol + p,
.terms-section__content ul + ul,
.terms-section__content ol + ol,
.terms-section__content p + h3,
.terms-section__content ul + h3,
.terms-section__content ol + h3,
.terms-section__content h3 + p,
.terms-section__content h3 + ul,
.terms-section__content h3 + ol {
  margin-block-start: var(--space-3);
}

.terms-lead {
  font-size: var(--text-body-size);
  line-height: var(--text-body-line-height);
  font-weight: 500;
  color: var(--color-text-primary);
}

.terms-subheading {
  font-family: var(--font-heading);
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-line-height);
  font-weight: var(--text-h1-weight);
  text-transform: uppercase;
  color: var(--color-text-primary);
  margin-block-end: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

.terms-list {
  list-style-type: square;
  padding-inline-start: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.terms-list li {
  font-size: var(--text-body-size);
  line-height: var(--text-body-line-height);
  color: var(--color-text-primary);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.terms-list li::marker {
  color: var(--color-accent);
}

.terms-definitions {
  width: 100%;
  max-width: 65ch;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  background-color: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-5);
  box-shadow: var(--shadow-offset-x) var(--shadow-offset-y) var(--shadow-blur) var(--shadow-color);
}

.terms-definitions__title {
  font-family: var(--font-heading);
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-line-height);
  font-weight: var(--text-h1-weight);
  text-transform: uppercase;
  color: var(--color-text-primary);
  margin-block-end: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

.terms-definition-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-block-end: 0;
}

.terms-definition-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.terms-definition-item dt {
  font-family: var(--font-heading);
  font-weight: var(--text-h1-weight);
  text-transform: uppercase;
  color: var(--color-accent);
  font-size: var(--text-small-size);
  line-height: var(--text-small-line-height);
}

.terms-definition-item dd {
  margin-inline-start: 0;
  font-size: var(--text-body-size);
  line-height: var(--text-body-line-height);
  color: var(--color-text-primary);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.terms-contact-inline {
  font-size: var(--text-body-size);
  line-height: var(--text-body-line-height);
  color: var(--color-text-primary);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.terms-contact-list {
  list-style-type: none;
  padding-inline-start: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.terms-contact-list li {
  font-size: var(--text-body-size);
  line-height: var(--text-body-line-height);
  color: var(--color-text-primary);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.terms-contact-list a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: color var(--transition-duration) var(--transition-ease),
    background-color var(--transition-duration) var(--transition-ease);
}

.terms-contact-list a:hover {
  color: var(--color-text-on-accent);
  background-color: var(--color-accent);
}

.terms-contact-list a:focus-visible {
  outline: var(--border-width) solid var(--color-accent);
  outline-offset: 2px;
}

/* Responsive adjustments */

@media (max-width: 768px) {
  .terms-main {
    padding-block: var(--space-6) var(--space-7);
  }

  .terms-container {
    gap: var(--space-6);
  }

  .terms-section {
    padding-inline-start: var(--space-4);
  }

  .terms-section__inner {
    gap: var(--space-4);
  }

  .terms-section__title {
    font-size: var(--text-h2-size);
    line-height: var(--text-h2-line-height);
  }

  .terms-section--intro .terms-section__title {
    font-size: var(--text-h1-size);
    line-height: var(--text-h1-line-height);
  }

  .terms-section__content,
  .terms-section__content--intro,
  .terms-definitions {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .terms-main {
    padding-block: var(--space-5) var(--space-6);
  }

  .terms-container {
    gap: var(--space-5);
  }

  .terms-section {
    padding-inline-start: var(--space-3);
  }

  .terms-section__inner {
    gap: var(--space-3);
  }

  .terms-section__title {
    font-size: var(--text-h3-size);
    line-height: var(--text-h3-line-height);
  }

  .terms-section--intro .terms-section__title {
    font-size: var(--text-h2-size);
    line-height: var(--text-h2-line-height);
  }

  .terms-section__content,
  .terms-section__content--intro,
  .terms-definitions {
    max-width: 100%;
  }

  .terms-definitions {
    padding: var(--space-4);
  }

  .terms-section__content p,
  .terms-section__content li,
  .terms-definition-item dd,
  .terms-contact-inline,
  .terms-contact-list li {
    font-size: var(--text-small-size);
    line-height: var(--text-small-line-height);
  }

  .terms-subheading {
    font-size: var(--text-body-size);
    line-height: var(--text-body-line-height);
  }
}
