/* ==========================================================================
   Blog: index (H1 + category tabs, lead story + 3-up list), category archives, article (title, meta,
   cover, prose + sticky enroll sheet), recent posts. Article typography lives in content.css.
   ========================================================================== */
.nj-blog-head .nj-page-hero__body { gap: 28px; max-width: none; width: 100%; }
.nj-blog-head.nj-page-hero { padding-bottom: 0; }
/* category tabs sit on a heavy rule; the current one is underlined in red */
.nj-cats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 28px; width: 100%; border-bottom: var(--nj-rule); }
.nj-cats a { display: inline-flex; align-items: center; min-height: 48px; margin-bottom: -2px; border-bottom: 2px solid transparent; color: var(--nj-stone); text-decoration: none; font-size: 15px; font-weight: 600; transition: color .2s, border-color .2s; }
.nj-cats a:hover { color: var(--nj-ink); border-bottom-color: var(--nj-ink); }
.nj-cats a[aria-current="page"] { color: var(--nj-ink); border-bottom-color: var(--nj-red); }
.nj-blog { padding-top: 40px; }

/* Cards: no boxes; photo, kicker, slab title, dateline */
.nj-post-grid { list-style: none; margin: 0; padding: 0; display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 32px; }
.nj-post-grid > li { margin: 0 !important; }
.nj-post-card { position: relative; display: flex; flex-direction: column; gap: 18px; height: 100%; }
.nj-post-card__media { border-radius: var(--nj-r-media); overflow: hidden; aspect-ratio: 16 / 10; background: var(--nj-sand); }
.nj-post-card__media:empty { background: var(--nj-sand) var(--nj-ridge) center / 72px auto no-repeat; }
.nj-post-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--nj-ease); }
.nj-post-card:hover .nj-post-card__img { transform: scale(1.03); }
.nj-post-card__body { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.nj-post-card__body > * { margin: 0; }
.nj-post-card__cat { order: -1; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--nj-red-700); }
.nj-post-card__title { font-size: 22px !important; font-weight: 500 !important; line-height: 1.25 !important; letter-spacing: -.01em !important; }
.nj-post-card__title a { color: var(--nj-ink); text-decoration: none; background: linear-gradient(var(--nj-red), var(--nj-red)) 0 100% / 0 1.5px no-repeat; transition: background-size .35s var(--nj-ease); }
.nj-post-card:hover .nj-post-card__title a { background-size: 100% 1.5px; }
.nj-post-card__title a::after { content: ""; position: absolute; inset: 0; }
.nj-post-card__meta { display: flex; gap: 10px; margin-top: auto !important; padding-top: 6px; font-size: 13px; color: var(--nj-muted); }
.nj-post-card__meta span + span::before { content: "/"; margin-right: 10px; color: var(--nj-line); }
/* lead story: the newest post runs wide on the blog index and category pages */
@media (min-width: 900px) {
	.nj-blog .nj-post-grid > li:first-child { grid-column: 1 / -1; padding-bottom: 48px; border-bottom: var(--nj-hair); }
	.nj-blog .nj-post-grid > li:first-child .nj-post-card { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: center; }
	.nj-blog .nj-post-grid > li:first-child .nj-post-card__body { flex: none; gap: 14px; }
	.nj-blog .nj-post-grid > li:first-child .nj-post-card__title { font-size: 38px !important; line-height: 1.12 !important; letter-spacing: -.018em !important; }
	.nj-blog .nj-post-grid > li:first-child .nj-post-card__meta { margin-top: 8px !important; }
}
.nj-pagination { margin-top: 56px; padding-top: 24px; border-top: var(--nj-rule); gap: 6px; }
.nj-pagination a, .nj-pagination .page-numbers { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: var(--nj-r-btn); color: var(--nj-ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.nj-pagination a:hover { background: #fff; box-shadow: inset 0 0 0 1px var(--nj-line); }
.nj-pagination .page-numbers.current { background: var(--nj-ink); color: #fff; }
@media (max-width: 1024px) { .nj-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .nj-post-grid { grid-template-columns: 1fr; gap: 36px; } .nj-cats { gap: 0 20px; } .nj-cats a { font-size: 14px; min-height: 44px; } }

/* Article */
.nj-post__head { max-width: calc(1120px + 2 * var(--nj-gutter)); margin: 0 auto; padding: 56px var(--nj-gutter) 36px; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.nj-post__back a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--nj-ink); }
.nj-post__back a::before { content: ""; width: 16px; height: 16px; background: var(--nj-red-600); -webkit-mask: var(--nj-arrow) center / contain no-repeat; mask: var(--nj-arrow) center / contain no-repeat; transform: rotate(180deg); transition: transform .28s var(--nj-ease); }
.nj-post__back a:hover::before { transform: rotate(180deg) translateX(4px); }
.nj-post__title { font-size: 48px !important; line-height: 1.08 !important; letter-spacing: -.02em !important; }
.nj-post__meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 14px; color: var(--nj-stone); }
.nj-post__meta > * + *::before { content: "/"; margin-right: 10px; color: var(--nj-line); }
.nj-post__meta span:first-child { color: var(--nj-ink); font-weight: 700; }
.nj-post__image { max-width: calc(1120px + 2 * var(--nj-gutter)); margin: 0 auto !important; padding: 0 var(--nj-gutter); }
.nj-post__image img { width: 100%; max-height: 600px; object-fit: cover; border-radius: var(--nj-r-card); }
.nj-post__layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 72px; max-width: calc(1120px + 2 * var(--nj-gutter)); margin: 0 auto; padding: 56px var(--nj-gutter) 0; align-items: start; }
.nj-post__article { display: grid; gap: 40px; min-width: 0; }
.nj-post__article > * { margin: 0 !important; }
.nj-post__content.nj-prose { max-width: 720px !important; }
.nj-post__aside { position: sticky; top: 104px; display: grid; gap: 28px; }
.nj-post__aside > * { margin: 0 !important; }
.nj-post__card { display: flex; flex-direction: column; gap: 16px; padding: 24px; border-radius: var(--nj-r-card); background: #fff; border: var(--nj-hair); border-top: 3px solid var(--nj-ink); }
.nj-post__card > * { margin: 0 !important; }
.nj-post__card .wp-block-buttons { flex-direction: column; }
.nj-post__card .wp-block-button, .nj-post__card .wp-block-button__link { width: 100%; }
.nj-post__card-tag { font-family: var(--nj-body); font-size: 12px !important; font-weight: 700 !important; letter-spacing: .12em !important; text-transform: uppercase; }
.nj-post__aside .nj-cats { flex-direction: column; gap: 0; border-bottom: 0; border-top: var(--nj-rule); }
.nj-post__aside .nj-cats a { width: 100%; min-height: 46px; margin: 0; border-bottom: var(--nj-hair); justify-content: space-between; font-size: 14px; }
.nj-post__aside .nj-cats a:hover { color: var(--nj-red-700); border-bottom-color: var(--nj-line); }
.nj-share { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 22px; border-top: var(--nj-rule); max-width: 720px; }
.nj-share p { font-weight: 700; color: var(--nj-ink); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.nj-share ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
.nj-share a { display: inline-flex; align-items: center; min-height: 44px; color: var(--nj-ink); text-decoration: underline; text-decoration-color: var(--nj-red); text-decoration-thickness: 1.5px; text-underline-offset: .25em; font-size: 15px; font-weight: 600; }
.nj-share a:hover { color: var(--nj-red-700); }
.nj-related > .nj-h3, .nj-related > h2 { padding-top: 24px; border-top: var(--nj-rule); }
.nj-related .nj-post-grid { margin-top: 32px; }
.nj-post__head > .nj-post__title { max-width: 900px; }
@media (max-width: 1100px) { .nj-post__layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; } }
@media (max-width: 899px) {
	.nj-post__layout { grid-template-columns: 1fr; gap: 40px; }
	.nj-post__aside { position: static; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
	.nj-post__card .wp-block-buttons { flex-direction: row; flex-wrap: wrap; }
	.nj-post__card .wp-block-button, .nj-post__card .wp-block-button__link { width: auto; }
}
@media (max-width: 600px) { .nj-post__aside { grid-template-columns: minmax(0, 1fr); } }
/* Recent posts: always 3 → 3 columns while they fit, one column below (no orphaned third card) */
@media (min-width: 641px) and (max-width: 1024px) { .nj-related .nj-post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 20px; } }
@media (min-width: 641px) and (max-width: 860px) { .nj-related .nj-post-grid { grid-template-columns: 1fr; } }
@media (max-width: 781px) { .nj-post__title { font-size: 32px !important; } .nj-post__head { padding-top: 36px; } }

.nj-post__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.nj-post__tags a { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: var(--nj-r-btn); box-shadow: inset 0 0 0 1px var(--nj-line); background: #fff; color: var(--nj-ink); font-size: 13px; font-weight: 600; text-decoration: none; }
.nj-post__tags a:hover { background: var(--nj-ink); color: #fff; box-shadow: none; }
.nj-post__tags a[href$="/categories/blog"] { display: none; }
