/*
 * Devbit teaser: a nes.css container in Navy on the page colour, the date and
 * authors cut into the top line, as in the old devbits list.
 */
.nf-devbit-teaser {
  margin-block: 3rem 2rem;
  padding: 1.5rem clamp(1rem, 4vw, 2rem);
  border-color: var(--color-heading);
  background-color: var(--color-base-100);
  color: var(--color-base-content);

  &.with-title > .title {
    max-width: 100%;
    background-color: var(--color-base-100);
    font-family: var(--font-mono);
    font-size: 0.875rem;
  }
}

.nf-devbit-teaser__title {
  margin-block-end: 0.75rem;
  color: var(--color-heading);
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.5rem);
  line-height: 1.25;
  overflow-wrap: break-word;

  & a {
    color: inherit;
    text-decoration: none;
  }

  & a:is(:hover, :focus-visible) {
    text-decoration: underline 4px var(--color-accent);
    text-underline-offset: 0.2em;
  }
}

/*
 * Only the snippets of the body: everything that neither holds nor is a
 * code block stays on the devbit's page. Long snippets scroll
 * (Prism makes every highlighted pre focusable).
 */
.nf-devbit-teaser__code {
  & :not(:has(pre), pre, pre *, .nf-snippet, .nf-snippet *) {
    display: none;
  }

  & pre {
    max-height: 20rem;
    overflow: auto;
  }
}

.nf-devbit-teaser__tags {
  margin-block-start: 1.5rem;
}
