/* ==========================================================================
   Crown Office Supplies — Business Blog archive.

   Loads after cos-home.css, which owns the tokens and the shared primitives
   (.cos-btn, .cos-h1, .cos-eyebrow, .cos-lead, .cos-wrap, .cos-section,
   .cos-bleed). Nothing here re-declares a token.

   Scoped to body.cos-blog-archive throughout, so no other listing is touched.
   ========================================================================== */

/* Electro's #primary is a Bootstrap 75% column wherever a sidebar is expected.
   Without this the archive renders ~870px wide inside a 1200px container. */
body.cos-blog-archive .content-area {
	flex: 0 0 100%;
	max-width: 100%;
}

/* The full-bleed CTA overhangs the viewport by design; clip it on the body so
   the bleed itself is not clipped away. */
body.cos-blog-archive {
	overflow-x: clip;
}

body.cos-blog-archive .site-main {
	padding-bottom: 0;
}

/* Electro prints a blog nav bar and a post-count line above archives; neither
   is meaningful with a single category. */
body.cos-blog-archive #blog-navigation,
body.cos-blog-archive .blog-navigation,
body.cos-blog-archive .page-header .page-title,
body.cos-blog-archive #sidebar,
body.cos-blog-archive .sidebar-blog {
	display: none !important;
}

/* --------------------------------------------------------------------------
   1 — Masthead
   -------------------------------------------------------------------------- */
.cos-blogpage .cos-bl-head {
	padding-block: 34px 6px;
}

.cos-blogpage .cos-bl-head__title {
	margin: 10px 0 0;
	color: var(--cos-ink);
	letter-spacing: -.035em;
}

.cos-blogpage .cos-bl-head__lead {
	max-width: 56ch;
	margin-top: 14px;
}

/* --------------------------------------------------------------------------
   2 — Featured post

   Two columns at desktop, image first. The image is decorative here (the
   headline immediately below is the real link), so it is aria-hidden and
   carries an empty alt rather than a duplicate of the title.
   -------------------------------------------------------------------------- */
.cos-blogpage .cos-bl-featured {
	padding-block: 26px 10px;
}

.cos-blogpage .cos-bl-lead {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: 38px;
	align-items: center;
	padding: 26px;
	border: 1px solid var(--cos-line);
	border-radius: var(--cos-r-xl);
	background: var(--cos-surface);
	box-shadow: var(--cos-shadow);
}

.cos-blogpage .cos-bl-lead--noimg {
	grid-template-columns: minmax(0, 1fr);
}

.cos-blogpage .cos-bl-lead__media {
	display: block;
	overflow: hidden;
	border-radius: var(--cos-r-lg);
	/* A fixed ratio is what stops one tall photo from setting the height of the
	   whole card — the exact failure mode of the masonry this replaces. */
	aspect-ratio: 4 / 3;
	background: var(--cos-surface-3);
}

.cos-blogpage .cos-bl-lead__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .6s var(--cos-ease);
}

.cos-blogpage .cos-bl-lead:hover .cos-bl-lead__img {
	transform: scale(1.03);
}

.cos-blogpage .cos-bl-kicker {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 9px;
	margin: 0 0 12px;
	font-size: .8rem;
	font-weight: 500;
	color: var(--cos-muted);
	font-variant-numeric: tabular-nums;
}

.cos-blogpage .cos-bl-kicker__flag {
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--cos-yellow);
	color: #2b0a45;
	font-family: var(--cos-font-display);
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.cos-blogpage .cos-bl-lead__title {
	font-family: var(--cos-font-display);
	font-size: clamp(1.5rem, 2.9vw, 2.15rem);
	font-weight: 800;
	letter-spacing: -.032em;
	line-height: 1.15;
	margin: 0 0 14px;
}

.cos-blogpage .cos-bl-lead__title a {
	color: var(--cos-ink);
	text-decoration: none;
	background-image: linear-gradient(var(--cos-yellow), var(--cos-yellow));
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 0 3px;
	transition: background-size .35s var(--cos-ease);
}

.cos-blogpage .cos-bl-lead__title a:hover,
.cos-blogpage .cos-bl-lead__title a:focus-visible {
	background-size: 100% 3px;
}

.cos-blogpage .cos-bl-lead__stand {
	max-width: 52ch;
	margin: 0 0 22px;
	color: var(--cos-text);
}

/* --------------------------------------------------------------------------
   3 — The index

   Rows, not cards. Three of five posts have no image of any kind, so a card
   grid can only ever be half-empty; a row reads as complete with nothing but
   type. The whole row is one link so the tap target is the full width.
   -------------------------------------------------------------------------- */
.cos-blogpage .cos-bl-index {
	padding-block: 40px 20px;
}

.cos-blogpage .cos-bl-index__heading {
	font-family: var(--cos-font-display);
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--cos-muted);
	margin: 0 0 6px;
}

.cos-blogpage .cos-bl-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cos-blogpage .cos-bl-item {
	margin: 0;
	border-top: 1px solid var(--cos-line);
}

.cos-blogpage .cos-bl-item:last-child {
	border-bottom: 1px solid var(--cos-line);
}

/* The date lives in its own right-hand column rather than above the headline.
   With the standfirst capped at a readable measure, a two-column row left the
   right third of every row empty — the same dead space this layout replaced. */
.cos-blogpage .cos-bl-item__link {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) minmax(120px, auto);
	align-items: start;
	gap: 4px 24px;
	padding: 26px 14px 26px 4px;
	text-decoration: none;
	color: inherit;
	transition: background-color .25s var(--cos-ease), padding-left .25s var(--cos-ease);
}

.cos-blogpage .cos-bl-item__link:hover,
.cos-blogpage .cos-bl-item__link:focus-visible {
	background: var(--cos-surface-2);
	padding-left: 14px;
	text-decoration: none;
}

/* Editorial numerals — the same motif as the homepage department cards, which
   is what keeps a text-only list from reading as an unstyled <ul>. */
.cos-blogpage .cos-bl-item__num {
	font-family: var(--cos-font-display);
	font-size: .82rem;
	font-weight: 700;
	line-height: 1.9;
	color: var(--cos-line-strong);
	font-variant-numeric: tabular-nums;
	transition: color .25s var(--cos-ease);
}

.cos-blogpage .cos-bl-item__link:hover .cos-bl-item__num {
	color: var(--cos-yellow-600);
}

.cos-blogpage .cos-bl-item__body {
	display: block;
	min-width: 0;
}

.cos-blogpage .cos-bl-item__aside {
	display: flex;
	align-items: baseline;
	justify-content: flex-end;
	gap: 16px;
	padding-top: 3px;
}

.cos-blogpage .cos-bl-item__meta {
	display: block;
	text-align: right;
	font-size: .78rem;
	font-weight: 500;
	color: var(--cos-muted);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.cos-blogpage .cos-bl-item__read {
	display: block;
	font-size: .72rem;
	color: var(--cos-line-strong);
	margin-top: 3px;
}

.cos-blogpage .cos-bl-item__title {
	display: block;
	font-family: var(--cos-font-display);
	font-size: clamp(1.05rem, 1.7vw, 1.28rem);
	font-weight: 700;
	letter-spacing: -.022em;
	line-height: 1.3;
	color: var(--cos-ink);
	margin-bottom: 6px;
	max-width: 52ch;
}

.cos-blogpage .cos-bl-item__stand {
	display: block;
	max-width: 70ch;
	font-size: .93rem;
	line-height: 1.6;
	color: var(--cos-text);
}

.cos-blogpage .cos-bl-item__arrow {
	font-size: 1.05rem;
	line-height: 1;
	color: var(--cos-line-strong);
	transition: transform .25s var(--cos-ease), color .25s var(--cos-ease);
}

.cos-blogpage .cos-bl-item__link:hover .cos-bl-item__arrow {
	color: var(--cos-navy);
	transform: translateX(5px);
}

/* --------------------------------------------------------------------------
   Pagination — hidden entirely until there is a second page.
   -------------------------------------------------------------------------- */
.cos-blogpage .cos-bl-pagination {
	padding-block: 26px;
}

.cos-blogpage .cos-bl-pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.cos-blogpage .cos-bl-pagination a,
.cos-blogpage .cos-bl-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--cos-line-strong);
	border-radius: var(--cos-r-sm);
	font-weight: 600;
	font-size: .92rem;
	color: var(--cos-text);
	text-decoration: none;
}

.cos-blogpage .cos-bl-pagination a:hover {
	border-color: var(--cos-navy);
	color: var(--cos-navy);
}

.cos-blogpage .cos-bl-pagination .current {
	background: var(--cos-navy);
	border-color: var(--cos-navy);
	color: #fff;
}

/* --------------------------------------------------------------------------
   4 — Net 30 CTA
   -------------------------------------------------------------------------- */
.cos-blogpage .cos-bl-cta {
	margin-top: 46px;
	padding-block: 46px;
	background: var(--cos-navy);
	color: #fff;
}

.cos-blogpage .cos-bl-cta__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.cos-blogpage .cos-bl-cta__title {
	font-family: var(--cos-font-display);
	font-size: clamp(1.35rem, 2.5vw, 1.9rem);
	font-weight: 800;
	letter-spacing: -.03em;
	line-height: 1.15;
	color: #fff;
	margin: 0 0 8px;
}

.cos-blogpage .cos-bl-cta__text {
	max-width: 52ch;
	margin: 0;
	color: rgba(255, 255, 255, .8);
}

.cos-blogpage .cos-bl-cta__btn {
	flex: none;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
	.cos-blogpage .cos-bl-lead {
		grid-template-columns: minmax(0, 1fr);
		gap: 22px;
		padding: 18px;
	}

	.cos-blogpage .cos-bl-lead__media {
		aspect-ratio: 16 / 9;
	}
}

@media (max-width: 640px) {
	.cos-blogpage .cos-bl-head {
		padding-block: 24px 0;
	}

	.cos-blogpage .cos-bl-item__link {
		/* The numeral column costs 56px of a 320px measure — more than it is
		   worth once the title has to wrap three times. A side column cannot pay
		   for itself here either, so the date moves back above the headline —
		   via `order`, because the aside follows the body in the DOM (which is
		   the correct source order for the desktop layout). */
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		padding: 20px 4px;
	}

	.cos-blogpage .cos-bl-item__aside {
		order: -1;
	}

	.cos-blogpage .cos-bl-item__num,
	.cos-blogpage .cos-bl-item__arrow {
		display: none;
	}

	.cos-blogpage .cos-bl-item__aside {
		display: block;
		padding-top: 0;
		margin-bottom: 6px;
	}

	.cos-blogpage .cos-bl-item__meta {
		text-align: left;
	}

	.cos-blogpage .cos-bl-item__read {
		display: inline;
		margin-left: 8px;
	}

	.cos-blogpage .cos-bl-item__read::before {
		content: "· ";
	}

	.cos-blogpage .cos-bl-item__link:hover {
		padding-left: 4px;
	}

	.cos-blogpage .cos-bl-cta__inner {
		display: block;
	}

	.cos-blogpage .cos-bl-cta__btn {
		margin-top: 20px;
	}
}
