/**
 * Single post — prose tables (style 1 + style 2 layouts).
 * Neutral palette: black headings, no brand green accents.
 */

.detail-blog-content,
.detail-blog-nk__content {
	--dsp-ink: #111111;
	--dsp-body: #545454;
	--dsp-line: rgba(0, 0, 0, 0.1);
	--dsp-line-soft: rgba(0, 0, 0, 0.06);
	--dsp-paper: #ffffff;
	--dsp-muted-bg: rgba(0, 0, 0, 0.03);
	--dsp-header-bg: rgba(0, 0, 0, 0.05);
}

/* Scroll wrapper (Gutenberg + classic editor tables) */
.detail-blog-content .wp-block-table,
.detail-blog-nk__content .wp-block-table {
	width: 100%;
	max-width: 100%;
	margin: 24px 0 30px;
	overflow-x: auto;
	overflow-y: visible;
	-webkit-overflow-scrolling: touch;
	border-radius: 18px;
	border: 1px solid var(--dsp-line);
	background: var(--dsp-paper);
	box-shadow: 0 10px 28px rgba(16, 17, 14, 0.04);
}

.detail-blog-content table,
.detail-blog-nk__content table {
	display: table;
	width: 100%;
	max-width: 100%;
	margin: 24px 0 30px;
	border-collapse: separate;
	border-spacing: 0;
	table-layout: fixed;
	overflow: visible;
	border: 1px solid var(--dsp-line);
	border-radius: 18px;
	background: var(--dsp-paper);
	box-shadow: 0 10px 28px rgba(16, 17, 14, 0.04);
	font-size: 15px;
	line-height: 1.75;
	color: var(--dsp-body);
}

.detail-blog-content .wp-block-table table,
.detail-blog-nk__content .wp-block-table table {
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: transparent;
}

.detail-blog-content table caption,
.detail-blog-nk__content table caption {
	caption-side: bottom;
	padding: 12px 18px 0;
	color: var(--dsp-body);
	font-size: 13px;
	text-align: right;
}

.detail-blog-content table thead,
.detail-blog-content table tbody,
.detail-blog-nk__content table thead,
.detail-blog-nk__content table tbody {
	display: table-row-group;
	width: 100%;
}

.detail-blog-content table tr,
.detail-blog-nk__content table tr {
	display: table-row;
}

.detail-blog-content table th,
.detail-blog-content table td,
.detail-blog-nk__content table th,
.detail-blog-nk__content table td {
	display: table-cell;
	box-sizing: border-box;
}

/* Header cells */
.detail-blog-content table thead th,
.detail-blog-content table thead td,
.detail-blog-nk__content table thead th,
.detail-blog-nk__content table thead td,
.detail-blog-content table:not(:has(thead)) > tbody > tr:first-child > th,
.detail-blog-content table:not(:has(thead)) > tbody > tr:first-child > td,
.detail-blog-content table:not(:has(thead)) > tr:first-child > th,
.detail-blog-content table:not(:has(thead)) > tr:first-child > td,
.detail-blog-nk__content table:not(:has(thead)) > tbody > tr:first-child > th,
.detail-blog-nk__content table:not(:has(thead)) > tbody > tr:first-child > td,
.detail-blog-nk__content table:not(:has(thead)) > tr:first-child > th,
.detail-blog-nk__content table:not(:has(thead)) > tr:first-child > td {
	padding: 14px 16px;
	background: var(--dsp-header-bg);
	color: var(--dsp-ink);
	font-size: 14px;
	font-weight: 800;
	text-align: right;
	vertical-align: top;
	border-bottom: 1px solid var(--dsp-line);
	white-space: normal;
	word-break: break-word;
	overflow-wrap: anywhere;
	hyphens: auto;
	line-height: 1.55;
}

/* Body cells */
.detail-blog-content table tbody td,
.detail-blog-content table tbody th,
.detail-blog-nk__content table tbody td,
.detail-blog-nk__content table tbody th {
	padding: 14px 16px;
	border-bottom: 1px solid var(--dsp-line-soft);
	color: var(--dsp-body);
	font-size: 14.5px;
	line-height: 1.65;
	vertical-align: top;
	text-align: right;
	word-break: break-word;
	overflow-wrap: anywhere;
	background: transparent;
}

.detail-blog-content table tbody tr:last-child td,
.detail-blog-content table tbody tr:last-child th,
.detail-blog-nk__content table tbody tr:last-child td,
.detail-blog-nk__content table tbody tr:last-child th {
	border-bottom: 0;
}

.detail-blog-content table tbody tr:nth-child(even) td,
.detail-blog-content table tbody tr:nth-child(even) th,
.detail-blog-nk__content table tbody tr:nth-child(even) td,
.detail-blog-nk__content table tbody tr:nth-child(even) th {
	background: var(--dsp-muted-bg);
}

/* First column — slightly bolder */
.detail-blog-content table tbody td:first-child,
.detail-blog-content table tbody th:first-child,
.detail-blog-nk__content table tbody td:first-child,
.detail-blog-nk__content table tbody th:first-child {
	color: var(--dsp-ink);
	font-weight: 600;
}

/* When first row acts as header */
.detail-blog-content table:not(:has(thead)) > tbody > tr:first-child > td,
.detail-blog-content table:not(:has(thead)) > tbody > tr:first-child > th,
.detail-blog-content table:not(:has(thead)) > tr:first-child > td,
.detail-blog-content table:not(:has(thead)) > tr:first-child > th,
.detail-blog-nk__content table:not(:has(thead)) > tbody > tr:first-child > td,
.detail-blog-nk__content table:not(:has(thead)) > tbody > tr:first-child > th,
.detail-blog-nk__content table:not(:has(thead)) > tr:first-child > td,
.detail-blog-nk__content table:not(:has(thead)) > tr:first-child > th {
	background: var(--dsp-header-bg);
	color: var(--dsp-ink);
	font-weight: 800;
}

.detail-blog-content table:not(:has(thead)) > tbody > tr:first-child ~ tr:nth-child(even) td,
.detail-blog-nk__content table:not(:has(thead)) > tbody > tr:first-child ~ tr:nth-child(even) td {
	background: var(--dsp-muted-bg);
}

.detail-blog-content table:not(:has(thead)) > tbody > tr:first-child ~ tr:nth-child(odd) td,
.detail-blog-nk__content table:not(:has(thead)) > tbody > tr:first-child ~ tr:nth-child(odd) td {
	background: transparent;
}

/* Strip editor inline backgrounds that flatten the design */
.detail-blog-content table [style*="background"],
.detail-blog-nk__content table [style*="background"] {
	background: transparent !important;
}

.detail-blog-content table thead [style*="background"],
.detail-blog-content table:not(:has(thead)) > tbody > tr:first-child [style*="background"],
.detail-blog-nk__content table thead [style*="background"],
.detail-blog-nk__content table:not(:has(thead)) > tbody > tr:first-child [style*="background"] {
	background: var(--dsp-header-bg) !important;
	color: var(--dsp-ink) !important;
}

@media (max-width: 767.98px) {
	.detail-blog-content .wp-block-table,
	.detail-blog-nk__content .wp-block-table {
		border-radius: 14px;
	}

	.detail-blog-content table,
	.detail-blog-nk__content table {
		display: table;
		table-layout: fixed;
		width: 100%;
		min-width: 0;
		max-height: none;
		height: auto;
		overflow: visible;
		border-radius: 14px;
		font-size: 14px;
		margin: 20px 0 26px;
	}

	.detail-blog-content table thead th,
	.detail-blog-content table thead td,
	.detail-blog-nk__content table thead th,
	.detail-blog-nk__content table thead td,
	.detail-blog-content table tbody td,
	.detail-blog-content table tbody th,
	.detail-blog-nk__content table tbody td,
	.detail-blog-nk__content table tbody th {
		padding: 12px 10px;
		font-size: 13px;
		line-height: 1.55;
		vertical-align: top;
		text-align: right;
		white-space: normal;
		word-break: break-word;
		overflow-wrap: anywhere;
	}
}
