/*
 * Reading area of tutorials and pages. Font size, line height, link and
 * heading spacing are in theme.json (styles.blocks.core/post-content); here
 * only what theme.json cannot say.
 */
.pst-prose {
	color: var(--wp--preset--color--contrast);
	overflow-wrap: break-word;
}

.pst-prose > :first-child {
	margin-top: 0;
}

.pst-prose :where(h2, h3, h4) {

	/* Core admin-bar.css already adds the admin bar to the root scroll-padding. */
	scroll-margin-top: calc(var(--pst-header-offset, 0px) + var(--wp--preset--spacing--40));
}

.pst-prose .wp-block-image img {
	border-radius: var(--wp--preset--border-radius--sm);
}

.pst-prose figcaption {
	margin-top: 10px;
	text-align: left;
}

/* Keyboard shortcuts written with <kbd> (Ctrl + T). */
.pst-prose kbd {
	padding: 1px 7px;
	border: 1px solid var(--wp--preset--color--line);
	border-bottom-width: 2px;
	border-radius: var(--wp--preset--border-radius--xs);
	background-color: var(--wp--preset--color--surface);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.85em;
	font-weight: 600;
	white-space: nowrap;
}

.pst-prose :where(ul, ol) {
	padding-left: 1.25em;
}

.pst-prose li + li {
	margin-top: 0.35em;
}

/* Old posts (2009-2015) used these classes from an earlier theme. */
.pst-prose .note {
	padding: 1rem 1.125rem;
	border-radius: var(--wp--preset--border-radius--sm);
	background-color: var(--wp--custom--tip--background);
}

.pst-prose .roundup {
	display: grid;
	gap: 0.75rem 1.25rem;
	margin-block: 1.5rem;
}

@media (min-width: 600px) {

	.pst-prose .roundup:has(.roundup-image) {
		grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	}
}

.pst-prose .roundup-image img {
	border-radius: var(--wp--preset--border-radius--sm);
}

/* Page links of a post split into pages (inc/page-links.php). */
.pst-tutorial-pagination {
	container-type: inline-size;
	margin-top: var(--wp--preset--spacing--60);
}

.pst-tutorial-pagination__layout {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px 24px;
}

.pst-page-links {
	display: grid;
	gap: 8px;
	margin-top: var(--wp--preset--spacing--50);
	font-size: var(--wp--preset--font-size--x-small);
}

.pst-tutorial-pagination .pst-page-links {
	margin: 0;
}

.pst-page-links__label {
	color: var(--wp--preset--color--muted);
	font-size: 0.75rem;
	line-height: 1.5;
	font-weight: 400;
}

.pst-page-links__numbers {
	display: flex;
	align-items: center;
	gap: 2px;
}

.pst-page-links__item,
.pst-page-links__gap {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.pst-page-links__gap {
	width: 22px;
	min-height: 44px;
	color: var(--wp--preset--color--muted);
}

.pst-page-links .post-page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	min-height: 44px;
	padding: 0;
	color: var(--wp--preset--color--muted);
	text-decoration: none;
}

.pst-page-links__number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--wp--preset--color--surface);
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1;
}

.pst-page-links .current .pst-page-links__number {
	background: var(--wp--preset--color--action);
	color: var(--wp--preset--color--on-action);
	font-weight: 700;
}

.pst-page-links a.post-page-numbers:hover .pst-page-links__number {
	background: var(--wp--preset--color--action-soft);
	color: var(--wp--preset--color--action-strong);
}

.pst-page-links__mobile {
	display: none;
}

.pst-pagination-end {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	color: var(--wp--preset--color--muted);
	font-size: 0.8125rem;
}

.pst-tutorial-pagination .pst-continue,
.pst-tutorial-pagination .pst-pagination-end {
	margin: 0;
}

.pst-tutorial-pagination .pst-continue a {
	justify-content: center;
	gap: 12px;
	min-height: 46px;
	padding: 0 20px;
	font-size: 0.875rem;
	font-weight: 600;
	white-space: nowrap;
}

@container (max-width: 600px) {

	.pst-tutorial-pagination__layout {
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
	}

	.pst-page-links {
		justify-items: center;
	}

	.pst-page-links__desktop {
		display: none;
	}

	.pst-page-links__mobile {
		display: inline-flex;
	}

	.pst-tutorial-pagination .pst-continue a {
		width: 100%;
	}
}

@media (max-width: 600px) {

	.pst-page-links {
		justify-items: center;
	}

	.pst-page-links__desktop {
		display: none;
	}

	.pst-page-links__mobile {
		display: inline-flex;
	}
}
