/* The blog on both sites: the index and the article. Colours and faces come from ue.css, so each site keeps its own accent. */

.blog-page main { background: var(--n-bg); }
.blog-index, .post { padding-block: clamp(2.5rem, 2rem + 3vw, 5rem); }
.blog-page h1, .blog-page h2, .blog-page h3 { text-transform: none; }

/* Index. */
.blog-head { display: grid; gap: 1rem; max-width: 46rem; margin-bottom: 2.5rem; }
.blog-head h1 { font-size: clamp(2.2rem, 1.7rem + 2.4vw, 3.5rem); letter-spacing: -0.04em; line-height: 1.05; }
.blog-head .lede { color: var(--n-ink-2); font-size: 1.15rem; line-height: 1.5; }
.blog-group { margin-top: 2.75rem; scroll-margin-top: 5rem; }
.blog-group > h2 { margin-bottom: 1rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--n-line-2); font-size: 1.45rem; letter-spacing: -0.02em; }
.blog-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 0.9rem; margin: 0; padding: 0; list-style: none; }
.blog-list li { display: grid; align-content: start; gap: 0.45rem; padding: 1.1rem 1.2rem; border: 1px solid var(--n-line); border-radius: 0.9rem; background: var(--n-panel); }
.blog-list li:hover { border-color: var(--n-line-2); }
.blog-list a { color: var(--n-ink); font-family: var(--ue-display); font-size: 1.12rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; text-decoration: none; }
.blog-list a:hover, .blog-list a:focus-visible { color: var(--n-accent); }
.blog-list p { margin: 0; color: var(--n-ink-2); font-size: 0.94rem; line-height: 1.5; }

/* Article. */
.post { max-width: 48rem; }
.post-crumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.25rem; color: var(--n-ink-3); font-size: 0.9rem; }
.post-crumbs a { color: var(--n-ink-2); }
.post h1 { font-size: clamp(2.1rem, 1.6rem + 2.4vw, 3.4rem); letter-spacing: -0.04em; line-height: 1.06; text-wrap: balance; }
.post-meta { margin: 1rem 0 2rem; color: var(--n-ink-3); font-size: 0.92rem; }
.post-body { color: var(--n-ink-2); font-size: 1.08rem; line-height: 1.7; }
.post-body > * + * { margin-top: 1.15rem; }
.post-body h2 { margin-top: 2.6rem; color: var(--n-ink); font-size: clamp(1.45rem, 1.3rem + 0.8vw, 1.85rem); letter-spacing: -0.03em; line-height: 1.2; scroll-margin-top: 5rem; }
.post-body h3 { margin-top: 1.9rem; color: var(--n-ink); font-size: 1.2rem; letter-spacing: -0.02em; scroll-margin-top: 5rem; }
.post-body p { margin-bottom: 0; }
.post-body a { color: var(--n-accent); text-underline-offset: 0.18em; }
.post-body strong { color: var(--n-ink); }
.post-body ul, .post-body ol { display: grid; gap: 0.5rem; padding-left: 1.35rem; }
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body code { padding: 0.1em 0.35em; border-radius: 0.35rem; background: var(--n-panel-2); color: var(--n-ink); font-family: var(--ue-mono); font-size: 0.9em; }
.post-code { overflow-x: auto; padding: 1rem 1.15rem; border: 1px solid var(--n-line); border-radius: 0.8rem; background: var(--n-panel); line-height: 1.55; }
.post-code code { padding: 0; background: none; font-size: 0.88rem; white-space: pre; }
.post-note { padding: 0.9rem 1.1rem; border-left: 3px solid var(--n-accent); border-radius: 0 0.6rem 0.6rem 0; background: var(--n-panel); }
.post-table-scroll { overflow-x: auto; border: 1px solid var(--n-line); border-radius: 0.8rem; }
.post-table { width: 100%; border-collapse: collapse; font-size: 0.96rem; font-variant-numeric: tabular-nums; }
.post-table th, .post-table td { padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--n-line); text-align: left; vertical-align: top; }
.post-table thead th { background: var(--n-panel); color: var(--n-ink); font-weight: 600; white-space: nowrap; }
.post-table tbody tr:last-child > * { border-bottom: 0; }

.post-related { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--n-line-2); }
.post-related h2 { margin-bottom: 0.8rem; font-size: 1.2rem; letter-spacing: -0.02em; }
.post-related ul { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.post-related a { color: var(--n-ink); }
.post-related a:hover, .post-related a:focus-visible { color: var(--n-accent); }

@media (max-width: 40rem) {
  .post-body { font-size: 1.02rem; }
  .post-table th, .post-table td { padding: 0.55rem 0.7rem; }
}

/* Phones and touch screens: the breadcrumb, the post titles in a list and the related links are 44px thumb targets, like every other
   link on the two sites. Sizes only. */
@media (max-width: 47.99rem), (pointer: coarse) {
  .post-crumbs a, .post-related a { display: inline-flex; align-items: center; min-height: 44px; }
  .blog-list a { display: flex; align-items: center; min-height: 44px; }
}
