/*
 * Word Finder Suite - article / content format.
 *
 * One reading layout for every content page and post: a sticky numbered
 * "On this page" list beside the article, the article in a rounded card,
 * serif headings with an accent bar, roomy body text. Uses the brand green
 * (#0c2910) and red (#d8422f). Scoped under .wfs-article and a few body
 * classes so it leaves the tool hero and the theme header/footer alone.
 */

:root {
	--wfs-green: #0c2910;
	--wfs-green-soft: #163d1c;
	--wfs-red: #d8422f;
	--wfs-cream: #fef3e1;
	--wfs-cream-soft: #fff9ef;
	--wfs-ink: #1d2c1f;
	--wfs-muted: #5b655e;
	--wfs-line: rgba(12, 41, 16, 0.12);
	--wfs-serif: Fraunces, Georgia, "Times New Roman", serif;
	--wfs-sans: Figtree, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Layout shell ---------- */
.wfs-article {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2rem;
	max-width: 1120px;
	margin: 2.5rem auto 3rem;
	padding: 2rem;
	background: linear-gradient(180deg, var(--wfs-cream) 0%, var(--wfs-cream-soft) 100%);
	border-radius: 32px;
	font-family: var(--wfs-sans);
	box-sizing: border-box;
}

.wfs-article.has-toc {
	grid-template-columns: 250px minmax(0, 1fr);
	align-items: start;
}

.wfs-article .wfs-article__card {
	background: #fff;
	border: 1px solid rgba(12, 41, 16, 0.06);
	border-radius: 28px;
	box-shadow: 0 24px 60px rgba(12, 41, 16, 0.08);
	padding: 3.25rem 3.5rem 3rem;
	min-width: 0;
	box-sizing: border-box;
}

.wfs-article .wfs-article__card > :first-child,
.wfs-article .wfs-article__card > .entry-content > :first-child {
	margin-top: 0;
}

.wfs-article .wfs-article__card > :last-child {
	margin-bottom: 0;
}

/* Theme content wrapper inside the card: no extra box or spacing */
.wfs-article .wfs-article__card > .entry-content {
	margin: 0;
	padding: 0;
	max-width: none;
	border: 0;
	box-shadow: none;
	background: none;
}

/* ---------- On this page ---------- */
.wfs-toc {
	position: sticky;
	top: 6rem;
	font-size: 0.9rem;
}

.wfs-toc summary {
	list-style: none;
	cursor: default;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wfs-green-soft);
	margin: 0 0 0.9rem;
	padding: 0 0.6rem;
}

.wfs-toc summary::-webkit-details-marker {
	display: none;
}

.wfs-toc ol {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: wfs-toc;
	max-height: calc(100vh - 10rem);
	overflow: auto;
}

.wfs-toc li {
	counter-increment: wfs-toc;
	margin: 0;
}

.wfs-toc a {
	display: flex;
	gap: 0.7rem;
	align-items: baseline;
	padding: 0.5rem 0.6rem;
	border-radius: 12px;
	text-decoration: none;
	color: var(--wfs-muted);
	line-height: 1.3;
	transition: background 0.15s ease, color 0.15s ease;
}

.wfs-toc a::before {
	content: counter(wfs-toc, decimal-leading-zero);
	flex: none;
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--wfs-green-soft);
}

.wfs-toc a:hover,
.wfs-toc a:focus-visible {
	color: var(--wfs-green);
	background: rgba(255, 255, 255, 0.7);
}

.wfs-toc a.is-active {
	background: #fff;
	color: var(--wfs-green);
	font-weight: 700;
	box-shadow: 0 2px 10px rgba(12, 41, 16, 0.08);
}

.wfs-toc a.is-active::before {
	color: var(--wfs-red);
}

/* ---------- Typography inside the card ---------- */
.wfs-article .wfs-article__card,
.wfs-article .wfs-article__card p,
.wfs-article .wfs-article__card li {
	font-family: var(--wfs-sans);
	color: var(--wfs-ink);
}

.wfs-article .wfs-article__card p,
.wfs-article .wfs-article__card li {
	font-size: 1.12rem;
	line-height: 1.7;
}

.wfs-article .wfs-article__card p {
	margin: 0 0 1.15rem;
}

.wfs-article .wfs-article__card h2,
.wfs-article .wfs-article__card h3,
.wfs-article .wfs-article__card h4 {
	font-family: var(--wfs-serif);
	color: var(--wfs-green);
	font-weight: 600;
	scroll-margin-top: 6rem;
}

.wfs-article .wfs-article__card h2 {
	position: relative;
	font-size: 2rem;
	line-height: 1.18;
	letter-spacing: -0.012em;
	margin: 4rem 0 1.1rem;
	padding: 1.1rem 0 0;
	border: 0;
	display: block;
}

.wfs-article .wfs-article__card h2::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 44px;
	height: 4px;
	border-radius: 4px;
	background: linear-gradient(90deg, var(--wfs-green), var(--wfs-red));
}

.wfs-article .wfs-article__card > h2:first-child,
.wfs-article .wfs-article__card > .entry-content > h2:first-child {
	margin-top: 0;
}

.wfs-article .wfs-article__card h3 {
	font-size: 1.4rem;
	line-height: 1.25;
	margin: 2.2rem 0 0.6rem;
}

.wfs-article .wfs-article__card h4 {
	font-size: 1.15rem;
	margin: 1.6rem 0 0.4rem;
}

.wfs-article .wfs-article__card a {
	color: var(--wfs-green);
	text-decoration: underline;
	text-decoration-color: rgba(216, 66, 47, 0.55);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.wfs-article .wfs-article__card a:hover,
.wfs-article .wfs-article__card a:focus-visible {
	color: var(--wfs-red);
}

.wfs-article .wfs-article__card strong {
	color: var(--wfs-green);
}

/* Steps: numbered ordered list */
.wfs-article .wfs-article__card ol:not(.wfs-toc ol) {
	list-style: none;
	counter-reset: wfs-step;
	margin: 0 0 1.6rem;
	padding: 0;
}

.wfs-article .wfs-article__card ol:not(.wfs-toc ol) > li {
	counter-increment: wfs-step;
	position: relative;
	margin: 0 0 0.75rem;
	padding: 0.15rem 0 0.15rem 3rem;
}

.wfs-article .wfs-article__card ol:not(.wfs-toc ol) > li::before {
	content: counter(wfs-step);
	position: absolute;
	left: 0;
	top: 0.2rem;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: var(--wfs-cream);
	color: var(--wfs-green);
	font-weight: 700;
	font-size: 0.95rem;
	line-height: 2rem;
	text-align: center;
	box-shadow: inset 0 0 0 1.5px rgba(12, 41, 16, 0.18);
}

/* Plain bullets */
.wfs-article .wfs-article__card ul:not(.wfs-guide__links) {
	margin: 0 0 1.4rem;
	padding-left: 1.4rem;
}

.wfs-article .wfs-article__card ul:not(.wfs-guide__links) li::marker {
	color: var(--wfs-red);
}

/* Pill link lists */
.wfs-article .wfs-article__card ul.wfs-guide__links {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	margin: 0 0 1.2rem;
	padding: 0;
}

.wfs-article .wfs-article__card ul.wfs-guide__links li {
	margin: 0;
	font-size: 1rem;
	line-height: 1.2;
}

.wfs-article .wfs-article__card ul.wfs-guide__links a {
	display: inline-block;
	padding: 0.45rem 0.95rem;
	border: 1.5px solid var(--wfs-green);
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
	background: #fff;
	transition: background 0.15s ease, color 0.15s ease;
}

.wfs-article .wfs-article__card ul.wfs-guide__links a:hover,
.wfs-article .wfs-article__card ul.wfs-guide__links a:focus-visible {
	background: var(--wfs-green);
	color: #fff;
}

/* Images */
.wfs-article .wfs-article__card figure {
	margin: 1.6rem 0 1.8rem;
}

.wfs-article .wfs-article__card figure img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 18px;
	border: 1px solid var(--wfs-line);
	box-shadow: 0 12px 30px rgba(12, 41, 16, 0.1);
}

.wfs-article .wfs-article__card figcaption {
	margin-top: 0.7rem;
	font-size: 0.92rem;
	line-height: 1.5;
	color: var(--wfs-muted);
	text-align: left;
}

/* Tables */
.wfs-article .wfs-article__card figure.wp-block-table {
	margin: 1.6rem 0 1.8rem;
	overflow: auto;
	border-radius: 16px;
	border: 1px solid var(--wfs-line);
}

.wfs-article .wfs-article__card table {
	width: 100%;
	border-collapse: collapse;
	font-size: 1rem;
	margin: 0;
}

.wfs-article .wfs-article__card thead th {
	background: var(--wfs-green);
	color: #fff;
	text-align: left;
	padding: 0.8rem 1.1rem;
	font-weight: 700;
	border: 0;
}

.wfs-article .wfs-article__card td,
.wfs-article .wfs-article__card tbody th {
	padding: 0.7rem 1.1rem;
	text-align: left;
	border: 0;
	border-top: 1px solid var(--wfs-line);
	vertical-align: top;
}

.wfs-article .wfs-article__card tbody th {
	width: 6rem;
	color: var(--wfs-green);
	font-weight: 700;
}

.wfs-article .wfs-article__card tbody tr:nth-child(even) td,
.wfs-article .wfs-article__card tbody tr:nth-child(even) th {
	background: var(--wfs-cream-soft);
}

.wfs-article .wfs-article__card figure.wp-block-table figcaption {
	padding: 0.7rem 1.1rem 0.9rem;
	margin: 0;
	border-top: 1px solid var(--wfs-line);
}

/* Notes and callouts */
.wfs-article .wfs-article__card p.wfs-guide__note {
	font-size: 0.95rem;
	line-height: 1.6;
	color: var(--wfs-muted);
	background: var(--wfs-cream-soft);
	border-left: 4px solid var(--wfs-red);
	border-radius: 0 14px 14px 0;
	padding: 0.9rem 1.1rem;
}

.wfs-article .wfs-article__card p.wfs-guide__cta {
	margin-top: 2.5rem;
	padding: 1.2rem 1.4rem;
	background: var(--wfs-green);
	color: #fff;
	border-radius: 18px;
	font-family: var(--wfs-serif);
	font-size: 1.25rem;
	font-weight: 600;
}

.wfs-article .wfs-article__card p.wfs-guide__cta a {
	color: #fff;
	text-decoration-color: var(--wfs-red);
}

.wfs-article .wfs-article__card blockquote {
	margin: 1.6rem 0;
	padding: 0.9rem 1.2rem;
	border-left: 4px solid var(--wfs-green);
	background: var(--wfs-cream-soft);
	border-radius: 0 14px 14px 0;
}

/* FAQ accordion (core Details block) */
.wfs-article .wfs-article__card .wp-block-details {
	background: var(--wfs-cream-soft);
	border-radius: 14px;
	box-shadow: inset 0 0 0 1px var(--wfs-line);
	margin: 0 0 0.8rem;
	padding: 0;
}

.wfs-article .wfs-article__card .wp-block-details > summary {
	cursor: pointer;
	list-style: none;
	padding: 1rem 3rem 1rem 1.25rem;
	font-family: var(--wfs-sans);
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--wfs-green);
	position: relative;
}

.wfs-article .wfs-article__card .wp-block-details > summary::-webkit-details-marker {
	display: none;
}

.wfs-article .wfs-article__card .wp-block-details > summary::after {
	content: "+";
	position: absolute;
	right: 1.25rem;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.4rem;
	line-height: 1;
	color: var(--wfs-red);
}

.wfs-article .wfs-article__card .wp-block-details[open] > summary::after {
	content: "\2212";
}

.wfs-article .wfs-article__card .wp-block-details > :not(summary) {
	padding: 0 1.25rem;
}

.wfs-article .wfs-article__card .wp-block-details > p:last-child {
	padding-bottom: 1.1rem;
	margin-bottom: 0;
}

/* ---------- Site-wide: give plain pages and posts the same shell ---------- */
body.wfs-site-style:not(.home) .entry-content > .wfs-article {
	margin-top: 0;
}

/* Programmatic word-list pages (N-letter words etc.) */
.wfs-seo-page {
	max-width: 1120px;
	margin: 2.5rem auto 3rem;
	padding: 2rem 2.25rem;
	background: #fff;
	border: 1px solid rgba(12, 41, 16, 0.06);
	border-radius: 28px;
	box-shadow: 0 24px 60px rgba(12, 41, 16, 0.08);
	box-sizing: border-box;
	font-family: var(--wfs-sans);
}

.wfs-seo-page .wfs-seo-page__title {
	font-family: var(--wfs-serif);
	color: var(--wfs-green);
	font-weight: 600;
	font-size: 2.2rem;
	letter-spacing: -0.012em;
	margin: 0.5rem 0 0.8rem;
	padding-top: 1.1rem;
	position: relative;
}

.wfs-seo-page .wfs-seo-page__title::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 44px;
	height: 4px;
	border-radius: 4px;
	background: linear-gradient(90deg, var(--wfs-green), var(--wfs-red));
}

.wfs-seo-page .wfs-seo-page__intro {
	font-size: 1.12rem;
	line-height: 1.7;
	color: var(--wfs-ink);
}


/* ---------- Single posts: the theme already boxes the entry ---------- */
body.single-post .wfs-article {
	display: block;
	max-width: none;
	margin: 0;
	padding: 0;
	background: none;
	border-radius: 0;
}

body.single-post .wfs-article .wfs-article__card {
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: none;
}

body.single-post .wfs-article .wfs-toc {
	position: static;
	margin: 0 0 2rem;
	padding: 0.9rem 0.6rem;
	background: var(--wfs-cream-soft);
	border-radius: 18px;
	box-shadow: inset 0 0 0 1px var(--wfs-line);
}

body.single-post .wfs-article .wfs-toc summary {
	cursor: pointer;
	margin-bottom: 0;
}

body.single-post .wfs-article .wfs-toc[open] summary {
	margin-bottom: 0.7rem;
}

body.single-post .wfs-article .wfs-toc ol {
	max-height: none;
}

/* Word-list pages: the list card sits inside the page card, keep it flat */
.wfs-seo-page .wfs-solver__word-list {
	box-shadow: none;
	border: 1px solid var(--wfs-line);
	background: var(--wfs-cream-soft);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
	.wfs-article {
		padding: 1.25rem;
		border-radius: 24px;
	}

	.wfs-article.has-toc {
		grid-template-columns: minmax(0, 1fr);
	}

	.wfs-toc {
		position: static;
		background: #fff;
		border-radius: 18px;
		padding: 0.9rem 0.6rem;
		box-shadow: 0 8px 24px rgba(12, 41, 16, 0.07);
	}

	.wfs-toc summary {
		cursor: pointer;
		margin-bottom: 0;
	}

	.wfs-toc[open] summary {
		margin-bottom: 0.7rem;
	}

	.wfs-toc ol {
		max-height: none;
	}

	.wfs-article .wfs-article__card {
		padding: 2rem 1.5rem 1.75rem;
		border-radius: 22px;
	}
}

@media (max-width: 600px) {
	.wfs-article {
		margin: 1.25rem 0.5rem 2rem;
		padding: 0.75rem;
	}

	.wfs-article .wfs-article__card h2 {
		font-size: 1.6rem;
		margin-top: 3rem;
	}

	.wfs-article .wfs-article__card h3 {
		font-size: 1.25rem;
	}

	.wfs-article .wfs-article__card p,
	.wfs-article .wfs-article__card li {
		font-size: 1.05rem;
	}

	.wfs-seo-page {
		margin: 1rem 0.5rem 2rem;
		padding: 1.25rem 1rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wfs-toc a {
		transition: none;
	}
}
