/*
 * The text of pages and posts, styled with site-wide rules only: whatever the
 * editor produced (paragraphs, headings, lists, bold, captions, superscript
 * citation links, inline colors) gets these styles. No passage gets special
 * treatment. The same rules style the Classic Editor (.mce-content-body).
 */

:is(.entry-content, .mce-content-body) { min-width: 0; }
:is(.entry-content, .mce-content-body) > :first-child { margin-top: 0; }
:is(.entry-content, .mce-content-body) p { margin: 0 0 .9em; }

/* Section headings: a hairline under each, across the column. */
:is(.entry-content, .mce-content-body) h2,
:is(.entry-content, .mce-content-body) h3 {
	clear: both;
	margin: 1.4em 0 .6em;
	padding-bottom: .28em;
	border-bottom: 1px solid var(--rule);
	color: var(--text);
	font-size: var(--fs-section);
	font-weight: var(--weight-bold);
	line-height: 1.2;
	letter-spacing: -.005em;
}
:is(.entry-content, .mce-content-body) h4,
:is(.entry-content, .mce-content-body) h5,
:is(.entry-content, .mce-content-body) h6 {
	margin: 1.3em 0 .4em;
	color: var(--text);
	font-size: var(--fs-subsection);
	font-weight: var(--weight-bold);
	line-height: 1.3;
}
:is(.entry-content, .mce-content-body) strong,
:is(.entry-content, .mce-content-body) b { font-weight: var(--weight-bold); color: var(--text); }

:is(.entry-content, .mce-content-body) ul,
:is(.entry-content, .mce-content-body) ol { margin: 0 0 .9em; padding-left: 1.35em; }
:is(.entry-content, .mce-content-body) li { margin: 0 0 .25em; padding-left: .15em; }
:is(.entry-content, .mce-content-body) li::marker { color: var(--accent); }
:is(.entry-content, .mce-content-body) ol > li::marker { color: var(--muted); font-variant-numeric: tabular-nums; }
:is(.entry-content, .mce-content-body) li ul,
:is(.entry-content, .mce-content-body) li ol { margin: .25em 0 .15em; }
:is(.entry-content, .mce-content-body) ul ul { list-style: circle; }

/* Underlines set in the editor: finer and a little lower. */
:is(.entry-content, .mce-content-body) u,
:is(.entry-content, .mce-content-body) span[style*="underline"] { text-underline-offset: .2em; text-decoration-thickness: 1px; }

/* Citation numbers: superscript links to the Citations page. */
:is(.entry-content, .mce-content-body) sup { font-size: .62em; line-height: 0; vertical-align: .6em; margin-left: 1px; }
:is(.entry-content, .mce-content-body) a:has(> sup),
:is(.entry-content, .mce-content-body) sup a { text-decoration: none; }
:is(.entry-content, .mce-content-body) sup b { color: var(--accent); }

/* The editor's pure red (#ff0000), tuned to each color scheme. */
:is(.entry-content, .mce-content-body) [style*="color: #ff0000"],
:is(.entry-content, .mce-content-body) [style*="color:#ff0000"],
:is(.entry-content, .mce-content-body) [style*="color: #FF0000"] { color: var(--editor-red) !important; }

:is(.entry-content, .mce-content-body) blockquote {
	margin: 1.2em 0;
	padding: 0 0 0 1.1em;
	border-left: 2px solid var(--rule);
	font-style: italic;
}
:is(.entry-content, .mce-content-body) hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
:is(.entry-content, .mce-content-body) table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .9em; }
:is(.entry-content, .mce-content-body) th,
:is(.entry-content, .mce-content-body) td { padding: 6px 10px 6px 0; border-bottom: 1px solid var(--hairline); text-align: left; vertical-align: top; }
:is(.entry-content, .mce-content-body) th { color: var(--text); font-weight: var(--weight-bold); }
:is(.entry-content, .mce-content-body) code,
:is(.entry-content, .mce-content-body) pre { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85em; }
:is(.entry-content, .mce-content-body) pre { overflow-x: auto; padding: 12px; background: var(--img-bg); }

/* ---------- Images and captions (Classic Editor markup) ---------- */
:is(.entry-content, .mce-content-body) img { max-width: 100%; height: auto; }
:is(.entry-content, .mce-content-body) .wp-caption img,
:is(.entry-content, .mce-content-body) img.alignleft,
:is(.entry-content, .mce-content-body) img.alignright,
:is(.entry-content, .mce-content-body) img.alignnone,
:is(.entry-content, .mce-content-body) img.aligncenter { display: block; background: var(--img-bg); }
/* Captioned images look like mounted prints. The inline width from the
   editor (image width + 10px) includes the 5px mount on each side. */
:is(.entry-content, .mce-content-body) .wp-caption {
	max-width: 100%;
	margin: 0;
	padding: 5px 5px 0;
	background: var(--mount);
	box-shadow: var(--mount-shadow);
}
:is(.entry-content, .mce-content-body) figure.wp-caption { box-sizing: content-box; } /* HTML5 captions carry the bare image width */
:is(.entry-content, .mce-content-body) .wp-caption .wp-caption-text {
	margin: 0;
	padding: 6px 3px 7px;
	color: var(--muted);
	font-size: var(--fs-caption);
	font-style: italic;
	line-height: 1.4;
}
:is(.entry-content, .mce-content-body) .alignright { float: right; margin: .3em 0 .9em 24px; }
:is(.entry-content, .mce-content-body) .alignleft { float: left; margin: .3em 24px .9em 0; }
:is(.entry-content, .mce-content-body) .alignnone { margin: 1.1em 0 1.3em; }
:is(.entry-content, .mce-content-body) .aligncenter { display: block; margin: 1.1em auto 1.3em; }

/* Galleries ([gallery]) */
:is(.entry-content, .mce-content-body) .gallery { display: grid; grid-template-columns: repeat(var(--gallery-cols, 3), 1fr); gap: 12px; margin: 1.2em 0; }
:is(.entry-content, .mce-content-body) .gallery-columns-1 { --gallery-cols: 1; }
:is(.entry-content, .mce-content-body) .gallery-columns-2 { --gallery-cols: 2; }
:is(.entry-content, .mce-content-body) .gallery-columns-4 { --gallery-cols: 4; }
:is(.entry-content, .mce-content-body) .gallery-item { margin: 0; }
:is(.entry-content, .mce-content-body) .gallery-caption { font-size: var(--fs-caption); font-style: italic; color: var(--muted); }

/* Embedded video: full column width; theme.js sets the aspect ratio from the width/height attributes. */
:is(.entry-content, .mce-content-body) iframe { display: block; max-width: 100%; border: 0; }

/* Clearing after floats at the end of the text. */
:is(.entry-content, .mce-content-body)::after { content: ""; display: table; clear: both; }

/* ---------- Page furniture (theme templates) ---------- */
.entry-header { margin: 0 0 18px; }
.entry-title {
	margin: 0;
	color: var(--text);
	font-size: var(--fs-page-title);
	font-weight: var(--weight-bold);
	line-height: 1.15;
	letter-spacing: -.008em;
}
.entry-date { margin: 6px 0 0; color: var(--muted); font-style: italic; font-size: .85em; }
.entry-summary { padding: 0 0 18px; margin: 0 0 18px; border-bottom: 1px solid var(--hairline); }
.entry-summary__title { margin: 0 0 6px; font-size: var(--fs-subsection); font-weight: var(--weight-bold); }
.entry-summary__title a { color: var(--text); text-decoration: none; }
.page-links, .nav-links { margin: 1.5em 0; }
.nav-links .page-numbers { margin-right: 10px; }

/* Anchor targets (section headings, citations) land below the sticky header. */
[id] { scroll-margin-top: calc(var(--header-height, 92px) + 24px); }
/* A citation reached from its superscript link is briefly marked. */
.entry-content li:target,
.entry-content p:target { background: var(--target); box-shadow: -6px 0 0 var(--target), 6px 0 0 var(--target); }

/* Comments (only where a page allows them). */
.comments { margin-top: 2.5em; padding-top: 1em; border-top: 1px solid var(--rule); font-size: .92em; }
.comments__title, .comment-reply-title { font-size: var(--fs-subsection); color: var(--text); }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment-body { padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.comments textarea, .comments input[type="text"], .comments input[type="email"], .comments input[type="url"] {
	width: 100%; padding: 8px 10px; border: 1px solid var(--control); background: var(--bg); color: var(--body); font: inherit;
}
.comments .submit { padding: 8px 16px; border: 1px solid var(--accent); background: var(--accent); color: var(--bg); font: inherit; cursor: pointer; }
