/* Post pages + posts index (/posts/*) — layered on the Editorial template
   (site/posts/assets/css/main.css). Loaded via an ABSOLUTE /posts/assets/... href so it
   resolves at both the `/posts` index and `/posts/<slug>` article clean URLs; relative hrefs
   break under vercel.json `trailingSlash:false` (the index at `/posts` would resolve `assets/…`
   against `/`, pulling the wrong root Story assets). Keep post-page hrefs absolute. */

/* ---- Article pages (body.post) ---- */

/* Reading column: cap the measure. Editorial's `#main > .inner` is `max-width: 110em`
   (≈1466px) — effectively full-width on desktop, an unreadable line length. The `.post`
   prefix outranks it so article pages get a comfortable column; the `.posts-index` grid
   (a different body class) is unaffected and stays full-width. */
.post #main > .inner {
	max-width: 48rem;
}

/* Title: Editorial's h1 is large; bring it to a readable article title. */
.post #main .inner > section header.main h1 {
	font-size: 2.25rem;
	line-height: 1.2;
	margin: 0 0 0.6rem 0;
}

/* Publish date under the title. */
.post .post-meta {
	color: #7f888f;
	font-size: 0.9rem;
	margin: 0 0 2rem 0;
}

/* Editor's note: clearly set apart from the body. */
.post .editor-note {
	font-size: 0.9rem;
	line-height: 1.6;
	font-style: italic;
	color: #7f888f;
	margin: 0 0 2rem 0;
	padding-left: 1rem;
	border-left: 3px solid #e5e5e5;
}

/* Hero: a height-capped, cropped banner strip so the article text starts high on the page
   rather than being pushed below a full-size image. */
.post .image.hero {
	display: block;
	width: 100%;
	height: 18rem;
	margin: 0 0 2.5rem 0;
	border-radius: 6px;
	overflow: hidden;
}

.post .image.hero img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Back-links, top and bottom of the article. */
.post .post-nav {
	font-size: 0.9rem;
	margin: 0 0 1.5rem 0;
}

.post .post-nav.bottom {
	margin: 2.5rem 0 0 0;
	padding-top: 1.5rem;
	border-top: 1px solid #e5e5e5;
}

/* Body: a touch more line-height for long-form reading. */
.post #main .inner > section > p {
	line-height: 1.7;
}

@media screen and (max-width: 736px) {
	.post .image.hero { height: 12rem; }
	.post #main .inner > section header.main h1 { font-size: 1.9rem; }
}

/* ---- Posts index card grid (body.posts-index) ----
   Mirrors the homepage /work card grid so the two indexes read as one system. */

.posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
	gap: 1.5rem;
	margin: 2rem 0 0 0;
	padding: 0;
	list-style: none;
}

.posts-grid li {
	margin: 0;
	padding: 0;
}

.posts-grid a {
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	background: #fff;
	transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.posts-grid a:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
	border-color: #d0d0d0;
}

.posts-grid .thumb {
	height: 10rem;
	overflow: hidden;
	background: #fafafa;
	border-bottom: 1px solid #eee;
}

.posts-grid .thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.posts-grid .body {
	padding: 1.25rem 1.35rem 1.5rem 1.35rem;
}

.posts-grid h3 {
	font-size: 1.15rem;
	line-height: 1.3;
	margin: 0 0 0.5rem 0;
}

.posts-grid .body p {
	font-size: 0.95rem;
	line-height: 1.55;
	color: #555;
	margin: 0;
}
