@layer components {
  .entry {
    background-color: var(--color-white);
    border: var(--entry-border-size, 1px) solid var(--entry-border-color, var(--color-concrete));
    display: block;
    font-size: var(--text-smaller);
    line-height: var(--line-height-smaller);
    margin-bottom: var(--block-space);
    overflow: hidden;
    position: relative;

    &:hover,
    &:focus-within {
      --entry-border-color: var(--color-graphite);
    }

    &:first-of-type {
      margin-bottom: calc(var(--block-space-double) * 2);

      .entry__content {
        max-height: 40dvh;
      }


    }

    &::after {
      background: linear-gradient(transparent, var(--color-white));
      bottom: 0px;
      content: "";
      height: 24px;
      left: 0px;
      pointer-events: none;
      position: absolute;
      right: 0px;
    }


  }

  .entry__link {
    &::after {
      content: "";
      inset: 0;
      position: absolute;
    }
  }

  .entry__date {
    align-items: center;
    color: var(--color-steel);
    display: inline-flex;
    gap: var(--inline-space);
    font-size: var(--text-smallest);
    font-weight: 600;
    letter-spacing: 0.15em;
    line-height: var(--line-height-smallest);
    padding: var(--block-space-half) calc(var(--block-space) * 1.25);
    text-align: left;
    text-transform: lowercase;


    &::before {
      background-color: var(--color-steel);
      content: "";
      display: inline-block;
      flex-shrink: 0;
      height: 8px;
      vertical-align: middle;
      width: 8px;
    }
  }

  .entry__date--today {
    align-items: center;
    color: var(--color-graphite);
    display: inline-flex;
    font-size: var(--text-smaller);
    font-weight: normal;
    gap: var(--inline-space);
    letter-spacing: normal;
    line-height: var(--line-height-smaller);
    padding: 0 0 var(--block-space-half);
    text-transform: lowercase;

    &::before {
      --pulse-color-from: var(--color-accent);
      --pulse-color-to: var(--color-graphite);
      animation: pulse-colors 1.5s ease-in-out infinite;
      content: "";
      display: block;
      flex-shrink: 0;
      height: 8px;
      width: 8px;
    }


    + .entry {
      .entry__summary {
        display: none;
      }

      .entry__content {
        --lexxy-color-ink: var(--color-ink);
      }
    }
  }

  .entry__date:not(.entry__date--today) + .entry {
    opacity: 0.8;

    &:hover,
    &:focus-within {
      opacity: 1;
    }

    .entry__content {
      display: none;
    }
  }

  .entry__summary {
    border-bottom: 1px solid var(--color-concrete);
    color: var(--color-ink);
    font-size: var(--text-smaller);
    line-height: var(--line-height-smaller);
    padding: var(--block-space) calc(var(--block-space) * 1.25);
  }

  .entry__content {
    --lexxy-color-ink: var(--color-graphite);
    max-height: calc((var(--block-space) * 2) + var(--line-height-smaller) * var(--text-smaller));
    padding: var(--block-space) calc(var(--block-space) * 1.25);
  }

  /* Hide the placeholder once the composed entry is broadcast and prepended above it */
  .entry--placeholder:not(:first-child) {
    display: none;
  }
}
