/*
 * Long-form content pages.
 *
 * Reading comfort rather than marketing rhythm: one column, a measure held
 * near 70 characters, and a heading scale that reads as an outline rather
 * than as decoration.
 */

.ad-page {
  padding: 120px var(--ad-space-page) var(--ad-space-section);
}

.ad-page__article {
  max-width: 760px;
  margin-inline: auto;
}

.ad-page__head {
  padding-bottom: 32px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--ad-color-hairline);
}

.ad-page__title {
  font-size: clamp(34px, 5.2vw, 56px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.05;
  color: var(--ad-color-text);
}

.ad-page__meta {
  margin-top: 16px;
  font-family: var(--ad-font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ad-color-text-meta);
}

/* ------------------------------------------------------------ prose */

.ad-page__body {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ad-color-text-secondary);
}

.ad-page__body > * + * { margin-top: 1.15em; }

.ad-page__body h2 {
  margin-top: 2.4em;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
  color: var(--ad-color-text);
}

.ad-page__body h3 {
  margin-top: 1.9em;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ad-color-text);
}

/* The first heading should not push away from the rule above it. */
.ad-page__body > :first-child { margin-top: 0; }

.ad-page__body a {
  color: var(--ad-color-accent);
  /* Never colour alone: the underline carries the link for anyone who
     cannot separate the accent from the body colour (SC 1.4.1). */
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ad-page__body a:hover,
.ad-page__body a:focus-visible {
  color: var(--ad-color-text);
}

.ad-page__body strong { color: var(--ad-color-text); }

.ad-page__body ul,
.ad-page__body ol {
  padding-inline-start: 1.4em;
  list-style: revert;
}

.ad-page__body li + li { margin-top: .5em; }

.ad-page__body li::marker { color: var(--ad-color-text-meta); }

/* A definition-style block for the contact rows in the two legal pages. */
.ad-page__body dl {
  display: grid;
  grid-template-columns: minmax(9rem, auto) 1fr;
  gap: 10px 24px;
  padding: 24px;
  background: var(--ad-color-panel);
  border: 1px solid var(--ad-color-hairline);
}

.ad-page__body dt {
  font-family: var(--ad-font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ad-color-text-meta);
  padding-top: 4px;
}

.ad-page__body dd {
  margin: 0;
  color: var(--ad-color-text);
}

.ad-page__body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.ad-page__body th,
.ad-page__body td {
  padding: 12px 14px;
  text-align: start;
  border-bottom: 1px solid var(--ad-color-hairline);
  vertical-align: top;
}

.ad-page__body th {
  font-family: var(--ad-font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ad-color-text-meta);
  font-weight: 400;
}

/* Wide tables scroll in their own box; the page never scrolls sideways. */
.ad-page__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 640px) {
  .ad-page {
    padding: 88px var(--ad-space-page-mobile) var(--ad-space-section-mobile);
  }

  .ad-page__body dl {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 20px;
  }

  .ad-page__body dd + dt { margin-top: 14px; }
}

/* ------------------------------------------------------- a single post */

/*
 * A post carries a featured image and two dates, which a legal page does not.
 * Everything else it shares with .ad-page, so only the differences live here.
 */

.ad-page__meta-sep {
  margin-inline: 8px;
}

.ad-page__figure {
  margin: 40px 0 0;
  /* Full bleed of the measure, not of the viewport: the image belongs to the
     article and should not break out of the column the text establishes. */
  /* Square, like every other surface in this design. The theme defines no
     radius token because nothing in it is rounded. */
  border: 1px solid var(--ad-color-hairline);
  overflow: hidden;
  background: var(--ad-color-panel);
}

.ad-page__figure img {
  display: block;
  inline-size: 100%;
  block-size: auto;
}

@media (max-width: 640px) {
  .ad-page__figure {
    margin-top: 28px;
  }
}
