/* ==========================================================================
   Eco Scope — long-form reading styles (single posts & pages)

   Goal: make articles calm and easy to read rather than dense.
   Levers used, in order of impact:
     1. Line length capped near 68–72 characters (the comfortable range)
     2. Larger body text (18.5px) with generous leading (1.78)
     3. Real space between paragraphs instead of a tight block
     4. Headings that group with the text they introduce
     5. Quiet, deliberate styling for quotes, lists, figures and links

   Everything is scoped to .entry-content on singular views, so the
   homepage, archives and widgets are untouched.
   ========================================================================== */

.single-post .entry-content,
.page .entry-content {
	--es-measure: 640px;     /* ≈ 68 characters — fixed unit so the lead paragraph
	                            and body text share the same right edge */
	--es-fs: 18.5px;
	--es-lh: 1.78;
	--es-gap: 1.45em;        /* space between paragraphs */
	--es-ink: #1b2320;
	--es-ink-soft: #46524c;
	--es-rule: #e4eae7;
}

/* --------------------------------------------------------------------------
   1. Measure and base type
   -------------------------------------------------------------------------- */
.single-post .entry-content,
.page .entry-content {
	font-size: var(--es-fs);
	line-height: var(--es-lh);
	color: var(--es-ink);
	letter-spacing: 0.002em;
}

/* Cap the line length of text elements, but let media run full width. */
.single-post .entry-content > p,
.single-post .entry-content > ul,
.single-post .entry-content > ol,
.single-post .entry-content > h2,
.single-post .entry-content > h3,
.single-post .entry-content > h4,
.single-post .entry-content > blockquote,
.page .entry-content > p,
.page .entry-content > ul,
.page .entry-content > ol,
.page .entry-content > h2,
.page .entry-content > h3,
.page .entry-content > h4 {
	max-width: var(--es-measure);
}

/* --------------------------------------------------------------------------
   2. Paragraph rhythm
   -------------------------------------------------------------------------- */
.single-post .entry-content > p,
.page .entry-content > p {
	margin: 0 0 var(--es-gap);
}

/* Lead paragraph: slightly larger, sets the tone without shouting. */
.single-post .entry-content > p:first-of-type {
	font-size: 1.09em;
	line-height: 1.68;
	color: #17201d;
	margin-bottom: 1.6em;
}

/* --------------------------------------------------------------------------
   3. Headings — more space above than below, so each heading visually
      belongs to the text that follows it rather than floating between.
   -------------------------------------------------------------------------- */
.single-post .entry-content h2,
.page .entry-content h2 {
	font-size: 1.5em;
	line-height: 1.28;
	font-weight: 700;
	letter-spacing: -0.012em;
	margin: 2.4em 0 0.6em;
	color: #10241c;
}

.single-post .entry-content h3,
.page .entry-content h3 {
	font-size: 1.24em;
	line-height: 1.34;
	font-weight: 700;
	margin: 2em 0 0.5em;
	color: #10241c;
}

.single-post .entry-content h4,
.page .entry-content h4 {
	font-size: 1.08em;
	font-weight: 700;
	margin: 1.7em 0 0.45em;
	color: #10241c;
}

/* A quiet accent rule above H2s gives the article clear chapters. */
.single-post .entry-content h2::before {
	content: "";
	display: block;
	width: 34px;
	height: 3px;
	border-radius: 2px;
	background: var(--es-accent, #02DE9C);
	margin-bottom: 0.7em;
}

.single-post .entry-content h2:first-child,
.page .entry-content h2:first-child {
	margin-top: 0;
}

/* --------------------------------------------------------------------------
   4. Links — readable in running text, obvious without being loud
   -------------------------------------------------------------------------- */
.single-post .entry-content a:not(.is-btn),
.page .entry-content a:not(.is-btn) {
	color: #0B7A57;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	text-decoration-color: rgba(11, 122, 87, 0.35);
	transition: text-decoration-color 0.15s, color 0.15s;
}

.single-post .entry-content a:not(.is-btn):hover,
.page .entry-content a:not(.is-btn):hover {
	color: #02b27d;
	text-decoration-color: currentColor;
}

/* --------------------------------------------------------------------------
   5. Lists — indented and spaced so they read as a set, not a block
   -------------------------------------------------------------------------- */
.single-post .entry-content ul,
.single-post .entry-content ol,
.page .entry-content ul,
.page .entry-content ol {
	margin: 0 0 var(--es-gap);
	padding-left: 1.3em;
}

.single-post .entry-content li,
.page .entry-content li {
	margin-bottom: 0.6em;
	padding-left: 0.25em;
}

.single-post .entry-content li::marker {
	color: #0B7A57;
}

/* --------------------------------------------------------------------------
   6. Pull quotes — set apart, not boxed in
   -------------------------------------------------------------------------- */
.single-post .entry-content blockquote,
.page .entry-content blockquote {
	margin: 2.1em 0;
	padding: 0.1em 0 0.1em 1.4em;
	border-left: 3px solid var(--es-accent, #02DE9C);
	background: none;
	font-size: 1.12em;
	line-height: 1.6;
	font-style: normal;
	color: #16302a;
}

.single-post .entry-content blockquote p:last-child,
.page .entry-content blockquote p:last-child {
	margin-bottom: 0;
}

.single-post .entry-content blockquote cite {
	display: block;
	margin-top: 0.7em;
	font-size: 0.78em;
	font-style: normal;
	color: var(--es-ink-soft);
}

/* --------------------------------------------------------------------------
   7. Images and figures — room to breathe, readable captions
   -------------------------------------------------------------------------- */
.single-post .entry-content figure,
.single-post .entry-content .wp-block-image,
.page .entry-content figure {
	margin: 2.2em 0;
}

.single-post .entry-content img,
.page .entry-content img {
	border-radius: 10px;
	height: auto;
}

.single-post .entry-content figcaption,
.single-post .entry-content .wp-caption-text,
.page .entry-content figcaption {
	margin-top: 0.7em;
	font-size: 0.8em;
	line-height: 1.5;
	color: var(--es-ink-soft);
	text-align: left;
	max-width: var(--es-measure);
}

/* --------------------------------------------------------------------------
   8. Tables and code
   -------------------------------------------------------------------------- */
.single-post .entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 2em 0;
	font-size: 0.92em;
}

.single-post .entry-content th,
.single-post .entry-content td {
	border: 1px solid var(--es-rule);
	padding: 10px 12px;
	text-align: left;
}

.single-post .entry-content th {
	background: #f4f7f5;
	font-weight: 700;
}

.single-post .entry-content code {
	background: #f2f5f3;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 0.9em;
}

/* Horizontal rule as a soft section break. */
.single-post .entry-content hr {
	border: 0;
	height: 1px;
	background: var(--es-rule);
	margin: 2.6em 0;
	max-width: var(--es-measure);
}

/* --------------------------------------------------------------------------
   9. Article header — give the title and meta space above the body
   -------------------------------------------------------------------------- */
.single-post .single-header .entry-title {
	line-height: 1.18;
	letter-spacing: -0.018em;
}

.single-post .single-header {
	margin-bottom: 1.6em;
}

/* --------------------------------------------------------------------------
   10. Dark mode — keep the same rhythm, soften the contrast
   -------------------------------------------------------------------------- */
[data-theme="dark"] .single-post .entry-content,
.dark-scheme .single-post .entry-content {
	--es-ink: #dfe6e2;
	--es-ink-soft: #9aa8a2;
	--es-rule: #2a302d;
}

[data-theme="dark"] .single-post .entry-content h2,
[data-theme="dark"] .single-post .entry-content h3,
[data-theme="dark"] .single-post .entry-content h4,
.dark-scheme .single-post .entry-content h2,
.dark-scheme .single-post .entry-content h3,
.dark-scheme .single-post .entry-content h4 {
	color: #f1f5f3;
}

[data-theme="dark"] .single-post .entry-content > p:first-of-type,
.dark-scheme .single-post .entry-content > p:first-of-type {
	color: #eaf0ed;
}

[data-theme="dark"] .single-post .entry-content a:not(.is-btn),
.dark-scheme .single-post .entry-content a:not(.is-btn) {
	color: #02DE9C;
	text-decoration-color: rgba(2, 222, 156, 0.4);
}

[data-theme="dark"] .single-post .entry-content blockquote,
.dark-scheme .single-post .entry-content blockquote {
	color: #e8efec;
}

[data-theme="dark"] .single-post .entry-content th,
.dark-scheme .single-post .entry-content th {
	background: #1c211f;
}

[data-theme="dark"] .single-post .entry-content code,
.dark-scheme .single-post .entry-content code {
	background: #1c211f;
}

/* --------------------------------------------------------------------------
   11. Responsive — slightly tighter on small screens, still comfortable
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
	.single-post .entry-content,
	.page .entry-content {
		--es-fs: 17.5px;
		--es-lh: 1.72;
		--es-gap: 1.3em;
	}

	.single-post .entry-content h2,
	.page .entry-content h2 {
		font-size: 1.36em;
		margin-top: 2em;
	}

	.single-post .entry-content blockquote,
	.page .entry-content blockquote {
		padding-left: 1.1em;
		margin: 1.8em 0;
	}
}

/* Respect users who ask for reduced motion. */
@media (prefers-reduced-motion: reduce) {
	.single-post .entry-content a:not(.is-btn) {
		transition: none;
	}
}
