/* WordPress pages, posts, archives, search and comments. */
.sam-content-page { padding-block: 5rem; min-height: 50vh; container-type: inline-size; }
.sam-content-page h1 { font-size: clamp(2.5rem, 6vw, 5rem); letter-spacing: -.04em; overflow-wrap: anywhere; }
.sam-list-header { margin-bottom: 3rem; max-width: 55rem; }
.sam-post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem 1.5rem; }
.sam-post-card { min-width: 0; }
.sam-post-card img { display: block; width: 100%; aspect-ratio: 1.83; object-fit: cover; margin-bottom: 1.25rem; }
.sam-post-card time { display: block; color: var(--sam-muted); font-size: .75rem; margin-bottom: .75rem; }
.sam-post-card :is(h2, h3) { font-size: clamp(1.65rem, 2.5vw, 2.3rem); overflow-wrap: anywhere; }
.sam-post-card :is(h2, h3) a { text-decoration: none; }
.sam-post-card :is(h2, h3) a:hover { text-decoration: underline; }
.sam-excerpt { font-size: .875rem; color: var(--sam-muted); }
.sam-article { max-width: 60rem; margin-inline: auto; }
.sam-article-header { max-width: 52rem; }
.sam-article-image { display: block; width: 100%; margin: 2.5rem 0; }
.sam-prose { max-width: 46rem; margin-inline: auto; overflow-wrap: break-word; }
.sam-prose :where(h2) { font-size: 2.5rem; margin-block: 2.5rem 1rem; }
.sam-prose :where(h3) { font-size: 1.85rem; margin-block: 2rem 1rem; }
.sam-prose :where(p, ul, ol, blockquote, pre, table) { margin-block-end: 1.5rem; }
.sam-prose :where(a) { color: var(--sam-link); }
.sam-prose :where(blockquote) { margin-inline: 0; padding-inline-start: 1.5rem; border-inline-start: 2px solid var(--sam-accent); font-size: 1.2rem; }
.sam-prose :where(pre) { overflow-x: auto; padding: 1.5rem; background: var(--sam-stone); }
.sam-prose :where(table) { width: 100%; border-collapse: collapse; }
.sam-prose :where(th, td) { border: 1px solid var(--sam-line); padding: .6rem; text-align: start; }
/* Break out within the page container, never the scrollbar-inclusive viewport. */
.sam-prose :is(.alignwide, .alignfull) { width: 100%; max-width: 100%; margin-inline: 0; }
@supports (width: 1cqw) {
    .sam-prose .alignwide { width: min(60rem, 100cqw); max-width: none; margin-inline: calc((100% - min(60rem, 100cqw)) / 2); }
    .sam-prose .alignfull { width: 100cqw; max-width: none; margin-inline: calc((100% - 100cqw) / 2); }
}
.sam-prose .alignleft { float: left; margin: .5rem 1.5rem 1rem 0; }
.sam-prose .alignright { float: right; margin: .5rem 0 1rem 1.5rem; }
.sam-prose .aligncenter { margin-inline: auto; text-align: center; }
.sam-prose::after { content: ""; display: table; clear: both; }
.sam-content-page .navigation { margin-block: 3rem; }
.sam-content-page .nav-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.sam-content-page .page-numbers { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; border: 1px solid var(--sam-line); }
.sam-content-page .page-numbers.current { background: var(--sam-accent); color: var(--sam-on-accent); }
.sam-site-search { max-width: 38rem; margin-block: 2rem; }
.sam-site-search > div { display: flex; gap: .75rem; margin-top: .5rem; }
.sam-site-search input { flex: 1; min-width: 0; width: 100%; padding: .75rem; border: 1px solid var(--sam-muted); background: white; color: var(--sam-ink); }
.sam-comments { max-width: 46rem; margin: 4rem auto 0; border-top: 1px solid var(--sam-line); padding-top: 2rem; }
.sam-comments h2 { font-size: 2rem; }
.sam-comment-list { padding-inline-start: 1.3rem; }
.sam-comment-list .children { padding-inline-start: 1.3rem; }
.sam-comment-list article { margin-block: 1.5rem; }
.sam-comments input:not([type="checkbox"]), .sam-comments textarea { max-width: 100%; display: block; padding: .75rem; border: 1px solid var(--sam-muted); background: var(--sam-white); color: var(--sam-ink); }
.sam-comments textarea { width: 100%; }
.sam-comments .submit { min-height: 48px; background: var(--sam-accent) !important; color: var(--sam-on-accent) !important; border: 0 !important; }
@media (max-width: 1100px) { .sam-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
    .sam-content-page { padding-block: 3rem; }
    .sam-post-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .sam-prose :where(h2) { font-size: 2rem; }
}

/* Only the homepage journal collapses to one story on phones. */
.sam-post-meta { display: flex; flex-wrap: wrap; gap: .4rem .65rem; color: var(--sam-muted); font-size: .625rem; text-transform: uppercase; letter-spacing: .035em; margin-bottom: 12px; }
.sam-post-meta time { font: inherit; margin: 0; }
.sam-post-meta > * + * { border-inline-start: 1px solid var(--sam-line); padding-inline-start: .65rem; }
.sam-posts-section .sam-post-card h3 { font-size: clamp(1.6rem, 2vw, 1.9rem); line-height: 1.25; margin-bottom: 12px; }
.sam-posts-section .sam-text-link { font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 767px) { .sam-posts-section .sam-post-card:nth-child(n+2) { display: none; } }
