/*
Theme Name: Flat — Civil War Missouri Edition
Theme URI: https://civilwarmo.net/
Author: Civil War Missouri, based on work by ThemeIsle and YoArts
Author URI: https://civilwarmo.net/
Description: A reading-focused edition of Flat for Civil War Missouri, with a responsive journal homepage and familiar WordPress publishing tools.
Version: 2.2.6
Requires at least: 6.4
Tested up to: 7.1.2
Requires PHP: 7.4
License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: flat
Tags: blog, news, two-columns, left-sidebar, custom-background, custom-colors, custom-logo, custom-menu, editor-style, featured-images, threaded-comments, translation-ready

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
*/

/* Civil War Missouri homepage and reading improvements. */
.cwm-home-intro {
	margin: 0 0 2.2rem;
	padding: 1.5rem 1.6rem;
	border-left: 4px solid #843f34;
	background: #f5f1e8;
}
.cwm-home-intro .eyebrow,
.cwm-section-label {
	margin: 0 0 .4rem;
	color: #6e6a5d;
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.cwm-home-intro h1,
.cwm-home-section h2 {
	margin: 0 0 .6rem;
	font-family: Georgia, "Times New Roman", serif;
	font-weight: 400;
	line-height: 1.15;
}
.cwm-home-intro h1 { font-size: clamp(2rem, 5vw, 3.35rem); }
.cwm-home-intro p:last-child { max-width: 60ch; margin: 0; font-size: 1.1rem; }
.cwm-home-section { margin: 0 0 2.5rem; }
.cwm-home-section > h2 { padding-bottom: .55rem; border-bottom: 1px solid #ddd8cc; font-size: 1.75rem; }
.cwm-feature {
	margin-bottom: 1.5rem;
	padding: 1.5rem;
	background: #34483d;
	color: #fffefa;
}
.cwm-feature a { color: #fffefa; }
.cwm-feature h3 { margin: .35rem 0 .6rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.65rem, 4vw, 2.55rem); font-weight: 400; line-height: 1.12; }
.cwm-feature .cwm-section-label, .cwm-feature .entry-meta { color: #e0e5dc; }
.cwm-feature .cwm-feature-image { margin: 1rem 0; }
.cwm-feature .cwm-feature-image img { width: 100%; height: auto; }
.cwm-feature .cwm-feature-caption { margin: .3rem 0 0; color: #e0e5dc; font-size: .8rem; }
.cwm-article-list { margin: 0; padding: 0; list-style: none; }
.cwm-article-list li { padding: 1rem 0; border-bottom: 1px solid #ddd8cc; }
.cwm-article-list h3 { margin: .15rem 0 .35rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.4rem; font-weight: 400; line-height: 1.25; }
.cwm-article-list h3 a { color: inherit; }
.cwm-article-list .entry-meta, .cwm-article-list .cwm-date { color: #6e6a5d; font-size: .82rem; }
.cwm-topic-list { display: flex; flex-wrap: wrap; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.cwm-topic-list a { display: inline-block; padding: .45rem .7rem; border: 1px solid #cfc6b5; border-radius: 2px; text-decoration: none; }
.cwm-source-note { max-width: 68ch; color: #514d42; }
.cwm-follow-list { display: flex; flex-wrap: wrap; gap: 1rem; padding: 0; list-style: none; }
.cwm-follow-list a { font-weight: 700; }
.cwm-empty { padding: 1rem; background: #f5f1e8; color: #514d42; }
.entry-content { font-size: 1.08rem; line-height: 1.8; }
.entry-content > p, .entry-content > ul, .entry-content > ol, .entry-content > blockquote { max-width: 70ch; }
.entry-content figure { margin-block: 1.8rem; }
.entry-content figcaption { color: #6e6a5d; font-size: .85rem; }
.entry-content table { display: block; max-width: 100%; overflow-x: auto; }
.entry-content, .entry-content p, .entry-content li { font-family: Georgia, "Times New Roman", serif; }
body, button, input, select, textarea { font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
#masthead .site-title, #primary .entry-title, #primary .page-title, #primary h1, #primary h2, #primary h3, #primary h4 { font-family: Georgia, "Times New Roman", serif; }
#comments .comment-navigation .screen-reader-text { position: absolute; display: block; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus, .screen-reader-text:focus { z-index: 100000; }

@media (max-width: 767px) {
	.cwm-home-intro { padding: 1.2rem; }
	.cwm-feature { padding: 1.15rem; }
	.cwm-home-section { margin-bottom: 2rem; }
	.entry-content { font-size: 1.02rem; }
}

.sticky {}
.bypostauthor {}

/* Civil War Missouri homepage: compact banner, clear reading order, larger type. */
body { font-size: 19px; line-height: 1.7; color: #292c27; }
.cwm-site-banner { width: 100%; height: clamp(210px, 26vw, 330px); margin: 0; overflow: hidden; background: #c7a779; }
.cwm-site-banner img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 52%; }
body.home #secondary { display: block; background: #000; }
body.home #page:before { display: none; }
.cwm-home { max-width: 1000px; margin-inline: auto; padding-top: 1.1rem; }
.cwm-home-intro { margin: 0 0 2rem; padding: 1.15rem 0 1.65rem; border: 0; border-bottom: 1px solid #ddd8cc; background: transparent; }
.cwm-home-intro h1 { max-width: 66ch; margin: 0; font-size: clamp(1.4rem, 2.4vw, 1.8rem); line-height: 1.55; letter-spacing: -.018em; }
.cwm-home-section { margin: 0 0 2.8rem; }
.cwm-home-section > h1, .cwm-home-section > h2 { margin: 0 0 .9rem; padding: 0 0 .55rem; font-size: clamp(1.75rem, 3vw, 2.25rem); }
.cwm-section-label { font-size: .82rem; }
.cwm-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .85fr); align-items: start; gap: 0 2rem; padding: clamp(1.3rem, 3.5vw, 2.5rem); }
.cwm-feature > .cwm-section-label, .cwm-feature > h3, .cwm-feature > .entry-meta, .cwm-feature > .cwm-feature-excerpt, .cwm-feature > .btn { grid-column: 1; }
.cwm-feature > .cwm-feature-image { grid-column: 2; grid-row: 1 / span 5; align-self: center; }
.cwm-feature h3 { margin-top: .5rem; font-size: clamp(2rem, 4.2vw, 3.5rem); }
.cwm-feature .entry-meta { font-size: .9rem; line-height: 1.6; }
.cwm-feature-excerpt { font-size: 1.12rem; line-height: 1.7; }
.cwm-feature .cwm-feature-image img { max-height: 440px; object-fit: cover; }
.cwm-article-list li { padding-block: 1.3rem; }
.cwm-article-list h3 { margin-block: .25rem .4rem; font-size: clamp(1.5rem, 2.7vw, 1.95rem); line-height: 1.3; }
.cwm-article-list .cwm-date, .cwm-article-list .entry-meta { font-size: .9rem; }
.cwm-article-list p { max-width: 68ch; margin: .45rem 0 0; font-size: 1.05rem; line-height: 1.7; }
.cwm-tag-list { display: flex; flex-wrap: wrap; gap: .7rem; margin: 0; padding: 0; list-style: none; }
.cwm-tag-list a { display: inline-block; padding: .55rem .9rem; border: 1px solid #cfc6b5; border-radius: 2px; background: #fffefa; color: #292c27; font-size: .95rem; text-decoration: none; }
.cwm-tag-list a:hover { border-color: #843f34; color: #843f34; }
.cwm-follow-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.cwm-follow-list li { display: flex; min-height: 120px; flex-direction: column; gap: .5rem; padding: 1rem; border: 1px solid #d5d9d0; background: #f1f3ed; font-size: .92rem; line-height: 1.55; }
.cwm-follow-list a { font-size: 1rem; }
.entry-content { font-size: 1.2rem; line-height: 1.85; }
.entry-content p, .entry-content li { max-width: 70ch; }
/* Override Flat's 60–80px page padding and entry-content top spacer. */
body.page #primary article.hentry { padding: .75rem 2rem 2.5rem !important; }
body.page #primary article.hentry .entry-title { margin: 0 0 1rem; text-align: left; }
body.page #primary article.hentry .entry-content { padding-top: 0; font-size: 21px; line-height: 1.75; }
body.page #primary article.hentry .entry-content > p,
body.page #primary article.hentry .entry-content > ul,
body.page #primary article.hentry .entry-content > ol,
body.page #primary article.hentry .entry-content > blockquote { max-width: 68ch; }
.site-info { padding-block: 1.2rem; font-size: .86rem; line-height: 1.6; }

/* Keep the footer at the viewport edge on short pages. */
html, body { min-height: 100%; }
body { min-height: 100vh; }
#page { display: flex; min-height: 100vh; flex-direction: column; }
#page > .container { display: flex; flex: 1 0 auto; flex-direction: column; }
#page > .container > .row { flex: 1 0 auto; }
#primary { display: flex; flex-direction: column; }
#primary > #content { flex: 1 0 auto; }
#primary > .site-info { margin-top: auto; }

@media (max-width: 767px) {
	.cwm-site-banner { height: 190px; }
	.cwm-home { padding-top: .4rem; }
	.cwm-home-intro { padding-block: .9rem 1.3rem; }
	.cwm-feature { grid-template-columns: 1fr; gap: 0; padding: 1.2rem; }
	.cwm-feature > .cwm-feature-image { grid-column: 1; grid-row: auto; margin: 1rem 0; }
	.cwm-feature .cwm-feature-image img { max-height: 300px; }
	.cwm-follow-list { grid-template-columns: 1fr; gap: .65rem; }
	.cwm-follow-list li { min-height: 0; }
	.entry-content { font-size: 1.14rem; }
	body.page #primary article.hentry { padding: .75rem 1rem 2rem !important; }
	body.page #primary article.hentry .entry-content { font-size: 18px; }
}

@media (max-width: 1199px) {
	#page > .container > .row { display: flex; flex-direction: column; }
	#secondary { flex: 0 0 auto; width: 100%; }
	#primary { float: none; width: 100%; flex: 1 0 auto; }
}

/* Homepage sizing uses px because Flat sets the root font size to 10px. */
.cwm-home { max-width: 1000px; padding: 24px 32px 40px; }
.cwm-home-section { margin-bottom: 40px; }
.cwm-home .cwm-section-label { margin-bottom: 8px; font-size: 12px; line-height: 1.4; }
.cwm-home-section > h2 { margin: 0 0 16px; padding-bottom: 8px; font-size: 32px; line-height: 1.2; }
.cwm-feature {
	grid-template-columns: minmax(0, 1fr);
	gap: 0 28px;
	margin: 0;
	padding: 24px;
	border-left: 4px solid #843f34;
	background: #f5f1e8;
	color: #292c27;
}
.cwm-feature.has-feature-image { grid-template-columns: minmax(0, 1fr) minmax(280px, .85fr); }
.cwm-feature a { color: #843f34; }
.cwm-feature > .cwm-section-label,
.cwm-feature > h1,
.cwm-feature > h3,
.cwm-feature > .entry-meta,
.cwm-feature > .cwm-feature-excerpt,
.cwm-feature > .btn { grid-column: 1; }
.cwm-feature > h1 { margin: 0 0 12px; font-size: 38px; line-height: 1.18; font-weight: 400; }
.cwm-feature .cwm-section-label,
.cwm-feature .entry-meta,
.cwm-feature .cwm-feature-caption { color: #514d42; }
.cwm-feature .entry-meta { font-size: 14px; line-height: 1.5; }
.cwm-feature-excerpt { font-size: 19px; line-height: 1.65; }
.cwm-feature .btn { display: inline-block; width: auto; margin-top: 6px; padding: 10px 16px; border-color: #843f34; background: #843f34; color: #fffefa; font-size: 16px; }
.cwm-feature .btn:hover, .cwm-feature .btn:focus { background: #673027; color: #fffefa; }
.cwm-article-list h3 { font-size: 26px; line-height: 1.25; }
.cwm-article-list { padding-left: 18px; }
.cwm-article-list .cwm-date, .cwm-article-list .entry-meta { font-size: 14px; }
.cwm-article-list p { max-width: 68ch; font-size: 18px; line-height: 1.65; }
.cwm-tag-list { gap: 10px; }
.cwm-tag-list a { padding: 9px 13px; font-size: 15px; }
.cwm-follow-list { gap: 12px; }
.cwm-follow-list li { min-height: 120px; gap: 8px; padding: 16px; font-size: 16px; line-height: 1.55; }
.cwm-follow-list a { font-size: 18px; }

@media (max-width: 767px) {
	.cwm-home { padding: 20px 18px 32px; }
	.cwm-home-section { margin-bottom: 32px; }
	.cwm-home-section > h2 { font-size: 28px; }
	.cwm-feature { grid-template-columns: 1fr; gap: 0; padding: 18px; }
	.cwm-feature > .cwm-feature-image { grid-column: 1; grid-row: auto; }
	.cwm-feature > h1 { font-size: 30px; }
	.cwm-feature-excerpt { font-size: 18px; }
	.cwm-article-list h3 { font-size: 22px; }
	.cwm-follow-list li { min-height: 0; }
}

/* Long-form posts and pages share a consistent, readable article measure. */
body.single article.hentry,
body.page article.hentry { padding: 24px 32px 40px !important; }
body.single article.hentry .entry-title,
body.page article.hentry .entry-title { margin: 0 0 14px; text-align: left; font-size: 36px; line-height: 1.2; }
body.single article.hentry .entry-meta { margin-bottom: 16px; text-align: left; font-size: 14px; line-height: 1.5; }
body.single article.hentry .entry-thumbnail { margin: 20px 0 24px; text-align: left; }
body.single article.hentry .entry-thumbnail img { display: block; max-width: 100%; height: auto; }
body.single article.hentry .entry-content,
body.page article.hentry .entry-content { padding-top: 0; font-size: 21px; line-height: 1.75; }
body.single article.hentry .entry-content > p,
body.single article.hentry .entry-content > ul,
body.single article.hentry .entry-content > ol,
body.single article.hentry .entry-content > blockquote,
body.page article.hentry .entry-content > p,
body.page article.hentry .entry-content > ul,
body.page article.hentry .entry-content > ol,
body.page article.hentry .entry-content > blockquote { max-width: 68ch; }
.archive .hentry,
.search .hentry,
.blog .hentry { padding: 32px !important; }
.archive .hentry .entry-title,
.search .hentry .entry-title,
.blog .hentry .entry-title { margin: 0 0 10px; text-align: left; font-size: 28px; line-height: 1.25; }
.archive .hentry .entry-meta,
.search .hentry .entry-meta,
.blog .hentry .entry-meta { text-align: left; font-size: 14px; }
.archive .hentry .entry-summary,
.search .hentry .entry-summary,
.blog .hentry .entry-summary,
.archive .hentry .entry-content,
.search .hentry .entry-content,
.blog .hentry .entry-content { padding-top: 12px; font-size: 18px; line-height: 1.65; }
.archive .hentry .entry-content > p,
.search .hentry .entry-content > p,
.blog .hentry .entry-content > p { max-width: 68ch; }
#primary .page-title { padding: 18px 32px; text-align: left; font-size: 28px; }
.site-info { font-size: 14px; }

@media (max-width: 767px) {
	body.single article.hentry,
	body.page article.hentry,
	.archive .hentry,
	.search .hentry,
	.blog .hentry { padding: 18px 16px 28px !important; }
	body.single article.hentry .entry-title,
	body.page article.hentry .entry-title { font-size: 30px; }
	body.single article.hentry .entry-content,
	body.page article.hentry .entry-content { font-size: 18px; }
	.archive .hentry .entry-title,
	.search .hentry .entry-title,
	.blog .hentry .entry-title,
	#primary .page-title { font-size: 24px; }
}
