/**
 * Teagle Classic: seams between the live stylesheet (site.css) and
 * WordPress's own markup. Keep this short; site.css does the styling.
 */

/* WordPress wrappers that the live pages don't have. */
.wp-site-blocks,
.wp-block-template-part {
	margin: 0;
	padding: 0;
}

/* Admin bar: the header art is positioned from the top of the page. */
.admin-bar .site-header__image {
	top: 0;
}

/* Header: the search field sits in a real form here (live: a postback). */
.site-nav__search-form {
	margin: 0;
}

/* Submenu toggles are buttons here (live: spans); keep them looking the same. */
button.site-nav__submenu-toggle {
	background: none;
	border: 0;
	padding: 0;
}

/* Core blocks inside page content. */
.page-content .wp-block-image,
.page-content figure.wp-block-embed {
	margin: 0 0 20px;
}
.page-content .wp-block-image img {
	max-width: 100%;
	height: auto;
}
.page-content .wp-block-columns {
	margin-bottom: 20px;
}

/* Newsletter band: the demo's note in place of a real sign-up. */
.outro-signup-teagle-form__note {
	font-style: italic;
}

/* Home news cards: live fixes each card at 248 px, so a long summary runs
   under its bottom-pinned "Read More" (the Moby-Dick card). Cards keep
   248 px as a minimum and grow to fit, and the two in a row stay level. */
@media screen and (min-width: 1260px) {
	.homepage-blocks .card-set__body > .row {
		display: flex;
		flex-wrap: wrap;
	}
	.homepage-blocks .card-set__body > .row > .card--program-landing {
		height: auto;
		min-height: 248px;
	}
	.homepage-blocks .card-set__body > .row > .card--program-landing .card__heading-wrap {
		min-height: 246px;
	}
}

/* Text the live page shows bare, outside any paragraph (the builder wraps
   it in a paragraph so it can be edited): no paragraph margins, and the
   container's type, as bare text has. */
p.teagle-run,
.page-content p.teagle-run {
	margin-top: 0;
	margin-bottom: 0;
	padding: 0;
	font: inherit;
	line-height: inherit !important; /* over site.css's .page-content__statistic p */
	letter-spacing: inherit;
	color: inherit;
}

/* Annual reports' Grants pages: no gap between the page and its grants band
   (live: style="margin-bottom:0" on the main row). */
.teagle-report-grants .site-main > .main-content {
	margin-bottom: 0 !important;
}

/* On live a paragraph followed only by bare text is its parent's last child,
   so Bootstrap's blockquote p:last-child rule applies (a quote's attribution
   on the profiles). */
blockquote p:has(+ p.teagle-run:last-child) {
	margin-bottom: 0;
}

/* Live's master page carries one inline style on every page: up to 768 px
   the square institution cards (Knowledge for Freedom, Civics in the City)
   stack one to a row at their natural height, instead of site.css's fixed
   370 px two to a row. */
@media only screen and (max-width: 768px) {
	.card-set-square .card--home {
		clear: both;
		height: auto !important;
	}
}
