/* ============================================================================
   nqc-journal — the Journal listing, and the card deck the single post reuses.

   The wireframe drew this page with six invented posts ("Posted · August 2026")
   because it was written before there was a blog. The 35 real posts are now
   imported, so the listing is a live query and this stylesheet dresses core's
   query-loop blocks as the site's own card deck.

   BANDS, not a scroll of cream.

   The first build gave every section the same paper ground and let each one
   keep the theme's 32px block gap, so the page read as one continuous field
   with white hairlines across it and a 136px hole between "Recent Posts" and
   its own cards. Measured against /activities/ — the site's own rhythm is
   sand → navy → paper → navy → paper, every band butted at 0 and every heading
   inside the band it belongs to. This page now follows it:

     hero            photograph
     featured        paper
     recent posts    sand            heading + deck + more, ONE band
     browse by topic navy
     newsletter      paper + grain
     faq             paper
     cta             photograph
   ============================================================================ */

/* ----------------------------------------------------------------------------
   Bands butt together.

   theme.json's 32px block gap outranks .nqc-block's own `margin: 0` by print
   order alone (both are (0,1,0) — see nqc_journal_styles(), which states the
   same fix for the listing page's own children). Two classes on the same
   element takes these to (0,2,0).

   Only the containers this stylesheet owns are named. It also loads on single
   posts and on archives, so a blanket `.entry-content > *` here would flatten
   the paragraph spacing inside an article body.
   -------------------------------------------------------------------------- */
.nqc-article > .nqc-jdeck,
.nqc-archive > .nqc-archead,
.nqc-archive > .nqc-jdeck {
	margin-block: 0;
}

/* ----------------------------------------------------------------------------
   The band rail — the same geometry the site's card sections use: a 1200px
   content rail inside the page gutter.
   -------------------------------------------------------------------------- */
.nqc-jfeature__in,
.nqc-jdeck__in,
.nqc-jtopics__in,
.nqc-archead__in {
	width: 100%;
	max-width: var(--nqc-rail);
	margin-inline: auto;
}

/* ---- a band's heading ---------------------------------------------------- */
/*
   The heading, its eyebrow and the ornament sit INSIDE the band with the
   content they title. Splitting the deck's heading into its own prose panel is
   what opened the hole: two 80px paddings and a 32px gap between a heading and
   the cards it belongs to.
*/
.nqc-jkicker {
	margin: 0 0 10px;
	font: 400 14px/100% var(--nqc-sans);
	letter-spacing: 4px;
	text-transform: uppercase;
	color: var(--nqc-gold-dk);
}

.nqc-jhead {
	margin: 0;
	font: 600 42px/50px var(--nqc-serif);
	color: var(--nqc-ink);
	text-wrap: balance;
}

/* The site's ornament: a gold rule broken by a diamond. */
.nqc-jorn {
	position: relative;
	width: 170px;
	height: 7px;
	margin: 14px 0 34px;
	background:
		linear-gradient(var(--nqc-gold), var(--nqc-gold)) left center / 70px 1px no-repeat,
		linear-gradient(var(--nqc-gold), var(--nqc-gold)) right center / 70px 1px no-repeat;
}

.nqc-jorn::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 7px;
	height: 7px;
	transform: translate(-50%, -50%) rotate(45deg);
	background: var(--nqc-gold);
}

/* The featured band is an eyebrow and the post's own headline, no section
   heading of its own — so the eyebrow carries the space the ornament would. */
.nqc-jfeature .nqc-jkicker { margin-bottom: 26px; }

/* The loader's live region. Present in most themes; stated here so the script
   never depends on one. */
.nqc-jdeck .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ============================================================================
   1. The featured post — paper
   ============================================================================ */
.nqc-jfeature {
	background: var(--nqc-paper);
	padding: 76px var(--nqc-gutter);
}

.nqc-jfeature .wp-block-post-template {
	margin: 0;
	padding: 0;
	list-style: none;
}

/*
   The two columns are on the ITEM, not the list: core puts the featured image
   and the copy inside one <li>, so a grid on the list would place the whole
   post in a single cell.
*/
.nqc-jfeature .wp-block-post-template > li {
	margin: 0;
	display: grid;
	grid-template-columns: minmax(0, 620fr) minmax(0, 520fr);
	gap: 56px;
	align-items: center;
}

.nqc-jfeature .wp-block-post-featured-image { margin: 0; }

.nqc-jfeature .wp-block-post-featured-image img {
	width: 100%;
	height: 420px;
	object-fit: cover;
	background: #fff;
	padding: 12px;
	box-shadow: 0 18px 40px rgba(28, 38, 52, .14);
}

/* ============================================================================
   2. The deck — sand on the listing, and reused on the single post
   ============================================================================ */
.nqc-jdeck {
	background: var(--nqc-sand);
	padding: 76px var(--nqc-gutter) 84px;
}

.nqc-jdeck .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px 32px;
	margin: 0;
	padding: 0;
	list-style: none;
	align-items: stretch;
}

/*
   Cards end level and their read-links sit on one line.

   Left to itself the deck read as nine unequal slabs: the category list wraps
   on some posts and not others, excerpts run 12 to 40 words, and the read-link
   ended up at a different height in every card. So the card is a full-height
   flex column, the meta is held to one line, the excerpt is clamped, and the
   link is pushed to the bottom.
*/
.nqc-jdeck .wp-block-post-template > li {
	margin: 0;
	height: 100%;
	display: flex;
	flex-direction: column;
	background: #fff;
	box-shadow: inset 0 0 0 1px var(--nqc-rule-2);
	transition: box-shadow .45s ease, transform .45s var(--nqc-ease);
}

.nqc-jdeck .wp-block-post-template > li:hover {
	box-shadow: inset 0 0 0 1px var(--nqc-gold), 0 18px 40px rgba(28, 38, 52, .12);
	transform: translateY(-4px);
}

.nqc-jdeck .wp-block-post-featured-image {
	margin: 0;
	overflow: hidden;
}

.nqc-jdeck .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	height: 240px;
	object-fit: cover;
	transition: transform 1.1s var(--nqc-ease);
}

.nqc-jdeck .wp-block-post-template > li:hover .wp-block-post-featured-image img {
	transform: scale(1.05);
}

/* the copy inside a card */
.nqc-jcard__body {
	padding: 24px 28px 28px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1 1 auto;
}

/* Three lines of excerpt, so every card's copy block is the same depth. */
.nqc-jdeck .wp-block-post-excerpt__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* And the link on the floor of the card rather than under the copy. */
.nqc-jdeck .wp-block-post-excerpt {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* ============================================================================
   Shared card typography
   ============================================================================ */
.nqc-jfeature .wp-block-post-title,
.nqc-jdeck .wp-block-post-title {
	margin: 0;
	font-family: var(--nqc-serif);
	font-weight: 600;
	color: var(--nqc-ink);
	text-wrap: balance;
}

.nqc-jfeature .wp-block-post-title { font-size: 42px; line-height: 50px; }
.nqc-jdeck .wp-block-post-title { font-size: 25px; line-height: 32px; }

.nqc-jfeature .wp-block-post-title a,
.nqc-jdeck .wp-block-post-title a {
	color: inherit;
	text-decoration: none;
}

.nqc-jfeature .wp-block-post-title a:hover,
.nqc-jdeck .wp-block-post-title a:hover,
.nqc-jfeature .wp-block-post-title a:focus-visible,
.nqc-jdeck .wp-block-post-title a:focus-visible {
	color: var(--nqc-brick);
}

/* ---- the card's eyebrow -------------------------------------------------- */
/*
   ONE line: one category, then the date.

   It was three lines of gold uppercase — every category a post carries, at 3px
   of tracking, wrapping to two lines and pushing the date onto a third, with
   40px of height reserved so the titles would still line up. On a 379px card
   that is a slab of metal above every headline. So: the first category only
   (nqc_journal_one_term() drops the rest), the date beside it in the body tone
   rather than gold, and the site's own diamond between them. The category
   ellipses rather than wraps, so the line holds whatever a post is filed under.
*/
.nqc-jmeta {
	display: flex;
	flex-wrap: nowrap;
	align-items: baseline;
	gap: 0;
	min-width: 0;
	font: 400 14px/20px var(--nqc-sans);
	letter-spacing: 1.5px;
	text-transform: uppercase;
}

.nqc-jmeta .wp-block-post-terms {
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	color: var(--nqc-gold-dk);
}

.nqc-jmeta .wp-block-post-date {
	flex: 0 0 auto;
	color: var(--nqc-body-3);
	white-space: nowrap;
}

/* The separator is the site's diamond, drawn on the date. */
.nqc-jmeta .wp-block-post-terms + .wp-block-post-date::before {
	content: "";
	display: inline-block;
	width: 4px;
	height: 4px;
	margin: 0 10px;
	transform: rotate(45deg);
	background: var(--nqc-gold);
	vertical-align: middle;
}

.nqc-jmeta a { color: inherit; text-decoration: none; }
.nqc-jmeta a:hover { color: var(--nqc-brick); }

/* ---- excerpts ------------------------------------------------------------ */
.nqc-jfeature .wp-block-post-excerpt,
.nqc-jdeck .wp-block-post-excerpt { margin: 0; }

.nqc-jfeature .wp-block-post-excerpt__excerpt,
.nqc-jdeck .wp-block-post-excerpt__excerpt {
	font: 400 16px/26px var(--nqc-sans);
	color: var(--nqc-body-2);
}

.nqc-jfeature .wp-block-post-excerpt__excerpt { font-size: 18px; line-height: 30px; }

/* the "read" link, in the site's link treatment */
.nqc-jfeature .wp-block-post-excerpt__more-link,
.nqc-jdeck .wp-block-post-excerpt__more-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 4px;
	font: 400 14px/100% var(--nqc-sans);
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--nqc-brick);
	text-decoration: underline;
	text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
	text-underline-offset: 4px;
	transition: color .3s ease, text-decoration-color .3s ease;
}

.nqc-jfeature .wp-block-post-excerpt__more-link:hover,
.nqc-jdeck .wp-block-post-excerpt__more-link:hover {
	color: var(--nqc-ink);
	text-decoration-color: currentColor;
}

/* ============================================================================
   "Load More Posts" — the deck appends the next twelve in place
   ----------------------------------------------------------------------------
   Core's numbered pagination (1 2 3 4 OLDER) sent the reader to a new URL and
   back to the top of the page. The loop keeps core's pagination markup, so with
   JS off the link is still a working link to page 2 — assets/nqc-journal.js
   turns it into an in-place append of the next twelve, ON CLICK. Nothing loads
   until the reader presses it.
   ============================================================================ */
.nqc-jdeck .wp-block-query-pagination {
	display: flex;
	justify-content: center;
	margin-top: 52px;
	gap: 0;
}

/* Numbers and "newer" belong to a paged listing; this one only goes onward. */
.nqc-jdeck .wp-block-query-pagination-numbers,
.nqc-jdeck .wp-block-query-pagination-previous {
	display: none;
}

.nqc-jdeck .wp-block-query-pagination-next {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 16px 28px;
	box-shadow: inset 0 0 0 1px var(--nqc-gold);
	background: transparent;
	font: 400 14px/100% var(--nqc-sans);
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--nqc-ink);
	text-decoration: none;
	cursor: pointer;
	transition: background-color .3s ease, color .3s ease, box-shadow .3s ease;
}

.nqc-jdeck .wp-block-query-pagination-next:hover,
.nqc-jdeck .wp-block-query-pagination-next:focus-visible {
	background: var(--nqc-brick);
	box-shadow: inset 0 0 0 1px var(--nqc-brick);
	color: var(--nqc-cream);
}

/* While a fetch is in flight. */
.nqc-jdeck .wp-block-query-pagination.is-loading .wp-block-query-pagination-next {
	pointer-events: none;
	opacity: .55;
}

/* Newly appended cards arrive rather than snap in. */
@keyframes nqc-jrise {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: none; }
}

.nqc-jdeck .wp-block-post-template > li.is-fresh {
	animation: nqc-jrise .5s var(--nqc-ease) both;
}

@media (prefers-reduced-motion: reduce) {
	.nqc-jdeck .wp-block-post-template > li.is-fresh { animation: none; }
	.nqc-jdeck .wp-block-post-template > li { transition: none; }
	.nqc-jdeck .wp-block-post-featured-image img { transition: none; }
}

/* The end of the listing, once there is no next page left. */
.nqc-jend {
	margin: 52px 0 0;
	text-align: center;
	font: 400 14px/100% var(--nqc-sans);
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--nqc-body-3);
}

/* ============================================================================
   The newsletter panel's sand ground
   ----------------------------------------------------------------------------
   nqc/prose-panel declares is-sand and is-form backgrounds at the same (0,2,0)
   weight, and is-form is declared later — so the Journal's newsletter panel
   asked for sand and got paper, which put it on the same cream as the FAQ
   directly beneath it. Naming both classes is (0,3,0) and settles it.

   IT LIVES HERE, not in the block's own stylesheet, on purpose. /contact/ and
   /the-ranch/employment/ carry the same is-sand + is-form pair and have been
   paper since they were approved. Fixing it at the block would restyle both of
   them; this sheet loads on the Journal, its posts and its category archives,
   and nowhere else.
   ============================================================================ */
.nqc-prose.is-form.is-sand {
	background-color: #E9E2D1;                 /* --sand-2 */
	background-image:
		linear-gradient(rgba(233, 226, 209, .84), rgba(233, 226, 209, .84)),
		var(--nqc-grain, none);
	background-repeat: repeat, repeat;
	background-size: auto, 1800px auto;
	background-position: top center, top center;
}

/* ============================================================================
   3. The navy band — Browse by Topic here, the term head on an archive
   ----------------------------------------------------------------------------
   The site sets one dark band into every long page (skill-cards and the quote
   on /activities/, the prose panel on /the-ranch/). This is this page's, and it
   is what stops the listing and the newsletter reading as one field.
   ============================================================================ */
.nqc-jtopics,
.nqc-archead {
	background: var(--nqc-navy);
	padding: 68px var(--nqc-gutter) 74px;
}

.nqc-jtopics .nqc-jkicker,
.nqc-archead .nqc-jkicker { color: var(--nqc-gold-lt); }

.nqc-jtopics .nqc-jhead,
.nqc-archead .nqc-jhead { color: var(--nqc-cream-2); }

/* Browse by Topic is centred, because a row of chips is. */
.nqc-jtopics {
	text-align: center;
}

.nqc-jtopics .nqc-jorn { margin-inline: auto; }

.nqc-jtopics .wp-block-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

/*
   The CHIP is the <li>, not the <a>. core/categories writes the count as a
   bare text node after the link, so a chip drawn on the <a> left "(6)" sitting
   outside the box.
*/
.nqc-jtopics .wp-block-categories li {
	margin: 0;
	padding: 11px 20px;
	background: rgba(246, 239, 226, .05);
	box-shadow: inset 0 0 0 1px rgba(203, 180, 136, .3);
	font: 400 14px/100% var(--nqc-sans);
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--nqc-footer-meta);
	transition: box-shadow .35s ease, background-color .35s ease, transform .35s var(--nqc-ease);
}

.nqc-jtopics .wp-block-categories li:hover {
	background: rgba(246, 239, 226, .1);
	box-shadow: inset 0 0 0 1px var(--nqc-gold-lt);
	transform: translateY(-2px);
}

.nqc-jtopics .wp-block-categories a {
	color: var(--nqc-card-ink);
	text-decoration: none;
}

.nqc-jtopics .wp-block-categories li:hover a { color: #fff; }

/* ============================================================================
   Responsive
   ============================================================================ */
@media (max-width: 1200px) {
	.nqc-jdeck .wp-block-post-template { gap: 32px 24px; }

	.nqc-jfeature .wp-block-post-title { font-size: 34px; line-height: 42px; }

	.nqc-jhead { font-size: 34px; line-height: 42px; }
}

@media (max-width: 900px) {
	.nqc-jfeature { padding-block: 56px; }

	.nqc-jdeck { padding-block: 56px 64px; }

	/* The photograph leads, then the copy, as everywhere else on the site. */
	.nqc-jfeature .wp-block-post-template > li {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}

	.nqc-jfeature .wp-block-post-featured-image img { height: 300px; }

	.nqc-jdeck .wp-block-post-template {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.nqc-jdeck .wp-block-post-featured-image img { height: 200px; }

	.nqc-jfeature .wp-block-post-title { font-size: 29px; line-height: 36px; }

	.nqc-jtopics { padding-block: 52px 58px; }
}

@media (max-width: 600px) {
	.nqc-jdeck { padding-block: 44px 52px; }

	.nqc-jdeck .wp-block-post-template {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}

	.nqc-jhead { font-size: 29px; line-height: 36px; }

	.nqc-jorn { margin-bottom: 26px; }

	.nqc-jcard__body { padding: 22px 22px 26px; }
}

/* ============================================================================
   The archive head
   ----------------------------------------------------------------------------
   /category/a-day-in-the-life/ and friends. Left, not centred: the term's name
   sits directly above the first card in the deck below, on the same rail, so
   the two bands read as one page rather than a centred title over a left grid.
   ============================================================================ */
.nqc-archead .nqc-jhead {
	font-size: 52px;
	line-height: 58px;
}

.nqc-archead .nqc-jorn { margin-bottom: 0; }

/* Most categories carry no description; the ones that do get the site's lead. */
.nqc-archead__desc {
	margin: 22px 0 0;
	max-width: 720px;
	font: 400 18px/30px var(--nqc-sans);
	color: var(--nqc-card-ink);
}

.nqc-archead__desc:empty { display: none; }

.nqc-archead__desc p { margin: 0 0 12px; }
.nqc-archead__desc p:last-child { margin-bottom: 0; }

/* ---- back to the listing ------------------------------------------------- */
.nqc-jback {
	margin: 44px 0 0;
	text-align: center;
}

.nqc-jback a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font: 400 14px/100% var(--nqc-sans);
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--nqc-brick);
	text-decoration: underline;
	text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
	text-underline-offset: 4px;
	transition: color .3s ease, text-decoration-color .3s ease;
}

.nqc-jback a:hover,
.nqc-jback a:focus-visible {
	color: var(--nqc-ink);
	text-decoration-color: currentColor;
}

@media (max-width: 1200px) {
	.nqc-archead .nqc-jhead { font-size: 42px; line-height: 48px; }
}

@media (max-width: 900px) {
	.nqc-archead { padding-block: 52px 58px; }

	.nqc-archead .nqc-jhead { font-size: 34px; line-height: 42px; }
}

@media (max-width: 600px) {
	.nqc-archead .nqc-jhead { font-size: 29px; line-height: 36px; }
}
