/* HNWJ Post Styles - GeneratePress */
:root {
	--hnwjp-primary: #0d5c3a;
	--hnwjp-dark: #083c26;
	--hnwjp-ink: #19201c;
	--hnwjp-body: #2a332d;
	--hnwjp-muted: #5e6962;
	--hnwjp-line: #dce4d9;
	--hnwjp-soft: #f2f6f0;
	--hnwjp-serif: 'Newsreader', Georgia, serif;
	--hnwjp-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body.single-post,
body.blog,
body.archive,
body.search {
	background-color: #fbfdf9;
	font-family: var(--hnwjp-sans);
}

/* Never let a plugin/theme drop caption text inside thumbnails */
.post-image a > *:not(img):not(picture),
.featured-image a > *:not(img):not(picture) {
	display: none !important;
}

/* ---------- Reading progress ---------- */
#hnwjp-progress {
	position: fixed;
	top: 0;
	left: 0;
	height: 3px;
	width: 0;
	background: var(--hnwjp-primary);
	z-index: 99999;
	transition: width .1s linear;
}
.admin-bar #hnwjp-progress { top: 32px; }
@media (max-width: 782px) { .admin-bar #hnwjp-progress { top: 46px; } }

/* ---------- Single post ---------- */
.single-post .inside-article {
	background: #fff;
	border: 1px solid var(--hnwjp-line);
	border-radius: 6px;
	padding: clamp(22px, 4.5vw, 56px);
}
.single-post .entry-header {
	max-width: 800px;
	margin: 0 auto 28px auto;
	text-align: center;
}
.single-post .entry-title {
	font-family: var(--hnwjp-serif);
	font-size: clamp(30px, 4.4vw, 48px);
	line-height: 1.15;
	letter-spacing: -0.015em;
	font-weight: 600;
	color: var(--hnwjp-ink);
	margin: 0 0 14px 0;
}
.single-post .entry-meta,
.single-post .entry-meta a {
	font-size: 13px;
	color: var(--hnwjp-muted);
	letter-spacing: 0.02em;
	text-decoration: none;
}
.single-post .entry-meta a:hover { color: var(--hnwjp-primary); }

.single-post .featured-image,
.single-post .post-image {
	max-width: 980px;
	margin: 0 auto 34px auto;
}
.single-post .featured-image img,
.single-post .post-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 6px;
	margin: 0 auto;
}

.single-post .entry-content {
	max-width: 740px;
	margin: 0 auto;
	font-size: 18px;
	line-height: 1.8;
	color: var(--hnwjp-body);
}
.single-post .entry-content > * { max-width: 100%; }
.single-post .entry-content p { margin: 0 0 1.35em 0; }

.hnwjp-readtime {
	font-size: 12px !important;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--hnwjp-primary);
	margin: 0 0 1.8em 0 !important;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--hnwjp-line);
}

.single-post .entry-content h2,
.single-post .entry-content h3,
.single-post .entry-content h4 {
	font-family: var(--hnwjp-serif);
	color: var(--hnwjp-ink);
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.25;
}
.single-post .entry-content h2 { font-size: clamp(26px, 3vw, 34px); margin: 2em 0 0.6em 0; }
.single-post .entry-content h3 { font-size: clamp(21px, 2.4vw, 26px); margin: 1.7em 0 0.5em 0; }
.single-post .entry-content h4 { font-size: 19px; margin: 1.5em 0 0.4em 0; }

.single-post .entry-content a {
	color: var(--hnwjp-primary);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
.single-post .entry-content a:hover { color: var(--hnwjp-dark); }

.single-post .entry-content ul,
.single-post .entry-content ol { margin: 0 0 1.4em 1.4em; }
.single-post .entry-content li { margin-bottom: 0.45em; }
.single-post .entry-content li::marker { color: var(--hnwjp-primary); }

.single-post .entry-content blockquote {
	border-left: 4px solid var(--hnwjp-primary);
	background: var(--hnwjp-soft);
	margin: 1.8em 0;
	padding: 20px 26px;
	border-radius: 0 4px 4px 0;
	font-family: var(--hnwjp-serif);
	font-style: italic;
	font-size: 1.15em;
	line-height: 1.6;
	color: var(--hnwjp-ink);
}
.single-post .entry-content blockquote p:last-child { margin-bottom: 0; }

.single-post .entry-content img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
}
.single-post .entry-content figure { margin: 1.8em 0; }
.single-post .entry-content figcaption,
.single-post .entry-content .wp-caption-text {
	font-size: 13px;
	line-height: 1.5;
	color: var(--hnwjp-muted);
	font-style: italic;
	text-align: center;
	text-decoration: none;
	margin-top: 8px;
}
.single-post .entry-content figcaption a,
.single-post .entry-content .wp-caption-text a { text-decoration: none; }

/* Tables (net worth breakdowns) */
.single-post .entry-content table {
	display: block;
	width: 100%;
	overflow-x: auto;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 1.5;
	margin: 1.8em 0;
	border: 1px solid var(--hnwjp-line);
	border-radius: 4px;
}
.single-post .entry-content th {
	background: var(--hnwjp-dark);
	color: #fff;
	text-align: left;
	padding: 10px 14px;
	font-weight: 600;
	white-space: nowrap;
}
.single-post .entry-content td {
	padding: 10px 14px;
	border-bottom: 1px solid var(--hnwjp-line);
	border-left: 0;
	border-right: 0;
}
.single-post .entry-content tbody tr:nth-child(even) td { background: #f7faf6; }

.single-post .entry-content hr {
	border: 0;
	border-top: 1px solid var(--hnwjp-line);
	margin: 2.4em 0;
}

/* Categories / tags footer */
.single-post footer.entry-meta {
	max-width: 740px;
	margin: 36px auto 0 auto;
	padding-top: 18px;
	border-top: 1px solid var(--hnwjp-line);
	font-size: 13px;
	color: var(--hnwjp-muted);
}
.single-post footer.entry-meta a {
	color: var(--hnwjp-primary);
	text-decoration: none;
	font-weight: 600;
}

.single-post .post-navigation,
.single-post #comments {
	max-width: 740px;
	margin-left: auto;
	margin-right: auto;
}

/* ---------- Keep reading ---------- */
.hnwjp-related {
	margin: 56px 0 0 0;
	padding-top: 22px;
	border-top: 2px solid var(--hnwjp-ink);
	font-family: var(--hnwjp-sans);
}
.hnwjp-related-title {
	font-family: var(--hnwjp-serif);
	font-size: 24px !important;
	font-weight: 700;
	color: var(--hnwjp-ink);
	margin: 0 0 8px 0 !important;
	line-height: 1.2 !important;
}
.hnwjp-rel-item {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 18px;
	align-items: center;
	padding: 16px 0;
	border-bottom: 1px dashed var(--hnwjp-line);
}
.hnwjp-rel-item:last-child { border-bottom: 0; }
.hnwjp-rel-thumb {
	display: block;
	width: 110px;
	height: 80px;
	border-radius: 4px;
	background-color: var(--hnwjp-primary);
	background-size: cover;
	background-position: center;
	font-size: 0;
	line-height: 0;
	overflow: hidden;
}
.hnwjp-rel-text { display: flex; flex-direction: column; gap: 4px; }
.hnwjp-rel-cat {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--hnwjp-primary);
}
.single-post .entry-content a.hnwjp-rel-link {
	font-family: var(--hnwjp-serif);
	font-size: 19px;
	line-height: 1.3;
	font-weight: 600;
	color: var(--hnwjp-ink);
	text-decoration: none;
}
.single-post .entry-content a.hnwjp-rel-link:hover { color: var(--hnwjp-primary); }
.hnwjp-rel-date { font-size: 12px; color: var(--hnwjp-muted); }

/* ---------- Blog / category / search listings ---------- */
body:not(:has(.generate-columns-container)).blog .site-main,
body:not(:has(.generate-columns-container)).archive .site-main,
body:not(:has(.generate-columns-container)).search .site-main {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
	gap: 28px;
	align-items: stretch;
}
.blog .site-main > .page-header,
.archive .site-main > .page-header,
.search .site-main > .page-header,
.blog .site-main > .paging-navigation,
.archive .site-main > .paging-navigation,
.search .site-main > .paging-navigation,
.blog .site-main > nav,
.archive .site-main > nav,
.search .site-main > nav,
.archive .site-main > .no-results,
.search .site-main > .no-results {
	grid-column: 1 / -1;
}

.archive .page-header,
.search .page-header { margin-bottom: 8px; }
.archive .page-title,
.search .page-title {
	font-family: var(--hnwjp-serif);
	font-size: clamp(28px, 3.6vw, 42px);
	font-weight: 600;
	letter-spacing: -0.015em;
	color: var(--hnwjp-ink);
}
.archive .taxonomy-description { color: var(--hnwjp-muted); font-size: 16px; }

.blog article.post,
.archive article.post,
.search article.post { margin: 0; }

.blog article.post .inside-article,
.archive article.post .inside-article,
.search article.post .inside-article {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 0;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--hnwjp-line);
	border-radius: 6px;
	transition: transform .18s, box-shadow .18s;
}
.blog article.post .inside-article:hover,
.archive article.post .inside-article:hover,
.search article.post .inside-article:hover {
	transform: translateY(-4px);
	box-shadow: 0 20px 40px -24px rgba(17, 21, 18, 0.25);
}

.blog article .post-image,
.archive article .post-image,
.search article .post-image {
	order: -1;
	margin: 0;
}
.blog article .post-image img,
.archive article .post-image img,
.search article .post-image img {
	display: block;
	width: 100%;
	height: 200px;
	object-fit: cover;
	margin: 0;
	border-radius: 0;
}

.blog article .entry-header,
.archive article .entry-header,
.search article .entry-header,
.blog article .entry-summary,
.archive article .entry-summary,
.search article .entry-summary,
.blog article footer.entry-meta,
.archive article footer.entry-meta,
.search article footer.entry-meta {
	padding-left: 22px;
	padding-right: 22px;
}
.blog article .entry-header,
.archive article .entry-header,
.search article .entry-header { padding-top: 20px; }
.blog article .entry-summary,
.archive article .entry-summary,
.search article .entry-summary { padding-bottom: 20px; flex-grow: 1; }

.blog article .entry-title,
.archive article .entry-title,
.search article .entry-title {
	font-family: var(--hnwjp-serif);
	font-size: 21px;
	line-height: 1.3;
	font-weight: 600;
	letter-spacing: -0.01em;
	margin: 0 0 8px 0;
}
.blog article .entry-title a,
.archive article .entry-title a,
.search article .entry-title a { color: var(--hnwjp-ink); text-decoration: none; }
.blog article .entry-title a:hover,
.archive article .entry-title a:hover,
.search article .entry-title a:hover { color: var(--hnwjp-primary); }

.blog article .entry-meta,
.archive article .entry-meta,
.search article .entry-meta,
.blog article .entry-meta a,
.archive article .entry-meta a,
.search article .entry-meta a {
	font-size: 12px;
	color: var(--hnwjp-muted);
	text-decoration: none;
}
.blog article .entry-summary p,
.archive article .entry-summary p,
.search article .entry-summary p {
	font-size: 14px;
	line-height: 1.6;
	color: var(--hnwjp-muted);
	margin: 0 0 12px 0;
}
.blog article a.read-more,
.archive article a.read-more,
.search article a.read-more {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--hnwjp-primary);
	text-decoration: none;
}
.blog article footer.entry-meta,
.archive article footer.entry-meta,
.search article footer.entry-meta {
	padding-top: 12px;
	padding-bottom: 16px;
	border-top: 1px solid var(--hnwjp-line);
}

/* Pagination */
.nav-links .page-numbers {
	display: inline-block;
	padding: 6px 14px;
	margin: 0 4px 6px 0;
	background: #fff;
	border: 1px solid var(--hnwjp-line);
	border-radius: 100px;
	color: var(--hnwjp-muted);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}
.nav-links .page-numbers:hover { border-color: var(--hnwjp-primary); color: var(--hnwjp-dark); }
.nav-links .page-numbers.current {
	background: var(--hnwjp-primary);
	border-color: var(--hnwjp-primary);
	color: #fff;
}


/* ---------- v1.0.1: full-width layout, title above image, tidy caption ---------- */

/* No empty sidebar column on single posts */
.single-post #right-sidebar,
.single-post #left-sidebar,
.single-post .is-right-sidebar,
.single-post .is-left-sidebar { display: none !important; }
.single-post .content-area { width: 100% !important; float: none; }
.single-post .site-main { max-width: 900px; margin-left: auto; margin-right: auto; }

/* Order inside the article: title -> image -> text -> footer */
.single-post .inside-article { display: flex; flex-direction: column; }
.single-post .inside-article > .entry-header { order: 1; width: 100%; }
.single-post .inside-article > .featured-image,
.single-post .inside-article > .post-image {
	order: 2;
	width: 100%;
	max-width: 100%;
	margin: 0 0 34px 0;
}
.single-post .inside-article > .entry-content { order: 3; width: 100%; }
.single-post .inside-article > footer.entry-meta { order: 4; width: 100%; }

/* Featured image caption (the "authentic photograph..." line) */
.single-post .featured-image figcaption,
.single-post .featured-image .wp-caption-text,
.single-post .featured-image .wp-element-caption,
.single-post .post-image figcaption,
.single-post .post-image .wp-caption-text,
.single-post .post-image .wp-element-caption {
	background: none;
	border: 0;
	padding: 10px 0 0 0;
	margin: 0;
	font-size: 12px;
	line-height: 1.5;
	color: var(--hnwjp-muted);
	font-style: italic;
	text-align: center;
	text-decoration: none;
}

/* Optional: hide that caption (see hnwjp_hide_featured_caption filter) */
.hnwjp-hide-caption .featured-image figcaption,
.hnwjp-hide-caption .featured-image .wp-caption-text,
.hnwjp-hide-caption .featured-image .wp-element-caption,
.hnwjp-hide-caption .post-image figcaption,
.hnwjp-hide-caption .post-image .wp-caption-text,
.hnwjp-hide-caption .post-image .wp-element-caption,
.hnwjp-hide-caption .featured-image > *:not(img):not(a):not(picture),
.hnwjp-hide-caption .post-image > *:not(img):not(a):not(picture) { display: none !important; }

/* "8 min read" centred like the title */
.single-post .entry-content .hnwjp-readtime { text-align: center; }


/* ---------- v1.0.2: full width single posts ---------- */
.single-post .site-main { max-width: none; margin-left: 0; margin-right: 0; }
.single-post .inside-article > .entry-header,
.single-post .entry-header { max-width: 100%; }
.single-post .inside-article > .entry-content,
.single-post .entry-content { max-width: 100%; }
.single-post footer.entry-meta,
.single-post .post-navigation,
.single-post #comments { max-width: 100%; }
.single-post .featured-image,
.single-post .post-image { max-width: 100%; }
.single-post .entry-content > * { max-width: 100%; }


/* ---------- v1.0.3: tables / Quick Facts ---------- */
.single-post .entry-content .wp-block-table { margin: 1.8em 0; overflow-x: auto; }
.single-post .entry-content table {
	display: table;
	width: 100%;
	table-layout: auto;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	border: 1px solid var(--hnwjp-line);
	border-radius: 6px;
	background: #fff;
	font-size: 15px;
	line-height: 1.55;
	margin: 1.8em 0;
}
.single-post .entry-content .wp-block-table table { margin: 0; }
.single-post .entry-content table th,
.single-post .entry-content table td {
	padding: 12px 16px;
	text-align: left;
	vertical-align: top;
	border: 0;
	border-bottom: 1px solid var(--hnwjp-line);
	word-break: break-word;
	white-space: normal;
}
.single-post .entry-content table tr:last-child th,
.single-post .entry-content table tr:last-child td { border-bottom: 0; }

/* Label cells (Quick Facts style: label | value) */
.single-post .entry-content table th {
	background: var(--hnwjp-soft);
	color: var(--hnwjp-ink);
	font-weight: 700;
	width: 34%;
}
.single-post .entry-content table td { background: #fff; color: var(--hnwjp-body); }
.single-post .entry-content table tbody tr:nth-child(even) td { background: #fbfdf9; }

/* Real header row */
.single-post .entry-content table thead th {
	background: var(--hnwjp-dark);
	color: #fff;
	width: auto;
	white-space: nowrap;
}

/* Value cell that is also bold (many Quick Facts tables bold the first column) */
.single-post .entry-content table td:first-child strong { color: var(--hnwjp-ink); }

@media (max-width: 600px) {
	.single-post .entry-content table th,
	.single-post .entry-content table td { padding: 10px 12px; font-size: 14px; }
	.single-post .entry-content table th { width: 42%; }
	/* wide tables (3+ columns) scroll sideways instead of squashing */
	.single-post .entry-content table:has(tr > :nth-child(3)) { display: block; overflow-x: auto; }
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
	.single-post .inside-article { padding: 20px 16px; border-radius: 4px; }
	.single-post .entry-content { font-size: 17px; line-height: 1.75; }
	.hnwjp-rel-item { grid-template-columns: 86px 1fr; gap: 14px; }
	.hnwjp-rel-thumb { width: 86px; height: 66px; }
	.blog article .post-image img,
	.archive article .post-image img,
	.search article .post-image img { height: 180px; }
}
