/*
 * The preview banner, on every page of the static preview, and its repeat in the footer.
 * Sun is a fill with an Ink border (brand rule). The banner stays in view as the page scrolls; on a
 * phone it keeps to its first sentence, so it takes little room, and the footer has the whole of it.
 */
.preview-banner,
.preview-footer {
  background: var(--sun);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--text-size);
  line-height: var(--line-height);
}

.preview-banner {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: var(--border) solid var(--ink);
}

.preview-footer {
  border-top: var(--border) solid var(--ink);
}

/* Focus and in-page links land below the sticky banner, never under it (WCAG 2.4.11). */
html {
  scroll-padding-top: 4.5rem;
}

.preview-banner > div,
.preview-footer > div {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--space-1) max(var(--gutter), env(safe-area-inset-right, 0px)) var(--space-1)
    max(var(--gutter), env(safe-area-inset-left, 0px));
}

@media (max-width: 40rem) {
  .preview-banner > div {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .preview-banner .preview-try {
    display: none;
  }
}

.preview-banner p,
.preview-footer p {
  margin: 0;
}

.preview-banner strong,
.preview-footer strong {
  font-weight: 700;
}

.preview-banner a,
.preview-footer a {
  color: var(--ink);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.15em;
  display: inline-block;
  min-height: 24px;
}

.preview-banner a:focus-visible,
.preview-footer a:focus-visible {
  outline: var(--focus-width) solid var(--ink);
  outline-offset: 2px;
}
