.ybk-reading {
	--ybk-copy: min(100%, var(--ybk-content));
	min-width: 0;
}

.ybk-reading > :not(.ybk-tool, .alignwide, .alignfull, .wp-block-shortcode):not(:has(.ybk-tool)) {
	max-inline-size: var(--ybk-copy);
}

.ybk-reading > :is(.ybk-tool, .alignwide, .alignfull, .wp-block-shortcode),
.ybk-reading > :has(.ybk-tool) {
	max-inline-size: 100%;
	min-width: 0;
}

.ybk-reading > :first-child { margin-block-start: 0; }

.ybk-reading :is(p, li):not(.ybk-tool *) { overflow-wrap: anywhere; }

.ybk-reading :is(h2, h3, h4):not(.ybk-tool *) {
	color: var(--ybk-blue);
	font-family: var(--ybk-display);
	font-weight: 700;
	line-height: 1.13;
	margin-block: 1.5em 0.5em;
	overflow-wrap: anywhere;
}

.ybk-reading h2:not(.ybk-tool *) { font-size: clamp(1.5rem, 4vw, 2.15rem); }
.ybk-reading h3:not(.ybk-tool *) { font-size: clamp(1.2rem, 3vw, 1.58rem); }
.ybk-reading h4:not(.ybk-tool *) { font-size: 1.15rem; }

.ybk-reading :is(img, video, iframe):not(.ybk-tool *) {
	max-inline-size: 100%;
}

.ybk-reading :is(img, video):not(.ybk-tool *) { height: auto; }

.ybk-reading :is(figure, figcaption, pre):not(.ybk-tool *) {
	max-inline-size: 100%;
	margin-inline: 0;
}

.ybk-reading figcaption:not(.ybk-tool *) {
	color: var(--ybk-muted);
	font-size: 0.9rem;
}

.ybk-reading a:not(.ybk-tool *) { text-underline-offset: 0.14em; }

.ybk-reading blockquote:not(.ybk-tool *) {
	margin-inline: 0;
	padding: 0.1rem 1rem;
	border-inline-start: 4px solid var(--ybk-blue);
	background: var(--ybk-paper);
}

.ybk-reading :is(.wp-block-group, .wp-block-columns, .wp-block-column, .wp-block-media-text, .wp-block-table, .wp-block-cover):not(.ybk-tool *) {
	box-sizing: border-box;
	min-width: 0;
	max-width: 100%;
}

.ybk-reading :is(.wp-block-button__link, .ybk-action):not(.ybk-tool *) {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	padding: 0.6rem 0.9rem;
	min-height: 2.75rem;
	border-radius: 0.4rem;
	background: var(--ybk-blue);
	color: white;
	font-weight: 700;
	text-decoration: none;
}

.ybk-reading .ybk-action:hover { background: #192d65; }

.ybk-reading :is(details, .ybk-note, .ybk-fact, .ybk-example, .ybk-resource):not(.ybk-tool *) {
	box-sizing: border-box;
	min-width: 0;
	margin-block: 1rem;
	padding: 0.75rem 0.9rem;
	border: 1px solid var(--ybk-line);
	border-radius: 0.5rem;
	background: var(--ybk-paper);
}

.ybk-reading :is(.ybk-note, .ybk-fact, .ybk-example, .ybk-resource):not(.ybk-tool *) > :first-child { margin-block-start: 0; }
.ybk-reading :is(.ybk-note, .ybk-fact, .ybk-example, .ybk-resource):not(.ybk-tool *) > :last-child { margin-block-end: 0; }
.ybk-reading summary:not(.ybk-tool *) { cursor: pointer; font-weight: 700; }

.ybk-reading :is(.wp-block-table, .ybk-scrolltable):not(.ybk-tool *) {
	box-sizing: border-box;
	max-inline-size: 100%;
	overflow-x: auto;
	margin-block: 1rem 1.25rem;
}

.ybk-reading table:not(.ybk-tool *) {
	width: 100%;
	border-collapse: collapse;
	background: var(--ybk-paper);
	font-variant-numeric: tabular-nums;
}

.ybk-reading :is(th, td):not(.ybk-tool *) {
	padding: 0.48rem 0.68rem;
	border: 1px solid var(--ybk-line);
	overflow-wrap: anywhere;
	text-align: start;
	vertical-align: top;
}

.ybk-reading thead th:not(.ybk-tool *) {
	color: white;
	background: var(--ybk-blue);
}

.ybk-reading tbody tr:nth-child(even) :is(td, th):not(.ybk-tool *) { background: #eaeff9; }

.ybk-reading pre:not(.ybk-tool *) {
	box-sizing: border-box;
	overflow-x: auto;
	padding: 0.85rem;
	background: var(--ybk-paper);
}

.ybk-entry-post .ybk-reading :is(section, article, div):not(.ybk-tool *) {
	box-sizing: border-box;
	min-width: 0;
}

.ybk-entry-post .ybk-reading > * :is(section, article, div):not(.ybk-tool *) {
	max-inline-size: 100%;
}

.ybk-comments {
	width: min(100%, var(--ybk-content));
	margin-block-start: 2.5rem;
	border-top: 1px solid var(--ybk-line);
}

.ybk-comments :is(input:not([type="checkbox"]), textarea) {
	box-sizing: border-box;
	max-width: 100%;
	padding: 0.6rem;
	border: 1px solid #818da8;
	border-radius: 0.3rem;
	font: inherit;
}

.ybk-comments :is(label, textarea) { display: block; }
.ybk-comments input[type="checkbox"] + label { display: inline; }

@media (max-width: 600px) {
	.ybk-reading .wp-block-media-text:not(.ybk-tool *) { display: block; }
	.ybk-reading :is(th, td):not(.ybk-tool *) { padding: 0.42rem; }
}
