/* Site-theme overrides for pages exported by gdocs-me-up. */

.subpage-nav {
  display: flex;
  gap: .5rem;
  box-sizing: content-box;
  max-width: 690px;
  margin: 1rem auto 0;
  padding: 0 1rem;
  font-size: 1rem;
  line-height: 1.35;
}

.subpage-nav + .doc-content {
  margin-top: 0;
  padding-top: 1rem;
}

/* The export already encodes paragraph spacing, including intentional empty
 * spacer paragraphs. Undo style.css's generic paragraph margin without
 * overriding the more-specific .p* margins emitted from Google Docs. */
:where(.doc-content) p {
  margin: 0;
}

/* Google Docs emits direct color declarations on both headings and their
 * child spans. Override both levels so document formatting cannot mask the
 * site palette. */
.doc-content :is(h1, h2:not(.subtitle)),
.doc-content :is(h1, h2:not(.subtitle)) * {
  color: var(--accent-primary) !important;
}

.doc-content :is(h3, h4, h5, h6),
.doc-content :is(h3, h4, h5, h6) * {
  color: var(--accent-warm) !important;
}

/* Likewise, preserve site link colors when Docs placed a color on a nested
 * span. These follow the heading rules deliberately so linked heading text
 * still looks interactive. */
.doc-content a,
.doc-content a * {
  color: var(--accent-link) !important;
}
.doc-content a:hover,
.doc-content a:hover * {
  color: var(--accent-hover) !important;
}
.doc-content a:visited,
.doc-content a:visited * {
  color: var(--accent-visited) !important;
}
