/* The Web Recluse Embed — single post card
   Light-touch and theme-agnostic: transparent background so it adapts to
   light/dark, a neutral hairline border, and the accent only on the button
   and hover edge. */

.twre-card {
	display: flex;
	gap: 0;
	position: relative;
	margin: 1.5em 0;
	border: 1px solid rgba( 128, 128, 128, 0.35 );
	border-radius: 10px;
	overflow: hidden;
	color: inherit;
	background: transparent;
	transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.twre-card:hover {
	border-color: rgba( 80, 80, 80, 0.7 );
	transform: translateY( -2px );
	box-shadow: 0 6px 18px rgba( 0, 0, 0, 0.12 );
}

/* The title is the only link. Force it to inherit the normal text colour
   (so the theme's red link colour doesn't apply) and don't recolour on hover. */
.twre-title-link {
	color: inherit !important;
	text-decoration: none !important;
}
.twre-title-link:hover {
	color: inherit !important;
}
/* Stretch the title link across the whole card so all of it is clickable,
   without making the card itself a link. */
.twre-title-link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* ---- Layouts ---- */
.twre-layout-left,
.twre-layout-right {
	flex-direction: row;
	align-items: stretch;
}
.twre-layout-top,
.twre-layout-text {
	flex-direction: column;
}

/* ---- Thumbnail ---- */
.twre-thumb {
	flex: 0 0 38%;
	overflow: hidden;
	background: rgba( 128, 128, 128, 0.1 );
}
.twre-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 150px;
	object-fit: cover;
}
.twre-layout-top .twre-thumb {
	flex: none;
	width: 100%;
}
.twre-layout-top .twre-thumb img {
	max-height: 220px;
	min-height: 0;
}

/* ---- Body ---- */
.twre-body {
	flex: 1 1 auto;
	padding: 18px 20px;
	min-width: 0;
}
.twre-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.72em;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	opacity: 0.7;
	margin-bottom: 8px;
}
.twre-meta .twre-sep {
	opacity: 0.5;
}
.twre-title {
	margin: 0 0 8px;
	font-size: 1.25em;
	line-height: 1.25;
	color: inherit;
}
.twre-excerpt {
	margin: 0 0 14px;
	font-size: 0.95em;
	line-height: 1.55;
	opacity: 0.85;
}
.twre-button {
	display: inline-block;
	background: var( --twre-accent, #aa0505 );
	color: #fff;
	font-size: 0.85em;
	font-weight: 600;
	line-height: 1;
	padding: 9px 16px;
	border-radius: 6px;
}

/* ---- Narrow screens: stack the row layouts ---- */
@media ( max-width: 600px ) {
	.twre-layout-left,
	.twre-layout-right {
		flex-direction: column;
	}
	.twre-layout-left .twre-thumb,
	.twre-layout-right .twre-thumb {
		flex: none;
		width: 100%;
	}
	.twre-layout-left .twre-thumb img,
	.twre-layout-right .twre-thumb img {
		max-height: 220px;
	}
}

/* ---- Alignment ----
   left/right float the card so your article text wraps around it; center
   centers the block. A default max-width keeps floats from getting too wide;
   override it per-embed with width="…". */
.twre-card.twre-align-left {
	float: left;
	max-width: 340px;
	margin: 0.3em 1.8em 1em 0;
}
.twre-card.twre-align-right {
	float: right;
	max-width: 340px;
	margin: 0.3em 0 1em 1.8em;
}
.twre-card.twre-align-center {
	margin-left: auto;
	margin-right: auto;
}
/* Floated cards are narrow, so the side-by-side image layouts get cramped —
   stack image on top inside a float for a cleaner look. */
.twre-card.twre-align-left.twre-layout-left,
.twre-card.twre-align-left.twre-layout-right,
.twre-card.twre-align-right.twre-layout-left,
.twre-card.twre-align-right.twre-layout-right {
	flex-direction: column;
}
.twre-card.twre-align-left.twre-layout-left .twre-thumb,
.twre-card.twre-align-left.twre-layout-right .twre-thumb,
.twre-card.twre-align-right.twre-layout-left .twre-thumb,
.twre-card.twre-align-right.twre-layout-right .twre-thumb {
	flex: none;
	width: 100%;
}
.twre-card.twre-align-left.twre-layout-left .twre-thumb img,
.twre-card.twre-align-left.twre-layout-right .twre-thumb img,
.twre-card.twre-align-right.twre-layout-left .twre-thumb img,
.twre-card.twre-align-right.twre-layout-right .twre-thumb img {
	max-height: 200px;
	min-height: 0;
}
