/*
 * Mitarai Digital Folio — custom CSS extras.
 * Layered on top of the inline Tailwind config from code.html.
 * All tokens below are the same Material-style palette declared in functions.php
 * (primary #570013, surface #fbf9f4, surface-container-low #f5f3ee, etc.)
 */

/* --- Post content wrapper --- */
.enp-content {
	font-family: "Inter", sans-serif;
	color: #1b1c19;
	line-height: 1.75;
}

.enp-content p {
	margin-bottom: 1.25rem;
}

.enp-content strong {
	color: #570013;
	font-weight: 600;
}

.enp-content a {
	color: #570013;
	text-decoration: none;
	border-bottom: 1px solid rgba(87, 0, 19, 0.25);
	transition: border-color 220ms ease, color 220ms ease;
}

.enp-content a:hover {
	color: #af2b3e;
	border-bottom-color: #af2b3e;
}

/* Headings inherit font-headline (Noto Serif) from Tailwind */
.enp-content h2 {
	font-family: "Noto Serif", serif;
	font-size: 2.25rem;
	color: #1b1c19;
	margin-top: 4rem;
	margin-bottom: 1.75rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid #e4e2dd;
	letter-spacing: -0.015em;
}

.enp-content h3 {
	font-family: "Noto Serif", serif;
	font-size: 1.5rem;
	color: #1b1c19;
	margin-top: 2.5rem;
	margin-bottom: 1rem;
	letter-spacing: -0.01em;
}

/* --- Snippet / intro paragraph --- */
.enp-content .enp-snippet {
	font-size: 1.1875rem;
	line-height: 1.7;
	color: #584141;
	border-left: 2px solid #570013;
	padding: 0.25rem 0 0.25rem 1.5rem;
	margin-bottom: 2.5rem;
}

.enp-content .enp-snippet strong {
	color: #570013;
}

/* --- Comparison / timeline table --- */
.enp-content .enp-table {
	width: 100%;
	border-collapse: collapse;
	font-family: "Inter", sans-serif;
	font-size: 0.9375rem;
	margin: 0 0 2rem;
	background: #fbf9f4;
}

.enp-content .enp-table thead th {
	font-family: "Inter", sans-serif;
	font-size: 0.6875rem;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: #584141;
	font-weight: 500;
	padding: 0.9rem 0.75rem;
	border-bottom: 2px solid #570013;
	background: #f5f3ee;
	text-align: left;
}

.enp-content .enp-table thead th[class*="text-right"],
.enp-content .enp-table thead th:last-child {
	text-align: right;
}

.enp-content .enp-table tbody tr {
	transition: background-color 180ms ease;
}

.enp-content .enp-table tbody tr:nth-child(even) {
	background: rgba(245, 243, 238, 0.55);
}

.enp-content .enp-table tbody tr:hover {
	background: #eae8e3;
}

.enp-content .enp-table tbody td {
	padding: 0.85rem 0.75rem;
	border-bottom: 1px solid rgba(224, 191, 191, 0.25);
	vertical-align: middle;
}

.enp-content .enp-table tbody td a {
	border-bottom: none;
}

.enp-content .enp-table tbody td a:hover {
	color: #570013;
}

.enp-content .enp-table tbody tr td:first-child {
	position: relative;
	padding-left: 1.25rem;
}

.enp-content .enp-table tbody tr td:first-child::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.9rem;
	bottom: 0.9rem;
	width: 3px;
	background: transparent;
	transition: background-color 180ms ease;
}

.enp-content .enp-table tbody tr:hover td:first-child::before {
	background: #570013;
}

/* Genre-coded left accents on tables that carry data-genre */
.enp-content .enp-table tbody tr[data-genre="tragedy"]       td:first-child::before { background: #570013; }
.enp-content .enp-table tbody tr[data-genre="history"]       td:first-child::before { background: #8e0f28; }
.enp-content .enp-table tbody tr[data-genre="comedy"]        td:first-child::before { background: #5d4201; }
.enp-content .enp-table tbody tr[data-genre="romance"]       td:first-child::before { background: #af2b3e; }
.enp-content .enp-table tbody tr[data-genre="problem-play"]  td:first-child::before { background: #352400; }

/* Period-coded */
.enp-content .enp-table tbody tr[data-period="early"]  td:first-child::before { background: #c8a35b; }
.enp-content .enp-table tbody tr[data-period="middle"] td:first-child::before { background: #af2b3e; }
.enp-content .enp-table tbody tr[data-period="late"]   td:first-child::before { background: #570013; }

/* Headline numbers within tables */
.enp-content .enp-table .font-headline {
	font-family: "Noto Serif", serif;
}

/* --- Stats strip --- */
.enp-content .enp-stats-strip {
	display: grid;
	gap: 1.5rem;
	padding: 2.25rem 0;
	margin: 0 0 3rem;
	border-top: 1px solid #e4e2dd;
	border-bottom: 1px solid #e4e2dd;
	position: relative;
}

@media (min-width: 768px) {
	.enp-content .enp-stats-strip {
		grid-template-columns: repeat(var(--enp-stat-cols, 4), 1fr);
		gap: 0;
	}
	.enp-content .enp-stats-strip > * {
		padding: 0 1.75rem;
		border-right: 1px solid #e4e2dd;
	}
	.enp-content .enp-stats-strip > *:first-child { padding-left: 0; }
	.enp-content .enp-stats-strip > *:last-child  { padding-right: 0; border-right: none; }
}

.enp-content .enp-stat-number {
	font-family: "Noto Serif", serif;
	font-size: 2.5rem;
	line-height: 1;
	color: #570013;
	margin-bottom: 0.5rem;
	letter-spacing: -0.02em;
}

.enp-content .enp-stat-label {
	font-size: 0.6875rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: #584141;
	font-weight: 500;
}

.enp-content .enp-stat-sub {
	margin-top: 0.375rem;
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	color: #8c7071;
}

/* --- FAQ items --- */
.enp-content .enp-faq-q {
	font-family: "Noto Serif", serif;
	font-size: 1.25rem;
	color: #570013;
	margin-top: 2rem;
	margin-bottom: 0;
	padding: 1rem 1.5rem;
	background: #f5f3ee;
	border-left: 3px solid #570013;
	letter-spacing: -0.005em;
}

.enp-content .enp-faq-q::before {
	content: "Q. ";
	font-family: "Inter", sans-serif;
	font-size: 0.6875rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: #8c7071;
	margin-right: 0.5rem;
	font-weight: 500;
	display: inline-block;
	vertical-align: 0.2em;
}

.enp-content .enp-faq-a {
	padding: 1.5rem 1.5rem 1.75rem;
	background: #fbf9f4;
	border-left: 3px solid #e4e2dd;
	margin-bottom: 0;
	color: #1b1c19;
	font-size: 0.9375rem;
	line-height: 1.75;
}

.enp-content .enp-faq-a::before {
	content: "A. ";
	font-family: "Inter", sans-serif;
	font-size: 0.6875rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: #8c7071;
	margin-right: 0.5rem;
	font-weight: 500;
	display: inline-block;
	vertical-align: 0.2em;
}

/* --- Dialogue blocks (scene pages) --- */
.enp-content .enp-dialogue {
	background: #f5f3ee;
	padding: 2.5rem 2rem;
	margin: 3rem 0;
	border-left: 2px solid #af2b3e;
	border-radius: 0;
}

@media (min-width: 1024px) {
	.enp-content .enp-dialogue {
		padding: 3rem 3rem;
	}
}

.enp-content .enp-speech {
	margin-bottom: 1.75rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid rgba(224, 191, 191, 0.3);
}

.enp-content .enp-speech:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.enp-content .enp-speech > .font-headline {
	font-family: "Noto Serif", serif;
	font-size: 1.125rem;
	color: #570013;
	margin-bottom: 0.5rem;
	letter-spacing: 0.02em;
}

.enp-content .enp-speech > .text-on-surface {
	color: #1b1c19;
	line-height: 1.75;
	font-style: italic;
}

/* --- Hub cards (genre / period quick cards) --- */
.enp-content .enp-hub-card {
	display: flex;
	flex-direction: column;
	padding: 2rem;
	background: #ffffff;
	border-top: 3px solid #570013;
	transition: box-shadow 340ms ease, transform 340ms ease;
	text-decoration: none;
	border-bottom: none;
	min-height: 11rem;
}

.enp-content .enp-hub-card:hover {
	box-shadow: 0 20px 40px rgba(88, 65, 65, 0.12);
	transform: translateY(-2px);
}

.enp-content .enp-hub-card .enp-hub-label {
	font-size: 0.6875rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: #570013;
	margin-bottom: 0.75rem;
	font-weight: 500;
}

.enp-content .enp-hub-card .enp-hub-title {
	font-family: "Noto Serif", serif;
	font-size: 1.875rem;
	color: #1b1c19;
	margin-bottom: 1rem;
	letter-spacing: -0.01em;
	line-height: 1.15;
}

.enp-content .enp-hub-card:hover .enp-hub-title {
	color: #570013;
}

.enp-content .enp-hub-card .enp-hub-meta {
	display: flex;
	gap: 1.5rem;
	margin-top: auto;
	padding-top: 1rem;
	border-top: 1px solid #e4e2dd;
	font-size: 0.6875rem;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: #584141;
}

.enp-content .enp-hub-card .enp-hub-meta strong {
	font-family: "Noto Serif", serif;
	font-size: 1rem;
	color: #1b1c19;
	font-weight: 700;
	margin-right: 0.375rem;
	letter-spacing: normal;
}

.enp-content .enp-hub-card[data-genre="tragedy"]       { border-top-color: #570013; }
.enp-content .enp-hub-card[data-genre="history"]       { border-top-color: #8e0f28; }
.enp-content .enp-hub-card[data-genre="comedy"]        { border-top-color: #5d4201; }
.enp-content .enp-hub-card[data-genre="romance"]       { border-top-color: #af2b3e; }
.enp-content .enp-hub-card[data-genre="problem-play"]  { border-top-color: #352400; }

.enp-content .enp-hub-card[data-period="early"]  { border-top-color: #c8a35b; }
.enp-content .enp-hub-card[data-period="middle"] { border-top-color: #af2b3e; }
.enp-content .enp-hub-card[data-period="late"]   { border-top-color: #570013; }

/* --- Period group divider inside timeline table --- */
.enp-content .enp-table tbody tr.enp-period-divider td {
	background: #f0eee9;
	padding: 0.5rem 0.75rem;
	font-size: 0.6875rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: #570013;
	font-weight: 500;
	border-top: 2px solid #570013;
	border-bottom: 1px solid #e4e2dd;
}

.enp-content .enp-table tbody tr.enp-period-divider td:first-child::before {
	display: none;
}

/* --- Lists (ol/ul) --- */
.enp-content ol,
.enp-content ul {
	margin: 0 0 1.5rem;
	padding-left: 1.5rem;
}

.enp-content ol li,
.enp-content ul li {
	margin-bottom: 0.5rem;
	line-height: 1.75;
}

.enp-content .enp-speakers li::marker {
	color: #570013;
	font-family: "Noto Serif", serif;
	font-weight: 700;
}

/* --- Scroll cue on wide tables --- */
.enp-content .overflow-x-auto {
	position: relative;
}

@media (max-width: 900px) {
	.enp-content .enp-table {
		font-size: 0.8125rem;
	}
	.enp-content .enp-table thead th,
	.enp-content .enp-table tbody td {
		padding: 0.6rem 0.5rem;
	}
	.enp-content h2 {
		font-size: 1.75rem;
		margin-top: 3rem;
	}
	.enp-content .enp-snippet {
		font-size: 1rem;
	}
}
