/* Author identity stays compact while bios and links can wrap freely. */
.pst-author-card > .wp-block-avatar {
	flex: 0 0 auto;
}

.pst-author-card__profile {
	flex: 1 1 0;
	min-width: 0;
	overflow-wrap: anywhere;
}

.pst-author-card .wp-block-post-author-biography {
	line-height: 1.65;
}

.pst-author-card .wp-block-post-author-biography > :first-child {
	margin-top: 0;
}

.pst-author-card .wp-block-post-author-biography > :last-child {
	margin-bottom: 0;
}

/* The native flex row wraps the scoped search below its heading on phones. */
.pst-archive-heading-copy {
	flex: 1 1 28rem;
	min-width: 0;
}

.pst-archive-heading-row > .wp-block-search {
	flex: 0 1 420px;
	max-width: 100%;
}

.pst-page-header .wp-block-term-description > :last-child {
	margin-bottom: 0;
}

.pst-page-header .wp-block-term-description {
	max-width: 42rem;
}

/* Author archive: the bio wraps beside the portrait; the name never pushes it out. */
.pst-author-header__portrait {
	flex: none;
}

.pst-author-header__details {
	flex: 1 1 0;
	min-width: 0;
	overflow-wrap: anywhere;
}

.pst-author-header .wp-block-post-author-biography {
	max-width: 42rem;
	line-height: 1.65;
}

/* Start here: the copy drops below the image when both cannot fit. */
.pst-author-start__copy {
	flex: 1 1 18rem;
	min-width: 0;
}

.pst-author-start .wp-block-post-template {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* The same newsletter part adapts to the footer band and the narrow sidebar. */
.pst-newsletter-band .pst-newsletter {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(20rem, 26rem);
	align-items: center;
	gap: var(--wp--preset--spacing--60);
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto;
}

.pst-newsletter-band .pst-newsletter > * {
	max-width: none;
	margin: 0;
}

.pst-newsletter-band .pst-newsletter:not(:has(.pst-newsletter__form)) {
	grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 782px) {

	.pst-archive-heading-row > .wp-block-search {
		flex-basis: 100%;
		width: 100% !important;
	}

	.pst-newsletter-band .pst-newsletter {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* The labels beside the core Post Date blocks. */
.pst-post-dates p {
	margin: 0;
}

/* Native author credits: the name survives when the optional portrait is absent. */
.pst-author-credit {
	min-width: 0;
	max-width: 100%;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
}

.pst-author-credit > .wp-block-avatar,
.pst-author-credit__name > p {
	flex-shrink: 0;
}

.pst-author-credit .wp-block-avatar {
	margin: 0;
}

.pst-author-credit__name {
	min-width: 0;
}

.pst-author-credit__name > * {
	margin: 0;
	font-size: inherit;
}

.pst-author-credit .wp-block-post-author-name {
	min-width: 0;
	overflow-wrap: anywhere;
	color: var(--wp--preset--color--contrast);
}

.pst-author-credit a {
	position: relative;
	z-index: 2;
	color: inherit;
	text-decoration: none;
}

.pst-author-credit a:hover {
	color: var(--wp--preset--color--action);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.pst-card .pst-author-credit {
	font-size: var(--wp--preset--font-size--x-small);
}

.pst-card--row .pst-author-credit {
	font-size: var(--wp--preset--font-size--xx-small, 0.75rem);
}

/*
 * Type tile (block style, styles/blocks/type-tile.json): the states a style
 * variation cannot express. The tile is one link through Plain Stretch Links,
 * which also draws its focus ring;
 * the category being viewed is marked by aria-current on its name
 * (inc/archive-terms.php).
 */
.wp-block-group.is-style-type-tile {
	height: 100%;
	transition: border-color var(--wp--custom--motion--fast) ease;
}

.wp-block-group.is-style-type-tile:hover {
	border-color: var(--wp--preset--color--muted);
}

.wp-block-group.is-style-type-tile:has([aria-current="page"]) {
	border-color: var(--wp--preset--color--action);
	box-shadow: 0 0 0 1px var(--wp--preset--color--action);
}

/* Guide pages: the foot, and previous and next among subpages. */
.pst-guide-foot {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.pst-guide-foot p {
	margin: 0;
}

/* On a guide, a tip is a quiet line, not a box. */
.pst-guide-entry .is-style-tip {
	padding: 0 0 0 var(--wp--preset--spacing--30);
	border: 0;
	border-left: 3px solid var(--wp--preset--color--contrast);
	border-radius: 0;
	background: none;
}

main.pst-guide-entry > .pst-guide-subpages {
	margin-block-start: var(--wp--preset--spacing--60);
}

.pst-guide-subpages h2 {
	margin-block-end: var(--wp--preset--spacing--30);
}

.pst-guide-path__group {
	margin: 0;
	font-weight: 600;
}

.pst-guide-path__position {
	margin: 0;
}

.pst-guide-path__nav:empty {
	display: none;
}

.pst-guide-read-first p {
	margin: 0;
}

.pst-guide-siblings {
	padding-block-start: var(--wp--preset--spacing--40);
	border-top: 1px solid var(--wp--preset--color--line);
}
