/*
 * Universal Editorial — reading views
 * Loaded on posts, pages and the 404 page.
 */

/* ==========================================================================
   Article frame
   ========================================================================== */

.ue-single,
.ue-page {
	padding-top: clamp(1.5rem, 4.5vw, 3rem);
}

.ue-page {
	padding-bottom: clamp(2.5rem, 7vw, var(--ue-space, 72px));
}

.ue-single--contained .ue-layout:not(.has-sidebar) .ue-article,
.ue-page--content .ue-layout:not(.has-sidebar) .ue-article {
	max-width: var(--ue-content, 720px);
	margin-inline: auto;
}

.ue-single--full .ue-layout:not(.has-sidebar) .ue-article,
.ue-page--wide .ue-layout:not(.has-sidebar) .ue-article {
	max-width: var(--ue-wide, 1040px);
	margin-inline: auto;
}

.ue-page--full .ue-article {
	max-width: none;
}

.ue-article {
	min-width: 0;
	padding-bottom: clamp(2rem, 5vw, 3rem);
}

/* ==========================================================================
   Header: category, title, lead, details
   ========================================================================== */

.ue-entry-header {
	margin-bottom: clamp(1.5rem, 3.5vw, 2.25rem);
}

.ue-entry-header__cat {
	display: inline-block;
	margin-bottom: 0.8rem;
	color: var(--ue-accent, #0f7d5c);
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
}

.ue-entry-header__cat:hover {
	color: var(--ue-accent, #0f7d5c);
	text-decoration: underline;
}

.ue-entry-header__title {
	margin: 0 0 0.45em;
	font-size: var(--ue-h1, 2.5rem);
	line-height: 1.12;
}

.ue-entry-header__lead {
	max-width: 62ch;
	margin: 0 0 1.4rem;
	color: var(--ue-subheading, #3e4c5a);
	font-size: clamp(1.1rem, 1rem + 0.45vw, 1.3rem);
	line-height: 1.55;
}

.ue-entry-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.55rem 1.4rem;
	padding-block: 0.85rem;
	border-top: 1px solid var(--ue-border, #e1e6eb);
	border-bottom: 1px solid var(--ue-border, #e1e6eb);
	color: var(--ue-text-muted, #5b6876);
	font-size: 0.9rem;
	line-height: 1.4;
}

.ue-entry-meta > span,
.ue-entry-meta > a {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.2rem 0.4rem;
}

.ue-entry-meta .ue-icon {
	opacity: 0.8;
}

.ue-entry-meta a {
	color: inherit;
	text-decoration: none;
}

.ue-entry-meta a:hover {
	color: var(--ue-link, #0e5b8c);
}

.ue-entry-meta__author a {
	color: var(--ue-heading, #142130);
	font-weight: 600;
}

.ue-entry-meta .ue-avatar {
	width: 34px;
	height: 34px;
	margin-right: 0.2rem;
	border-radius: 50%;
}

.ue-entry-meta__updated {
	color: var(--ue-text-muted, #5b6876);
}

.ue-entry-meta__updated::before {
	margin-right: 0.4rem;
	content: "/";
	opacity: 0.5;
}

/* Featured image, sized to the text or slightly wider. Never a full-screen cover. */
.ue-entry-image {
	margin: 0 0 clamp(1.75rem, 4vw, 2.5rem);
}

.ue-entry-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--ue-img-radius, 6px);
}

.ue-entry-image figcaption {
	margin-top: 0.6rem;
	color: var(--ue-text-muted, #5b6876);
	font-size: 0.85rem;
}

@media (min-width: 1100px) {
	.ue-single--contained .ue-layout:not(.has-sidebar) .ue-entry-image--wide {
		margin-inline: calc((min(var(--ue-wide, 1040px), 100vw - 4rem) - 100%) / -2);
	}
}

/* ==========================================================================
   Reading typography
   ========================================================================== */

.ue-prose {
	color: var(--ue-text, #28323e);
	font-family: var(--ue-font-article, inherit);
	font-size: var(--ue-fs-article, 1.1875rem);
	line-height: var(--ue-lh-article, 1.75);
	overflow-wrap: break-word;
}

.ue-prose > * {
	margin-top: 0;
	margin-bottom: 0;
}

.ue-prose > * + * {
	margin-top: 1.15em;
}

.ue-prose h2,
.ue-prose h3,
.ue-prose h4,
.ue-prose h5,
.ue-prose h6 {
	scroll-margin-top: 1.5rem;
}

.has-sticky-header .ue-prose :is(h2, h3, h4) {
	scroll-margin-top: calc(var(--ue-header-h, 76px) + 1rem);
}

.ue-prose > h2 { margin-top: 1.9em; font-size: var(--ue-h2, 2rem); }
.ue-prose > h3 { margin-top: 1.6em; font-size: var(--ue-h3, 1.5rem); }
.ue-prose > h4 { margin-top: 1.4em; font-size: var(--ue-h4, 1.25rem); }
.ue-prose > h5,
.ue-prose > h6 { margin-top: 1.3em; }

.ue-prose > :is(h2, h3, h4, h5, h6) + * {
	margin-top: 0.6em;
}

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

.ue-prose a {
	color: var(--ue-link, #0e5b8c);
	text-decoration: underline;
	text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
}

.ue-prose a:hover {
	color: var(--ue-link-hover, #093f62);
	text-decoration-color: currentColor;
}

.ue-prose strong {
	color: var(--ue-heading, #142130);
	font-weight: 700;
}

.ue-prose ul,
.ue-prose ol {
	padding-left: 1.35em;
}

.ue-prose li + li {
	margin-top: 0.4em;
}

.ue-prose li > ul,
.ue-prose li > ol {
	margin-top: 0.4em;
}

.ue-prose li::marker {
	color: var(--ue-primary, #0e5b8c);
}

.ue-prose ol li::marker {
	font-weight: 600;
}

.ue-prose blockquote,
.ue-prose .wp-block-quote {
	margin-inline: 0;
	padding: 0.2rem 0 0.2rem 1.35rem;
	border-left: 3px solid var(--ue-primary, #0e5b8c);
	color: var(--ue-heading, #142130);
	font-family: var(--ue-font-heading, Georgia, serif);
	font-size: 1.12em;
	line-height: 1.5;
}

.ue-prose blockquote p:last-of-type {
	margin-bottom: 0;
}

.ue-prose blockquote cite,
.ue-prose .wp-block-pullquote cite {
	display: block;
	margin-top: 0.65rem;
	color: var(--ue-text-muted, #5b6876);
	font-family: var(--ue-font-body, inherit);
	font-size: 0.8em;
	font-style: normal;
}

.ue-prose .wp-block-pullquote {
	padding: 1.75rem 0;
	border-top: 2px solid var(--ue-heading, #142130);
	border-bottom: 1px solid var(--ue-border, #e1e6eb);
	text-align: center;
}

.ue-prose .wp-block-pullquote blockquote {
	padding: 0;
	border: 0;
	font-size: 1.3em;
}

.ue-prose figure {
	margin-inline: 0;
}

.ue-prose img {
	height: auto;
	border-radius: var(--ue-img-radius, 6px);
}

.ue-prose figcaption,
.ue-prose .wp-element-caption {
	margin-top: 0.55rem;
	color: var(--ue-text-muted, #5b6876);
	font-size: 0.82em;
	line-height: 1.45;
	text-align: center;
}

.ue-prose hr,
.ue-prose .wp-block-separator {
	width: 100%;
	margin-block: 2.5em;
	border: 0;
	border-top: 1px solid var(--ue-border, #e1e6eb);
}

.ue-prose .wp-block-table,
.ue-prose .ue-table-wrap {
	overflow-x: auto;
}

.ue-prose table {
	width: 100%;
	font-size: 0.9em;
	line-height: 1.45;
}

.ue-prose th,
.ue-prose td {
	padding: 0.65rem 0.8rem;
	border: 0;
	border-bottom: 1px solid var(--ue-border, #e1e6eb);
	text-align: left;
	vertical-align: top;
}

.ue-prose thead th {
	border-bottom: 2px solid var(--ue-heading, #142130);
	color: var(--ue-heading, #142130);
	font-weight: 700;
	white-space: nowrap;
}

.ue-prose tbody tr:nth-child(even) {
	background: color-mix(in srgb, var(--ue-surface-alt, #f2f5f7) 60%, transparent);
}

.ue-prose .wp-block-table.is-style-stripes td,
.ue-prose .wp-block-table.is-style-stripes th {
	border-color: transparent;
}

.ue-prose code,
.ue-prose kbd {
	padding: 0.12em 0.36em;
	border-radius: 4px;
	background: var(--ue-surface-alt, #f2f5f7);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.86em;
}

.ue-prose pre {
	padding: 1rem 1.15rem;
	overflow-x: auto;
	border: 1px solid var(--ue-border, #e1e6eb);
	border-radius: var(--ue-radius, 8px);
	background: var(--ue-surface-alt, #f2f5f7);
	font-size: 0.85em;
	line-height: 1.6;
}

.ue-prose pre code {
	padding: 0;
	background: none;
	font-size: inherit;
}

.ue-prose mark {
	padding: 0 0.15em;
	background: color-mix(in srgb, var(--ue-accent, #0f7d5c) 22%, transparent);
	color: inherit;
}

.ue-prose .wp-block-embed iframe,
.ue-prose iframe {
	max-width: 100%;
}

.ue-prose .wp-block-embed__wrapper {
	position: relative;
}

.ue-prose .wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.ue-prose .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	padding: var(--ue-btn-py, 0.72rem) var(--ue-btn-px, 1.25rem);
	border-radius: var(--ue-btn-radius, 8px);
	background: var(--ue-btn-bg, #0e5b8c);
	color: var(--ue-btn-text, #fff);
	font-family: var(--ue-font-button, inherit);
	font-size: var(--ue-btn-fs, 0.95rem);
	font-weight: var(--ue-btn-fw, 600);
	text-decoration: none;
}

.ue-prose .wp-block-button__link:hover {
	background: var(--ue-btn-bg-hover, #093f62);
	color: var(--ue-btn-text-hover, #fff);
}

.ue-prose .is-style-outline .wp-block-button__link {
	border: 1.5px solid currentColor;
	background: transparent;
	color: var(--ue-btn-bg, #0e5b8c);
}

.ue-prose .wp-block-image.aligncenter,
.ue-prose .aligncenter {
	margin-inline: auto;
	text-align: center;
}

.ue-prose .has-background {
	padding: 1.25rem 1.5rem;
	border-radius: var(--ue-radius, 8px);
}

.ue-prose .wp-block-details {
	padding: 0.85rem 1.1rem;
	border: 1px solid var(--ue-border, #e1e6eb);
	border-radius: var(--ue-radius, 8px);
}

.ue-prose .wp-block-details summary {
	color: var(--ue-heading, #142130);
	font-weight: 600;
	cursor: pointer;
}

@media (min-width: 640px) {
	.ue-prose .alignleft {
		float: left;
		max-width: 50%;
		margin: 0.35em 1.5em 1em 0;
	}

	.ue-prose .alignright {
		float: right;
		max-width: 50%;
		margin: 0.35em 0 1em 1.5em;
	}
}

.ue-prose::after {
	display: table;
	clear: both;
	content: "";
}

/* Wide and full-width blocks break out of the text column. */
.ue-layout:not(.has-sidebar) .ue-prose > .alignwide {
	width: auto;
	max-width: none;
	margin-inline: calc((min(var(--ue-wide, 1040px), 100vw - 2 * max(16px, min(var(--ue-gutter, 24px), 5vw))) - 100%) / -2);
}

.ue-layout:not(.has-sidebar) .ue-prose > .alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-inline: calc(50% - 50vw);
}

.ue-layout:not(.has-sidebar) .ue-prose > .alignfull img {
	width: 100%;
	border-radius: 0;
}

.ue-page--full .ue-prose > .alignwide,
.ue-page--wide .ue-prose > .alignwide {
	margin-inline: 0;
}

.ue-prose--blank {
	font-size: var(--ue-fs-base, 1.0625rem);
}

.ue-page-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: 2rem;
	font-weight: 600;
}

.ue-page-links a,
.ue-page-links > span:not(:first-child) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.4rem;
	height: 2.4rem;
	border: 1px solid var(--ue-border, #e1e6eb);
	border-radius: var(--ue-radius, 8px);
	text-decoration: none;
}

/* ==========================================================================
   After the article
   ========================================================================== */

.ue-entry-footer {
	display: grid;
	gap: 1.75rem;
	margin-top: clamp(2rem, 5vw, 3rem);
}

.ue-tags ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ue-tags a {
	display: inline-flex;
	align-items: center;
	min-height: 2.25rem;
	padding: 0.35rem 0.85rem;
	border: 1px solid var(--ue-border, #e1e6eb);
	border-radius: 999px;
	color: var(--ue-subheading, #3e4c5a);
	font-size: 0.875rem;
	text-decoration: none;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.ue-tags a:hover {
	border-color: var(--ue-primary, #0e5b8c);
	color: var(--ue-link, #0e5b8c);
}

.ue-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem 1rem;
	padding-block: 1rem;
	border-top: 1px solid var(--ue-border, #e1e6eb);
	border-bottom: 1px solid var(--ue-border, #e1e6eb);
}

.ue-share__label {
	color: var(--ue-heading, #142130);
	font-size: 0.9rem;
	font-weight: 600;
}

.ue-share__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ue-share__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid var(--ue-border, #e1e6eb);
	border-radius: 50%;
	background: transparent;
	color: var(--ue-heading, #142130);
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ue-share__link:hover {
	border-color: var(--ue-btn-bg, #0e5b8c);
	background: var(--ue-btn-bg, #0e5b8c);
	color: var(--ue-btn-text, #fff);
}

.ue-share__status {
	color: var(--ue-accent, #0f7d5c);
	font-size: 0.875rem;
	font-weight: 600;
}

.ue-author-box {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: start;
	gap: 1.1rem;
	padding: clamp(1.1rem, 3vw, 1.6rem);
	border-radius: var(--ue-radius, 8px);
	background: var(--ue-surface-alt, #f2f5f7);
}

.ue-author-box .ue-avatar {
	width: 64px;
	height: 64px;
	border-radius: 50%;
}

.ue-author-box p {
	margin: 0;
}

.ue-author-box__label {
	color: var(--ue-text-muted, #5b6876);
	font-size: 0.8125rem;
}

.ue-author-box__name {
	font-family: var(--ue-font-heading, Georgia, serif);
	font-size: 1.2rem;
	font-weight: var(--ue-fw-heading, 700);
	line-height: 1.3;
}

.ue-author-box__name a {
	color: var(--ue-heading, #142130);
	text-decoration: none;
}

.ue-author-box__bio {
	margin-top: 0.4rem !important;
	color: var(--ue-text, #28323e);
	font-size: 0.95rem;
	line-height: 1.6;
}

.ue-back {
	margin: 0;
}

.ue-post-nav {
	display: grid;
	gap: 0.75rem;
}

@media (min-width: 640px) {
	.ue-post-nav {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.ue-post-nav__link {
	display: grid;
	align-content: start;
	gap: 0.3rem;
	padding: 1rem 1.2rem;
	border: 1px solid var(--ue-border, #e1e6eb);
	border-radius: var(--ue-radius, 8px);
	text-decoration: none;
	transition: border-color 0.2s ease;
}

.ue-post-nav__link:hover {
	border-color: var(--ue-heading, #142130);
}

.ue-post-nav__link--next {
	text-align: right;
}

@media (min-width: 640px) {
	.ue-post-nav__link--next:only-child {
		grid-column: 2;
	}
}

.ue-post-nav__label {
	color: var(--ue-text-muted, #5b6876);
	font-size: 0.8125rem;
}

.ue-post-nav__title {
	color: var(--ue-heading, #142130);
	font-family: var(--ue-font-heading, Georgia, serif);
	font-weight: 600;
	line-height: 1.35;
}

/* ==========================================================================
   Related content
   ========================================================================== */

.ue-related {
	padding-block: clamp(2.5rem, 7vw, var(--ue-space, 72px));
	background: var(--ue-surface-alt, #f2f5f7);
	--ue-card-bg: var(--ue-surface, #fff);
}

.ue-related .ue-carousel__btn {
	background: var(--ue-surface, #fff);
}

/* ==========================================================================
   Comments
   ========================================================================== */

.ue-comments-wrap {
	max-width: calc(var(--ue-content, 720px) + var(--ue-gutter, 24px) * 2);
	padding-block: clamp(2.5rem, 7vw, var(--ue-space, 72px));
}

.ue-comments__title {
	margin: 0 0 1.5rem;
	font-size: var(--ue-h3, 1.5rem);
}

.ue-comments__list,
.ue-comments__list .children {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ue-comments__list {
	margin-bottom: 2.5rem;
}

.ue-comments__list .children {
	margin-top: 1.25rem;
	padding-left: clamp(1rem, 4vw, 2.5rem);
	border-left: 2px solid var(--ue-border, #e1e6eb);
}

.ue-comments__list .comment,
.ue-comments__list .pingback {
	margin-bottom: 1.25rem;
}

.ue-comments__list .comment-body {
	padding: 1.1rem 1.25rem;
	border: 1px solid var(--ue-border, #e1e6eb);
	border-radius: var(--ue-radius, 8px);
}

.ue-comments__list .comment-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.25rem 1rem;
	margin-bottom: 0.65rem;
	font-size: 0.875rem;
}

.ue-comments__list .comment-author {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	color: var(--ue-heading, #142130);
}

.ue-comments__list .comment-author .avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
}

.ue-comments__list .comment-author .says {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

.ue-comments__list .comment-author .fn {
	font-style: normal;
	font-weight: 600;
}

.ue-comments__list .comment-metadata a {
	color: var(--ue-text-muted, #5b6876);
	text-decoration: none;
}

.ue-comments__list .comment-content {
	font-size: 0.975rem;
}

.ue-comments__list .comment-content > :last-child {
	margin-bottom: 0;
}

.ue-comments__list .reply {
	margin-top: 0.6rem;
	font-size: 0.875rem;
	font-weight: 600;
}

.ue-comments__list .comment-awaiting-moderation {
	color: var(--ue-text-muted, #5b6876);
	font-size: 0.875rem;
}

.ue-comments .comment-respond {
	margin-top: 1rem;
}

.ue-comments .comment-form {
	display: grid;
	gap: 1rem;
}

.ue-comments .comment-form p {
	margin: 0;
}

.ue-comments .comment-form label {
	display: block;
	margin-bottom: 0.35rem;
	color: var(--ue-heading, #142130);
	font-size: 0.9rem;
	font-weight: 600;
}

.ue-comments .comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
}

.ue-comments .comment-form-cookies-consent label {
	margin: 0;
	font-weight: 400;
}

.ue-comments .comment-notes,
.ue-comments .logged-in-as {
	color: var(--ue-text-muted, #5b6876);
	font-size: 0.875rem;
}

.ue-comments #cancel-comment-reply-link {
	margin-left: 0.75rem;
	font-size: 0.875rem;
	font-weight: 400;
}

.ue-comments__closed {
	color: var(--ue-text-muted, #5b6876);
}

.ue-comments .comment-navigation .nav-links {
	display: flex;
	justify-content: space-between;
	margin-bottom: 2rem;
}

/* ==========================================================================
   404
   ========================================================================== */

.ue-404 {
	padding-block: clamp(3rem, 9vw, 6rem);
}

.ue-404__header {
	max-width: 640px;
	margin: 0 auto clamp(2.5rem, 7vw, 4.5rem);
	text-align: center;
}

.ue-404__header .ue-archive__desc {
	margin-inline: auto;
	margin-bottom: 1.75rem;
}

.ue-404__latest .ue-section__title {
	margin-bottom: 1.5rem;
	padding-top: 0.85rem;
	border-top: 2px solid var(--ue-heading, #142130);
}
