/**
 * Armchair Journal — Article Card Styles
 * Lead, Rail, Row, Standard, and Search card variants.
 */

.aj-article-card {
	display: flex;
	flex-direction: column;
	background-color: #ffffff;
}

.aj-card-eyebrow {
	display: inline-block;
	font-size: 9.5px;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--aj-color-crimson, #c33d29);
	margin-bottom: 8px;
	text-decoration: none;
	transition: color 0.18s ease;
}

.aj-card-eyebrow:hover {
	color: #8f2a1a;
}

.aj-card-title {
	font-family: var(--aj-font-serif, 'EB Garamond', serif);
	font-weight: 500;
	color: var(--aj-color-text-primary, #16233a);
	margin: 0 0 10px;
	line-height: 1.2;
}

.aj-card-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.18s ease;
}

.aj-card-title a:hover {
	color: var(--aj-color-navy-light, #1a3d74);
}

.aj-card-dek {
	font-size: 14px;
	line-height: 1.55;
	color: var(--aj-color-text-secondary, #616a78);
	margin: 0 0 14px;
	text-wrap: pretty;
}

.aj-card-byline {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--aj-color-text-muted, #8a94a3);
}

.aj-card-placeholder {
	width: 100%;
	height: 100%;
	background-color: var(--aj-color-border-light, #eef1f6);
	display: flex;
	align-items: flex-end;
	padding: 12px;
}

.aj-card-img-label {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--aj-color-text-muted, #5f697a);
}

.aj-card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ─── Lead Card ─── */
.aj-card-lead {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.aj-card-lead .aj-card-media-aspect {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background-color: #e4e8ef;
	overflow: hidden;
}

.aj-card-lead .aj-card-title {
	font-size: 38px;
	line-height: 1.12;
	letter-spacing: -0.015em;
	text-wrap: pretty;
}

.aj-card-lead .aj-card-dek {
	font-family: var(--aj-font-serif, 'EB Garamond', serif);
	font-style: italic;
	font-size: 18px;
	line-height: 1.5;
	color: var(--aj-color-text-secondary, #616a78);
	margin-bottom: 16px;
}

.aj-card-lead .aj-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding-top: 14px;
	border-top: 1px solid var(--aj-color-border-light, #eef1f6);
}

/* ─── Rail Card ─── */
.aj-card-rail {
	padding: 16px 0;
	border-bottom: 1px solid var(--aj-color-border-light, #eef1f6);
}

.aj-card-rail:first-child {
	padding-top: 0;
}

.aj-card-rail:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.aj-card-rail .aj-card-title {
	font-size: 19px;
	line-height: 1.25;
	font-weight: 500;
	margin-bottom: 8px;
}

.aj-card-rail .aj-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 8px;
}

/* ─── Row Card (Section Archive) ─── */
.aj-card-row {
	display: grid;
	grid-template-columns: 172px 1fr 152px;
	gap: 0 26px;
	align-items: start;
	padding: 22px 0;
	border-bottom: 1px solid var(--aj-color-border-light, #eef1f6);
	text-decoration: none;
	transition: background-color 0.18s ease;
}

.aj-card-row:hover {
	background-color: #fbfcfd;
}

.aj-card-row-thumb {
	position: relative;
	height: 114px;
	background-color: var(--aj-color-border-light, #eef1f6);
	overflow: hidden;
	display: block;
}

.aj-card-row .aj-card-title {
	font-size: 23px;
	line-height: 1.24;
	font-weight: 500;
	letter-spacing: -0.01em;
	margin-bottom: 8px;
}

.aj-card-row .aj-card-row-bias {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding-top: 4px;
}

/*
 * A Section row carries a readout for each lens and shows the active one. Both are
 * in the markup, so the lens toggle only flips [hidden] — declared here so no
 * inherited display rule can leave the inactive lens visible.
 */
.aj-card-row-lens {
	display: inline-flex;
	align-items: center;
}

.aj-card-lens[hidden],
.aj-card-row-lens[hidden] {
	display: none;
}

/* Shown in place of the Bias Bar when a piece carries no measurement. */
.aj-card-unscored {
	font-family: var(--aj-font-mono, 'IBM Plex Mono', monospace);
	font-size: var(--aj-fs-10, 10px);
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--aj-color-ink-muted, #616a79);
	line-height: 1.25;
}

/* ─── Search / Discover Result Card ─── */
.aj-card-search {
	display: flex;
	gap: 16px;
	padding: 16px 0;
	border-bottom: 1px solid var(--aj-color-border-light, #e4e8ef);
	text-decoration: none;
	transition: background-color 0.18s ease;
}

.aj-card-search:hover {
	background-color: #f6f7fa;
}

.aj-card-search-thumb {
	width: 84px;
	height: 84px;
	flex-shrink: 0;
	background-color: #e4e8ef;
	display: flex;
	align-items: flex-end;
	padding: 8px;
}

.aj-card-search .aj-card-title {
	font-size: 19px;
	line-height: 1.26;
	font-weight: 500;
	margin-bottom: 6px;
}

.aj-card-search-thumb.has-image {
	padding: 0;
	overflow: hidden;
}

.aj-card-search .aj-card-body {
	flex: 1;
	min-width: 0;
}

.aj-card-search .aj-bias-bar-wrap {
	margin-top: 8px;
}

/* ─── Standard Card ─── */
.aj-card-standard {
	border: 1px solid var(--aj-color-border-default, #dfe3ea);
	padding: 20px;
	gap: 14px;
}

.aj-card-standard .aj-card-media-aspect {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	background-color: #e4e8ef;
	overflow: hidden;
	margin-bottom: 14px;
}

.aj-card-standard .aj-card-title {
	font-size: 21px;
	line-height: 1.24;
}

/* ─── Responsive Media Queries ─── */
@media (max-width: 900px) {
	.aj-card-lead .aj-card-title {
		font-size: 32px;
	}
}

@media (max-width: 760px) {
	.aj-card-row {
		grid-template-columns: 1fr;
		gap: 16px;
	}
	.aj-card-row-thumb {
		height: 180px;
	}
	.aj-card-row .aj-card-row-bias {
		justify-content: flex-start;
	}
	.aj-card-lead .aj-card-title {
		font-size: 28px;
	}
}

/* ─────────────────────────────────────────────────────────────────────
 * LOCAL PATCH, 5 September 2026. Not from Sairam's repo.
 * Restores three values to the design handoff
 * (design_handoff_desktop/pages/Armchair Journal.dc.html).
 * Delete this block once he folds the same changes into the theme.
 * ───────────────────────────────────────────────────────────────────── */

/* The design gives the cards no background. They are transparent list
   items sitting on the #f6f7fa page. The white here turned each one into
   a box, and because every variant is padded `16px 0` with no horizontal
   padding, the text landed flush on the white edge and read as cut off. */
.aj-article-card {
	background-color: transparent;
}

/* Design: 12px, sentence case, #616a78, no letter-spacing. Uppercasing it
   at 700 with 0.09em made the byline about a quarter wider, which is what
   crowded the bias readout at the other end of the footer row. */
.aj-card-byline {
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	color: var(--aj-color-text-secondary, #616a78);
}
