/*
 * Crumb & Coin website: privacy policy, terms of use and support.
 * Reading pages: one calm column, a contents list beside it on wide screens.
 * Colors come only from tokens.css.
 */

.doc {
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) var(--space-section);
}

.doc__head {
  display: grid;
  gap: 1.25rem;
  justify-items: start;
  padding-bottom: clamp(2rem, 1rem + 3vw, 3.5rem);
}

.doc__title {
  font-size: var(--step-hero);
  line-height: 1.02;
}

.doc__date {
  font-size: var(--step-small);
  color: var(--color-on-surface-variant);
}

.doc__head .lead a {
  color: var(--color-on-surface);
  font-weight: 600;
}

.doc__grid {
  display: grid;
  gap: 2.5rem 4rem;
  align-items: start;
}

.doc__body {
  max-width: 68ch;
  font-size: 1.125rem;
  line-height: 1.65;
}

.doc__body > * + *,
.doc__body section > * + * {
  margin-top: 1.125rem;
}

.doc__body section {
  margin-top: 2.75rem;
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}

.doc__body h2 {
  font-size: clamp(1.375rem, 1.25rem + 0.6vw, 1.625rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.005em;
}

.doc__body h3 {
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.3;
}

.doc__body a {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.doc__body ul {
  display: grid;
  gap: 0.5rem;
  padding-left: 1.25rem;
  list-style: disc;
}

.doc__body li::marker {
  color: var(--color-secondary);
}

.callout {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-l);
  background: var(--color-primary-container);
  color: var(--color-on-primary-container);
}

.toc {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-l);
  background: var(--color-surface-container);
  font-size: var(--step-small);
}

.toc__title {
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.toc ol {
  display: grid;
  margin-inline: -0.5rem;
}

.toc a {
  display: block;
  padding: 0.4375rem 0.5rem;
  border-radius: var(--radius-s);
  text-decoration: none;
  color: var(--color-on-surface-variant);
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .toc a:hover {
    background: color-mix(in srgb, var(--color-on-surface) 8%, transparent);
    color: var(--color-on-surface);
  }
}

.ask {
  padding-top: 1.75rem;
  border-top: 1px solid var(--color-outline-variant);
}

.doc--support .doc__body > h2 {
  font-family: var(--font-display);
  font-size: var(--step-h2);
  font-weight: 400;
  line-height: 1.05;
  color: var(--color-primary);
}

.doc--support .doc__body section {
  margin-top: 1.75rem;
}

@media (min-width: 62rem) {
  .doc__grid {
    grid-template-columns: 17rem minmax(0, 1fr);
  }

  .doc__grid--single {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    max-height: calc(100svh - var(--header-h) - 3rem);
    overflow-y: auto;
  }
}
