/* ==========================================================================
   Letter Content Styles
   ========================================================================== */

.email-meta {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 1ch;
  align-items: baseline;
  margin-bottom: 24px;
  font-size: var(--text-meta);
  line-height: 1.5;
}

.email-meta p {
  display: contents;
}

.email-meta-key,
.email-meta-value {
  min-width: 0;
  line-height: 1.5;
}

.email-meta-key {
  opacity: 0.6;
}

.email-meta-value {
  overflow-wrap: anywhere;
}

.email-meta a {
  color: inherit;
  text-decoration: none;
  cursor: var(--cursor-dark), pointer;
}

.theme-night .email-meta a {
  cursor: var(--cursor-light), pointer;
}

.email-meta a:hover,
.theme-night .email-meta a:hover {
  color: #fff;
}

.email-meta + .letter-body {
  font-family: var(--serif-font);
  font-size: var(--text-reading);
  line-height: var(--leading-body);
  font-weight: 400;
}

.email-meta + .letter-body em,
.email-meta + .letter-body i {
  font-style: italic;
  font-weight: 400;
}

.email-meta + .letter-body strong,
.email-meta + .letter-body b,
.email-meta + .letter-body a {
  font-weight: 700;
}

/* These letter defaults live in :where() so they carry zero specificity and
   .prose (imported above) can override them on markdown-rendered bodies. */
:where(.letter-body) p {
  margin-bottom: 20px;
}

:where(.letter-body) ul,
:where(.letter-body) ol {
  list-style: none;
  padding-inline-start: 0;
  margin: 20px 0;
}

:where(.letter-body) li {
  position: relative;
  padding-inline-start: 1.4em;
  margin: 6px 0;
}

:where(.letter-body) li::before {
  content: "•";
  position: absolute;
  inset-inline-start: 0;
}

.posts-list li {
  padding-inline-start: 0;
}

.posts-list li::before {
  content: none;
}

.posts-title {
  font-weight: 700;
  margin-bottom: 18px;
}

.posts-action-link {
  text-transform: uppercase;
}

.post-date {
  font-size: var(--text-meta);
  font-weight: 400;
  color: rgba(25, 24, 22, 0.6);
}

.theme-night .post-date {
  color: rgba(240, 240, 240, 0.6);
}

.posts-list .post-name {
  margin-inline-start: 0.6em;
  font-family: var(--serif-font);
  font-size: var(--text-title);
  line-height: var(--leading-tight);
  font-style: italic;
  font-weight: 400;
}

/* Hover treatment matching the values disclosures: dotted underline on the
   title plus the spinning star. The star lives on the name's ::after so it
   follows the title text, including when it wraps below the date on mobile.
   Being an inline-block, it is not painted by the propagated underline. */
.posts-list a:is(:hover, :focus-visible) .post-name {
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.14em;
}

.posts-list .post-name::after {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-inline-start: 8px;
  background: url('../cursor-light.svg') center/contain no-repeat;
  transform-origin: center;
  vertical-align: -2px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

body:not(.theme-night) .posts-list .post-name::after {
  background-image: url('../cursor-dark.svg');
}

.posts-list a:is(:hover, :focus-visible) .post-name::after {
  opacity: 1;
  animation: navLinkStarSpin 1.15s linear infinite;
}

.letter-body a {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  cursor: var(--cursor-dark), pointer;
}

.theme-night .letter-body a {
  cursor: var(--cursor-light), pointer;
}

.letter-body a:hover,
.theme-night .letter-body a:hover {
  color: #fff;
}

.letter-footer {
  margin-top: 28px;
  font-size: var(--text-meta);
  font-weight: 400;
  line-height: 1.5;
  color: rgba(25, 24, 22, 0.6);
}

.theme-night .letter-footer {
  color: rgba(240, 240, 240, 0.6);
}

.letter-footer a {
  color: inherit;
  text-decoration: none;
  cursor: var(--cursor-dark), pointer;
}

.theme-night .letter-footer a {
  cursor: var(--cursor-light), pointer;
}

.letter-footer a:hover,
.theme-night .letter-footer a:hover {
  color: #fff;
}

