/* Shared Blog and Changelog layout. Colors and link states come from theme.css. */
.journal { --content-max: 760px; --page-top-gap: 32px; display: grid; gap: 40px; }
.journal > *, .journal-row > * { min-width: 0; }
.journal-label { text-align: center; font-size: 12px; line-height: 24px; font-weight: 400; text-transform: uppercase; }
.journal-label::before { content: none; }
.journal-label > span { color: var(--muted); }
.journal-list { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; min-width: 0; gap: 8px; margin: 0; padding: 0; list-style: none; }
.journal-list > li { min-width: 0; }
.journal-row { width: 100%; min-width: 0; display: flex; align-items: baseline; gap: 8px; font-size: 12px; line-height: 24px; }
.journal-row time { flex: 0 0 14ch; color: var(--subtle); white-space: nowrap; }
.journal-row-content { display: flex; flex: 1; align-items: baseline; gap: 1ch; min-width: 0; }
/* Both archive H2 and Recently H3 titles share the same baseline (no UA margins). */
.journal-title { margin: 0; flex: 0 1 auto; min-width: 0; max-width: min(46ch, 70%); font-size: 12px; line-height: 24px; font-weight: 400; text-transform: none; }
.journal-title::before { content: none; }
.journal-title a { display: block; width: auto; max-width: none; white-space: normal; overflow-wrap: normal; }
.journal-title a > span { display: block; max-height: 24px; overflow: hidden; }
/* Text periods share the date, title and author baseline. */
.journal-leader { display: block; position: relative; flex: 1 1 0%; width: 0; min-width: 1ch; height: 24px; align-self: flex-start; overflow: hidden; color: var(--muted); white-space: nowrap; }
.journal-leader::before { position: absolute; inset: 0; content: "................................................................................................................................................................................................................................................"; }
.journal-author { flex: 0 0 auto; max-width: 22ch; color: var(--subtle); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.journal-row .draft-label { flex: 0 0 auto; }
.empty { color: var(--subtle); font-size: 12px; }
.comment-header { min-width: 0; text-transform: uppercase; font-size: 12px; line-height: 24px; }
.comment-line { display: grid; grid-template-columns: 3ch 10ch minmax(0, 1fr); min-height: 24px; }
.comment-label { color: var(--subtle); }
.comment-marker { white-space: pre; color: var(--muted); }
.article-header { display: grid; gap: 20px; }
.comment-header h1 { max-width: 46ch; text-wrap: pretty; font-size: 12px; line-height: 24px; font-weight: 400; overflow-wrap: anywhere; }
.comment-header h1::before { content: none; }
.comment-category { text-transform: uppercase; }
.comment-rule { display: flex; max-width: 56ch; color: var(--muted); white-space: pre; }
.comment-rule > span:not(.comment-dashes) { flex: none; }
.comment-dashes { min-width: 0; overflow: hidden; white-space: nowrap; }
.draft-label { color: var(--warning); font-size: 12px; }
.recently { display: grid; gap: 24px; padding-top: 32px; border-top: 1px solid var(--border); }
.recently .journal-label { text-transform: none; }
.see-all { text-align: center; font-size: 12px; }
.article-intro { color: var(--subtle); }
.prose { padding-top: 32px; font-size: 12px; line-height: 24px; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 20px; }
.prose h2, .prose h3, .prose h4 { scroll-margin-top: 24px; margin-top: 40px; line-height: 28px; text-transform: none; }
.prose h2 { font-size: 14px; }.prose h3, .prose h4 { font-size: 12px; }
/* Semantic headings own their emphasis: CMS authors do not need bold marks.
   Keep older headings containing <strong> visually identical to plain headings. */
.blog-article .prose :is(h2, h3, h4) { margin-bottom: 0; font-size: 12px; line-height: 24px; font-weight: var(--font-weight-heading); text-transform: uppercase; overflow-wrap: anywhere; }
.blog-article .prose :is(h2, h3, h4) :is(strong, b) { font-weight: inherit; }
.prose h2::before, .prose h3::before, .prose h4::before { content: none; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li + li { margin-top: 8px; }
.prose blockquote { margin-inline: 0; padding: 12px 20px; border-left: 2px solid var(--accent); background: var(--surface); }
.prose blockquote p + p { margin-top: 12px; }
.prose pre { padding: 20px; border: 1px solid var(--border); background: var(--surface); max-width: 100%; overflow-x: auto; white-space: pre; font-size: 12px; line-height: 22px; }
/* Code follows its context: 12px/24px inline, 12px/22px inside pre.
   The global app code rule is 14px and must not resize blog text. */
.prose code { font-size: inherit; line-height: inherit; font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
.prose :not(pre) > code { background: var(--hover); padding: 1px 3px; overflow-wrap: anywhere; }
.prose table { display: block; overflow-x: auto; max-width: 100%; }
.prose th, .prose td { border: 1px solid var(--border); }
.prose th { background: var(--surface); }
.prose img { display: block; width: auto; max-width: 100%; height: auto; margin-inline: auto; }
.prose hr { margin-block: 32px; }
@media (max-width: 599px) {
  .journal { gap: 28px; }
  .journal-row { display: grid; grid-template-columns: 12ch minmax(0, 1fr); align-items: start; gap: 8px; }
  .journal-row-content { display: block; }
  .journal-title { max-width: 100%; }
  .journal-title a { overflow-wrap: anywhere; }
  .journal-title a > span { max-height: none; overflow: visible; }
  .journal-author, .journal-leader { display: none; }
  .prose pre { padding: 16px; }
}

/* Article components share the site's font, surfaces, borders and link states.
   Sanity supplies structure and content, never arbitrary CSS or HTML. */
.prose :is(li, blockquote) > :is(p, ul, ol) + :is(p, ul, ol) { margin-top: 12px; }
.prose :is(ul, ol) :is(ul, ol) { margin-top: 8px; }
.prose a { overflow-wrap: anywhere; }
.prose figure { margin-inline: 0; }
.prose figcaption { color: var(--subtle); font-size: var(--font-size-small); line-height: var(--line-height-small); }
.article-image { display: grid; gap: 12px; }
.article-image figcaption { text-align: center; white-space: pre-line; }
.article-code { border: 1px solid var(--border); background: var(--surface); min-width: 0; }
.article-code > figcaption { padding: 8px 16px; border-bottom: 1px solid var(--border); background: var(--hover); overflow-wrap: anywhere; }
.code-lines-label { display: block; font-size: inherit; }
.code-scroll { position: relative; overflow-x: auto; max-width: 100%; }
.code-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.prose .article-code pre { position: relative; margin: 0; padding: 20px; border: 0; background: transparent; overflow: visible; }
.code-line-marks { position: absolute; inset: 0; padding-block: 20px; pointer-events: none; }
.code-line-marks > span { display: block; height: 22px; }
.code-line-marks .is-highlighted { background: var(--selected-bg); border-left: 2px solid var(--accent); }
.article-code .hljs-keyword, .article-code .hljs-selector-tag, .article-code .hljs-literal { color: #8c278d; }
.article-code .hljs-string, .article-code .hljs-regexp, .article-code .hljs-addition { color: #246c42; }
.article-code .hljs-number, .article-code .hljs-symbol, .article-code .hljs-bullet { color: #a04e05; }
.article-code .hljs-comment, .article-code .hljs-quote { color: #66717d; font-style: italic; }
.article-code .hljs-title, .article-code .hljs-section { color: #075caa; }
.article-code .hljs-built_in, .article-code .hljs-type { color: #9a4719; }
.article-code .hljs-attr, .article-code .hljs-attribute, .article-code .hljs-property, .article-code .hljs-variable { color: #005f87; }
.article-code .hljs-meta { color: #6b4290; }
.article-code .hljs-deletion { color: #b32424; }
@media (max-width: 599px) {
  .prose .article-code pre { padding: 16px; }
  .code-line-marks { padding-block: 16px; }
}
/* SVG explanations occupy the same fixed column as article text, never a breakout. */
.prose .article-image img[src$=".svg"] { width: 100%; max-width: 100%; height: auto; }
