/*
 * Compatibility for classic WordPress content accumulated since 2012.
 * This file styles legacy HTML and shortcodes without rewriting post_content.
 */

.entry-content > :first-child {
	margin-top: 0;
}

.entry-content > :last-child {
	margin-bottom: 0;
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content dl,
.entry-content table,
.entry-content blockquote,
.entry-content pre,
.entry-content figure,
.entry-content .wp-caption,
.entry-content .gallery,
.entry-content .wp-block-image,
.entry-content .wp-block-gallery,
.entry-content .wp-block-embed {
	margin-top: 0;
	margin-bottom: 1.45em;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
	clear: both;
	margin-top: 1.75em;
	margin-bottom: 0.65em;
	color: var(--ki-ink);
	font-family: var(--ki-interface);
	font-style: normal;
	font-weight: 700;
	letter-spacing: -0.012em;
	line-height: 1.25;
	text-transform: none;
}

.entry-content h1 {
	font-size: clamp(1.8rem, 1.5rem + 1vw, 2.15rem);
}

.entry-content h2 {
	font-size: clamp(1.55rem, 1.35rem + 0.8vw, 1.9rem);
}

.entry-content h3 {
	font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem);
}

.entry-content h4 {
	font-size: 1.2rem;
}

.entry-content h5,
.entry-content h6 {
	font-size: 1rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.45em;
}

.entry-content li {
	margin-bottom: 0.38em;
}

.entry-content li > ul,
.entry-content li > ol {
	margin-top: 0.38em;
	margin-bottom: 0;
}

.entry-content strong,
.entry-content b {
	font-weight: 700;
}

.entry-content em,
.entry-content i {
	font-style: italic;
}

.entry-content a {
	overflow-wrap: anywhere;
}

.entry-content blockquote {
	padding: 0.2rem 0 0.2rem 1.35rem;
	border-left: 4px solid var(--ki-gold);
	color: #4f4e48;
	font-size: 1.05em;
}

.entry-content blockquote p:last-child {
	margin-bottom: 0;
}

.entry-content pre,
.entry-content code,
.entry-content kbd,
.entry-content samp {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
	font-size: 0.88em;
}

.entry-content pre {
	max-width: 100%;
	padding: 1rem;
	overflow: auto;
	background: #f1efe9;
	border: 1px solid var(--ki-line);
	white-space: pre-wrap;
}

.entry-content hr {
	clear: both;
	margin: 2.4rem 0;
	border: 0;
	border-top: 1px solid var(--ki-line);
}

/* Classic aligned media. */

.entry-content img,
.entry-content video,
.entry-content iframe,
.entry-content object,
.entry-content embed {
	max-width: 100%;
}

.entry-content iframe {
	display: block;
	width: 100%;
}

.entry-content .alignleft,
.entry-content img.alignleft,
.entry-content .wp-caption.alignleft {
	float: left;
	margin: 0.35rem 1.5rem 1rem 0;
}

.entry-content .alignright,
.entry-content img.alignright,
.entry-content .wp-caption.alignright {
	float: right;
	margin: 0.35rem 0 1rem 1.5rem;
}

.entry-content .aligncenter,
.entry-content img.aligncenter,
.entry-content .wp-caption.aligncenter {
	display: block;
	float: none;
	margin-right: auto;
	margin-left: auto;
}

.entry-content .alignnone {
	display: block;
	margin-right: 0;
	margin-left: 0;
}

/* Classic [caption] output. */

.entry-content .wp-caption {
	max-width: calc(100% - 18px) !important;
	padding: 9px;
	background: #eee;
	border: 0;
	box-sizing: border-box;
	text-align: left;
}

.entry-content .wp-caption img {
	display: block;
	width: auto;
	max-width: 100%;
	margin: 0 auto;
	padding: 6px;
	background: transparent;
	border: 0 !important;
	outline: 0;
	box-shadow: none;
	box-sizing: border-box;
}

.entry-content .wp-caption-text,
.entry-content .gallery-caption,
.entry-content figcaption {
	margin: 0;
	padding: 0.6rem 0 0;
	color: var(--ki-muted);
	font-family: var(--ki-interface);
	font-size: 0.8125rem;
	font-style: normal;
	font-weight: 400;
	line-height: 1.5;
	text-align: left;
}

.entry-content .wp-caption .wp-caption-text {
	position: relative;
	margin: 0 0 0.6em;
	padding: 10px 5px 5px 40px;
	color: #666;
	font-size: 0.875rem;
	line-height: 1.5;
}

.entry-content .wp-caption .wp-caption-text::before {
	position: absolute;
	top: 7px;
	left: 10px;
	color: #666;
	content: "\2014";
	font-size: 14px;
	font-style: normal;
	font-weight: 700;
}

.entry-content .wp-caption a:focus img,
.entry-content .wp-caption a:hover img {
	background: transparent;
	border: 0 !important;
}

.entry-content .wp-caption-text a,
.entry-content .gallery-caption a,
.entry-content figcaption a {
	color: var(--ki-gold);
}

/* Classic [gallery] output. */

.entry-content .gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	width: 100%;
	margin-right: 0;
	margin-left: 0;
}

.entry-content .gallery .gallery-item {
	float: none;
	min-width: 0;
	margin: 0;
	padding: 9px !important;
	background: #eee;
	box-sizing: border-box;
	text-align: left;
}

.entry-content .gallery-columns-1 .gallery-item {
	flex: 0 0 100%;
}

.entry-content .gallery-columns-2 .gallery-item {
	flex: 0 0 calc(50% - 0.5rem);
}

.entry-content .gallery-columns-3 .gallery-item {
	flex: 0 0 calc(33.333% - 0.667rem);
}

.entry-content .gallery-columns-4 .gallery-item {
	flex: 0 0 calc(25% - 0.75rem);
}

.entry-content .gallery-columns-5 .gallery-item,
.entry-content .gallery-columns-6 .gallery-item,
.entry-content .gallery-columns-7 .gallery-item,
.entry-content .gallery-columns-8 .gallery-item,
.entry-content .gallery-columns-9 .gallery-item {
	flex: 1 1 110px;
}

.entry-content .gallery-icon a,
.entry-content .gallery-icon img {
	display: block;
	width: 100%;
}

.entry-content .gallery-icon img {
	height: auto;
	padding: 6px;
	background: transparent;
	border: 0 !important;
	outline: 0;
	box-shadow: none;
	box-sizing: border-box;
}

.entry-content .gallery .gallery-caption {
	position: relative;
	margin: 0 !important;
	padding: 10px 5px 5px 40px !important;
	color: #666;
	font-size: 0.875rem !important;
	line-height: 1.5 !important;
	text-align: left !important;
}

.entry-content .gallery .gallery-caption::before {
	position: absolute;
	top: 7px;
	left: 10px;
	color: #666;
	content: "\2014";
	font-size: 14px;
	font-style: normal;
	font-weight: 700;
	line-height: 1.5;
}

.entry-content .gallery-icon a:focus img,
.entry-content .gallery-icon a:hover img {
	background: transparent;
	border: 0 !important;
}

/* Tables and document-like data. */

.entry-content table {
	display: block;
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	border-collapse: collapse;
	border-spacing: 0;
	font-family: var(--ki-interface);
	font-size: 0.9rem;
	line-height: 1.5;
}

.entry-content th,
.entry-content td {
	min-width: 7rem;
	padding: 0.65rem 0.75rem;
	border: 1px solid var(--ki-line);
	vertical-align: top;
	text-align: left;
}

.entry-content th {
	background: #f1efe9;
	font-weight: 700;
}

/* Core blocks inside predominantly classic content. */

.entry-content .wp-block-image img,
.entry-content .wp-block-cover,
.entry-content .wp-block-gallery,
.entry-content .wp-block-video,
.entry-content .wp-block-audio,
.entry-content .wp-block-file {
	max-width: 100%;
}

.entry-content .wp-block-cover {
	font-family: var(--ki-interface);
}

.entry-content .wp-block-cover p {
	margin-bottom: 0;
}

.entry-content .wp-block-button__link {
	font-family: var(--ki-interface);
	text-decoration: none;
}

.entry-content .wp-block-separator {
	clear: both;
}

/* Shortcodes Ultimate: keep cards within the reading column. */

.entry-content .su-box,
.entry-content .su-note,
.entry-content .su-quote,
.entry-content .su-spoiler,
.entry-content .su-row,
.entry-content .su-column {
	max-width: 100%;
}

/* Attachment and media metadata. */

.attachment .entry-content img,
.single-attachment .entry-content img {
	display: block;
	margin-right: auto;
	margin-left: auto;
}

@media (max-width: 600px) {
	.entry-content .alignleft,
	.entry-content .alignright,
	.entry-content img.alignleft,
	.entry-content img.alignright,
	.entry-content .wp-caption.alignleft,
	.entry-content .wp-caption.alignright {
		display: block;
		float: none;
		max-width: 100%;
		margin-right: auto;
		margin-left: auto;
	}

	.entry-content .gallery-columns-3 .gallery-item,
	.entry-content .gallery-columns-4 .gallery-item,
	.entry-content .gallery-columns-5 .gallery-item,
	.entry-content .gallery-columns-6 .gallery-item,
	.entry-content .gallery-columns-7 .gallery-item,
	.entry-content .gallery-columns-8 .gallery-item,
	.entry-content .gallery-columns-9 .gallery-item {
		flex: 0 0 calc(50% - 0.5rem);
	}
}

@media (max-width: 390px) {
	.entry-content .gallery .gallery-item {
		flex-basis: 100%;
	}
}
