/* Legal bases of the prize draw, served at /bases-legales.
 *
 * Loaded after tokens.css and campaign.css, which already give this page the
 * typeface, the co-branded header, the footer, the skip link and the focus
 * ring. Every colour here is a semantic token.
 *
 * Links in the legal text keep the text colour and carry --contentAccent only
 * in their underline: --contentAccent on --backgroundLight is 4.26:1, which
 * skill-design's contrast.md marks large-only, and an underline is not text.
 * The section numbers are --contentAccent because they are set at 24px.
 */

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-6);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.terms {
  padding: var(--space-10) 0 calc(var(--space-12) * 2);
}

@media (min-width: 768px) {
  .terms {
    padding-top: var(--space-12);
  }
}

.terms a {
  text-decoration-color: var(--contentAccent);
  text-decoration-thickness: 1px;
  text-underline-offset: var(--space-1);
}

.terms a:hover {
  text-decoration-thickness: 2px;
}

.terms__back {
  display: inline-block;
  margin-bottom: var(--space-6);
  font-size: var(--text-body2-size);
  line-height: var(--text-body2-line);
  letter-spacing: var(--text-body2-tracking);
}

.terms__intro {
  max-width: 68ch;
  margin-bottom: var(--space-10);
}

.terms__title {
  margin: 0 0 var(--space-4);
  font-size: var(--text-subtitle-big-2-size);
  line-height: var(--text-subtitle-big-2-line);
  letter-spacing: var(--text-subtitle-big-2-tracking);
  font-weight: var(--text-subtitle-big-2-weight);
}

.terms__lede {
  margin: 0;
  color: var(--contentSecondary);
  font-size: var(--text-preamble-size);
  line-height: var(--text-preamble-line);
  letter-spacing: var(--text-preamble-tracking);
  font-weight: var(--text-preamble-weight);
}

.terms__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6);
}

@media (min-width: 992px) {
  .terms__layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: var(--space-12);
    align-items: start;
  }
}

/* ---- Contents ------------------------------------------------------------ */

.terms__toc {
  background: var(--background);
  border-radius: var(--radius-card);
  padding: 0 var(--space-4);
}

@media (min-width: 992px) {
  .terms__toc {
    position: sticky;
    top: var(--space-6);
    background: none;
    border-radius: 0;
    padding: 0;
  }
}

.terms__toc-summary {
  cursor: pointer;
  padding: var(--space-3) 0;
  font-size: var(--text-headline6-size);
  line-height: var(--text-headline6-line);
  letter-spacing: var(--text-headline6-tracking);
  font-weight: var(--text-headline6-weight);
}

@media (min-width: 992px) {
  .terms__toc-summary {
    padding-top: 0;
  }
}

.terms__toc-list {
  margin: 0;
  padding: 0 0 var(--space-3);
  list-style: none;
  counter-reset: terms-toc;
}

.terms__toc-list li {
  counter-increment: terms-toc;
}

.terms .terms__toc-link {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  color: var(--contentSecondary);
  text-decoration: none;
  font-size: var(--text-body2-size);
  line-height: var(--text-body2-line);
  letter-spacing: var(--text-body2-tracking);
}

@media (min-width: 992px) {
  .terms .terms__toc-link {
    padding: var(--space-1) 0;
  }
}

.terms__toc-link::before {
  content: counter(terms-toc);
  min-width: 1.6em;
  flex: none;
  color: var(--contentPrimary);
  font-variant-numeric: tabular-nums;
  font-weight: var(--weight-headline);
}

.terms .terms__toc-link:hover {
  color: var(--contentPrimary);
  text-decoration: underline;
  text-decoration-color: var(--contentAccent);
}

.terms .terms__toc-link[aria-current="true"] {
  color: var(--contentPrimary);
  font-weight: var(--weight-medium);
}

/* ---- The articles -------------------------------------------------------- */

.terms__article {
  max-width: 68ch;
  min-width: 0;
  overflow-wrap: break-word;
}

.terms__article a,
.terms__nowrap {
  white-space: nowrap;
}

.terms__article p {
  margin: 0 0 var(--space-3);
}

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

.terms__section {
  padding-bottom: var(--space-8);
  margin-bottom: var(--space-8);
  border-bottom: 1px solid var(--lineDivider);
}

.terms__section:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.terms__heading {
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
  margin: 0 0 var(--space-3);
  font-size: var(--text-subtitle-medium-4-size);
  line-height: var(--text-subtitle-medium-4-line);
  letter-spacing: var(--text-subtitle-medium-4-tracking);
  font-weight: var(--text-subtitle-medium-4-weight);
}

.terms__number {
  min-width: 1.4em;
  flex: none;
  color: var(--contentAccent);
  font-variant-numeric: tabular-nums;
}

.terms__steps {
  margin: 0 0 var(--space-3);
  padding-left: var(--space-6);
}

.terms__steps li {
  margin: 0 0 var(--space-2);
  padding-left: var(--space-1);
}

.terms__steps li::marker {
  font-weight: var(--weight-headline);
}

.terms__data {
  margin: var(--space-4) 0;
  border-top: 1px solid var(--lineDivider);
}

.terms__data-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-1);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--lineDivider);
}

@media (min-width: 768px) {
  .terms__data-row {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: var(--space-4);
  }
}

.terms__data dt {
  font-weight: var(--weight-medium);
}

.terms__data dd {
  margin: 0;
}

.terms__version {
  max-width: 68ch;
  margin: var(--space-12) 0 0;
  color: var(--contentSecondary);
  font-size: var(--text-body2-size);
  line-height: var(--text-body2-line);
  letter-spacing: var(--text-body2-tracking);
}

/* The landing pads its footer for the sticky mobile CTA. This page has none. */
.site-footer {
  padding-bottom: var(--space-12);
}

@media print {
  .skip-link,
  .cobrand,
  .terms__back,
  .terms__toc,
  .site-footer {
    display: none;
  }

  body {
    background: var(--backgroundTertiary);
  }

  .terms__layout {
    display: block;
  }

  .terms__section {
    break-inside: avoid;
  }
}
