/* ---------------------------------------------------------------- notes prose
   The ONLY place for new CSS introduced by the notes surfaces (WP4). Linked
   from /notes/ and /notes/<slug>/ via BaseLayout's head slot. .rub/.note list
   styling already lives in site.css; this file adds the article body language,
   in the same palette and font stack as the rest of the site.
   Palette: #0C0C0B ground / #F2F0EA paper. */

.prose {
  margin-top: 48px;
}

.prose > *:first-child {
  margin-top: 0;
}

.prose p {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17.5px;
  line-height: 1.65;
  color: rgba(242, 240, 234, .72);
  margin: 0 0 22px;
}

.prose h2 {
  font-family: 'Space Grotesk', sans-serif;
  color: #F2F0EA;
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin: 56px 0 18px;
}

.prose h3 {
  font-family: 'Space Grotesk', sans-serif;
  color: #F2F0EA;
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.2;
  margin: 40px 0 14px;
}

.prose a {
  color: #F2F0EA;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.prose strong { color: #F2F0EA; font-weight: 700; }
.prose em { font-style: italic; }

.prose ul,
.prose ol {
  margin: 0 0 22px;
  padding-left: 24px;
}

.prose li {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17.5px;
  line-height: 1.65;
  color: rgba(242, 240, 234, .72);
  margin: 0 0 10px;
}

.prose li::marker {
  color: rgba(242, 240, 234, .4);
}

.prose code {
  font-family: 'Space Mono', monospace;
  font-size: .88em;
  background: #141412;
  border: 1px solid rgba(242, 240, 234, .12);
  border-radius: 8px;
  padding: 2px 7px;
  color: #F2F0EA;
}

.prose pre {
  font-family: 'Space Mono', monospace;
  background: #141412;
  border: 1px solid rgba(242, 240, 234, .12);
  border-radius: 8px;
  padding: 20px 22px;
  margin: 0 0 24px;
  overflow-x: auto;
  line-height: 1.5;
  font-size: 14px;
  color: #F2F0EA;
}

.prose pre code {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  font-size: inherit;
}

.prose blockquote {
  margin: 0 0 24px;
  padding: 4px 0 4px 22px;
  border-left: 2px solid rgba(242, 240, 234, .25);
  color: rgba(242, 240, 234, .6);
}

.prose blockquote p {
  color: rgba(242, 240, 234, .6);
}

.prose hr {
  border: 0;
  border-top: 1px solid rgba(242, 240, 234, .1);
  margin: 48px 0;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 0 0 24px;
}

/* Markdoc emits figures wrapped in <p>; the browser splits that invalid
   nesting into empty <p>s on either side, which would add stray margins. */
.prose p:empty {
  display: none;
}

/* Figures — markdown images render through Figure.astro (markdoc.config.mjs).
   On wide viewports the image breaks out slightly past the 720px text column
   so photography reads as a beat, not an inline attachment. */
.prose .prose-figure {
  margin: 40px -48px;
}

.prose .prose-figure img {
  display: block;
  width: 100%;
  margin: 0;
  border-radius: 12px;
  border: 1px solid rgba(242, 240, 234, .1);
  background: #141412;
}

.prose .prose-figure figcaption {
  margin-top: 14px;
  padding: 0 48px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: .14em;
  line-height: 1.6;
  text-transform: uppercase;
  color: rgba(242, 240, 234, .42);
}

/* More-notes rows (article footer) reuse the index .note grid but live inside
   the 720px reading column — tighten the tag column and title size so titles
   hold to one or two lines. */
.more-notes .note {
  grid-template-columns: 120px 1fr auto;
  gap: 20px;
  padding: 22px 6px;
}

.more-notes .note-title {
  font-size: 19px;
}

/* Responsive: tighter column gutters on narrow viewports. */
@media (max-width: 820px) {
  .prose {
    margin-top: 36px;
  }
  .prose p,
  .prose li {
    font-size: 16.5px;
  }
  .prose pre {
    padding: 16px 16px;
  }
  .prose .prose-figure {
    margin: 32px 0;
  }
  .prose .prose-figure figcaption {
    padding: 0;
  }
  /* Out-specifies the desktop .more-notes grid so rows collapse to a single
     column here, matching site.css's own .note mobile behavior. */
  .more-notes .note {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
