@layer components {
  .blog-box {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--color-surface);
    border: var(--border-w) solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-pop);
  }

  .blog-box__title {
    margin: 0;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xl);
    color: var(--color-on-accent);
    background: var(--color-header-nav);
    border-bottom: var(--border-w) solid var(--color-border);
  }

  .blog-box__body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: var(--space-4);
  }

  .blog-box__heading {
    margin: 0 0 var(--space-2);
    font-size: var(--text-lg);
    color: var(--blog-heading-ink);
  }

  .blog-box__empty {
    color: var(--blog-empty-ink);
    font: var(--post-preview-font);
  }

  .post-list {
    display: grid;
    gap: var(--post-list-gap);
    margin: 0 0 var(--space-5);
    padding: 0;
    list-style: none;
  }

  .post-card {
    display: flex;
    flex-direction: var(--post-card-direction);
    align-items: var(--post-card-align);
    gap: var(--space-3);
    padding: var(--post-card-pad);
    background: var(--post-card-bg);
    border: var(--post-card-border);
    border-radius: var(--radius-md);
  }

  .post-list--pinned .post-card {
    background: var(--post-card-pinned-bg);
    border-style: solid;
    border-color: var(--color-accent);
  }

  .post-card__img {
    flex: none;
    width: calc(var(--space-6) * 3);
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-sm);
  }

  .post-card__text {
    display: var(--post-text-display);
    flex-direction: column;
  }

  .post-card__title {
    margin: var(--post-title-margin);
    font: var(--post-title-font);
  }

  .post-card__date {
    order: var(--post-date-order);
    font: var(--post-date-font);
    letter-spacing: var(--post-date-tracking);
    color: var(--post-date-ink);
  }

  .post-card__preview {
    margin: var(--post-preview-margin);
    font: var(--post-preview-font);
    color: var(--post-preview-ink);
  }
}
@layer components {
  /* The blog box title bar wears the floral print; the word gets a navy outline */
  .blog-box__title {
    background-image: var(--floral-pattern);
    background-size: var(--floral-pattern-size);
    -webkit-text-stroke: var(--logo-outline-w) var(--color-border);
    paint-order: stroke fill;
    text-shadow: var(--space-1) var(--space-1) 0 var(--color-border);
  }
}
@layer components {
  /* The title link stretches over the whole card, so the card is clickable */
  .post-card {
    position: relative;
  }

  .post-card__link {
    color: inherit;
    text-decoration: none;
  }

  .post-card__link::after {
    content: "";
    position: absolute;
    inset: 0;
  }

  .post-card__link:focus-visible {
    outline: none;
  }

  .post-card:has(.post-card__link:focus-visible) {
    outline: var(--edge-w) solid var(--color-focus);
    outline-offset: var(--space-1);
  }
}
@layer components {
  /* Between two posts in a list: an optional divider in the gap above the post */
  .post-card + .post-card::before,
  .post-card + .post-card::after {
    content: var(--post-divider);
    position: absolute;
    left: 50%;
    translate: -50% 0;
    pointer-events: none;
  }

  /* Two short rules... */
  .post-card + .post-card::before {
    top: var(--post-divider-line-top);
    width: var(--post-divider-w);
    height: var(--post-divider-line-h);
    background: var(--post-divider-lines);
  }

  /* ...with a small diamond between them */
  .post-card + .post-card::after {
    top: var(--post-divider-mark-top);
    width: var(--post-divider-mark-size);
    height: var(--post-divider-mark-size);
    rotate: 45deg;
    background: var(--post-divider-mark);
  }
}

/* The Blog title opens /blog/ but keeps its look. */
.box__link {
  color: inherit;
  text-decoration: none;
}

.box__link:hover,
.box__link:focus-visible {
  text-decoration: underline;
}
