/**
 * City notes and plain pages: photo hero, article column (Figma citynote-1440), note grids
 * (citynotes-1440), "More city notes", pagination, archive heading, search, 404, comments.
 */

/* ------------------------------------------------------------------ */
/* Photo hero (posts page and single note)                            */
/* ------------------------------------------------------------------ */

.mh-note-hero {
	--mh-heading: var(--mh-c-white);
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 720px;
	overflow: hidden;
	background: var(--mh-c-ink);
	color: var(--mh-c-white);
}

.mh-note-hero__media {
	position: absolute;
	inset: 0;
}

.mh-note-hero__media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.mh-note-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(23, 28, 41, 0.38);
	pointer-events: none;
}

.mh-note-hero__inner {
	position: relative;
	z-index: 1;
	padding-bottom: 96px;
}

.mh-note-hero__title {
	max-width: 760px;
	margin: 0;
	font-size: 56px;
	line-height: 64px;
}

.mh-note-hero__text {
	max-width: 760px;
	margin: 16px 0 0;
	color: var(--mh-c-white);
}

@media (max-width: 1024px) {
	.mh-note-hero {
		min-height: 600px;
	}
}

@media (max-width: 767px) {
	.mh-note-hero {
		min-height: 640px;
	}

	.mh-note-hero__inner {
		padding-bottom: 56px;
	}

	.mh-note-hero__title {
		font-size: var(--mh-fs-h1);
		line-height: var(--mh-lh-h1);
	}

	.mh-note-hero__text {
		font-size: 16px;
		line-height: 24px;
	}
}

/* ------------------------------------------------------------------ */
/* Article column and prose                                           */
/* ------------------------------------------------------------------ */

/* The full-width breakout below is 100vw wide; clip the scrollbar's width of overflow. */
.mh-article {
	overflow-x: clip;
}

.mh-prose {
	color: var(--mh-c-ink);
	font-family: var(--mh-sans);
	font-size: 18px;
	line-height: 28px;
}

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

.mh-prose > * + * {
	margin-top: 32px;
}

.mh-prose a:not(.mh-breakout *) {
	color: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.mh-prose a:hover:not(.mh-breakout *) {
	text-decoration-thickness: 2px;
}

.mh-prose h2:not(.mh-breakout *),
.mh-prose h3:not(.mh-breakout *),
.mh-prose h4:not(.mh-breakout *) {
	color: var(--mh-c-ink);
	font-family: var(--mh-serif);
	font-weight: 400;
}

.mh-prose h2:not(.mh-breakout *) {
	font-size: var(--mh-fs-h2);
	line-height: var(--mh-lh-h2);
}

.mh-prose h3:not(.mh-breakout *) {
	font-size: var(--mh-fs-h3);
	line-height: var(--mh-lh-h3);
}

.mh-prose h4:not(.mh-breakout *) {
	font-size: 22px;
	line-height: 30px;
}

.mh-prose > h2,
.mh-prose > h3 {
	margin-top: 48px;
}

.mh-prose ul:not(.mh-breakout *),
.mh-prose ol:not(.mh-breakout *) {
	padding-left: 24px;
}

.mh-prose li + li:not(.mh-breakout *) {
	margin-top: 8px;
}

/* Images: full column, rounded, caption 10px under. */
.mh-prose figure:not(.mh-breakout *),
.mh-prose .wp-block-image:not(.mh-breakout *) {
	margin-left: 0;
	margin-right: 0;
}

.mh-prose figure img:not(.mh-breakout *),
.mh-prose .wp-block-image img:not(.mh-breakout *),
.mh-prose > p > img:only-child {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--mh-radius);
}

.mh-prose .wp-block-image.alignleft img:not(.mh-breakout *),
.mh-prose .wp-block-image.alignright img:not(.mh-breakout *),
.mh-prose .wp-block-image.is-resized img:not(.mh-breakout *) {
	width: auto;
}

.mh-prose figcaption:not(.mh-breakout *),
.mh-prose .wp-element-caption:not(.mh-breakout *) {
	margin: 10px 0 0;
	color: var(--mh-c-muted);
	font-size: 14px;
	line-height: 20px;
	text-align: left;
}

/* Quote: 2px ink rule, serif 36/44. */
.mh-article .mh-prose blockquote:not(.mh-breakout *),
.mh-page .mh-prose blockquote:not(.mh-breakout *) {
	margin-left: 0;
	margin-right: 0;
	padding: 0 0 0 22px;
	border: 0;
	border-left: 2px solid var(--mh-c-ink);
	color: var(--mh-c-ink);
	font-family: var(--mh-serif);
	font-size: 36px;
	line-height: 44px;
	font-style: normal;
}

.mh-prose blockquote p:not(.mh-breakout *) {
	margin: 0;
	font-size: inherit;
	line-height: inherit;
}

.mh-prose blockquote p + p:not(.mh-breakout *) {
	margin-top: 16px;
}

.mh-prose blockquote cite:not(.mh-breakout *) {
	display: block;
	margin-top: 12px;
	color: var(--mh-c-muted);
	font-family: var(--mh-sans);
	font-size: 14px;
	line-height: 20px;
	font-style: normal;
}

.mh-prose hr:not(.mh-breakout *) {
	height: 0;
	border: 0;
	border-top: 1px solid var(--mh-c-line);
}

.mh-prose table:not(.mh-breakout *) {
	width: 100%;
	border-collapse: collapse;
	font-size: 16px;
	line-height: 24px;
}

.mh-prose th:not(.mh-breakout *),
.mh-prose td:not(.mh-breakout *) {
	padding: 12px 8px;
	border-bottom: 1px solid var(--mh-c-line);
	text-align: left;
}

/* A full-width section inside the column ([mh_commute]): edge to edge. */
.mh-prose > .mh-breakout {
	width: 100vw;
	max-width: none;
	margin-left: calc(50% - 50vw);
	margin-right: 0;
}

/* The section starts after a full section gap, as a section of its own would. */
/* The section's own top padding is the gap after the last paragraph (Figma: about 96). */
.mh-prose > * + .mh-breakout {
	margin-top: 0;
}

.mh-prose > .mh-breakout + * {
	margin-top: var(--mh-section-pad);
}

/* Ending on a full-width section: its own padding replaces the article's bottom padding. */
.mh-prose > .mh-breakout:last-child {
	margin-bottom: calc(-1 * var(--mh-pad-b, var(--mh-section-pad)));
}

.mh-page-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	font-weight: 600;
}

@media (max-width: 1024px) {
	.mh-article .mh-prose blockquote:not(.mh-breakout *),
	.mh-page .mh-prose blockquote:not(.mh-breakout *) {
		font-size: 28px;
		line-height: 36px;
	}
}

@media (max-width: 767px) {
	.mh-prose {
		font-size: 16px;
		line-height: 24px;
	}
}

/* Plain page title above the content. */
.mh-page__title {
	margin: 0 0 40px;
}

/* ------------------------------------------------------------------ */
/* Note grids                                                         */
/* ------------------------------------------------------------------ */

.mh-note-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 48px 24px;
}

.mh-note-grid--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mh-note-grid > * {
	min-width: 0;
}

.mh-note-list__empty {
	color: var(--mh-text);
}

@media (max-width: 767px) {
	.mh-note-grid,
	.mh-note-grid--2 {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
	}

	/* Phone: one row that scrolls sideways, cards 280 wide (Figma citynotes-390). */
	.mh-note-grid--scroll {
		display: flex;
		gap: 16px;
		margin-inline: calc(-1 * var(--mh-gutter));
		padding-inline: var(--mh-gutter);
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: var(--mh-gutter);
		scrollbar-width: none;
	}

	.mh-note-grid--scroll::-webkit-scrollbar {
		display: none;
	}

	.mh-note-grid--scroll > * {
		flex: 0 0 280px;
		scroll-snap-align: start;
	}
}

/* ------------------------------------------------------------------ */
/* Pagination                                                         */
/* ------------------------------------------------------------------ */

.mh-pagination {
	margin-top: 48px;
}

.mh-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.mh-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid var(--mh-c-line);
	border-radius: var(--mh-radius-control);
	background: var(--mh-c-white);
	color: var(--mh-c-ink);
	font-size: 16px;
	line-height: 24px;
	font-weight: 600;
	text-decoration: none;
}

.mh-pagination a.page-numbers:hover {
	border-color: var(--mh-c-ink);
}

.mh-pagination .page-numbers.current {
	border-color: var(--mh-c-ink);
	background: var(--mh-c-ink);
	color: var(--mh-c-white);
}

.mh-pagination .page-numbers.dots {
	border-color: transparent;
	background: transparent;
}

/* ------------------------------------------------------------------ */
/* Archive / search heading, search form, 404                         */
/* ------------------------------------------------------------------ */

.mh .mh-listing-head__text,
.mh .mh-404__text {
	max-width: 760px;
	margin-top: 16px;
}

.mh-listing-head__text p {
	margin: 0;
}

.mh-listing-head__search {
	max-width: 552px;
	margin-top: 32px;
}

.mh-404__actions {
	margin-top: 40px;
}

.mh-search {
	display: flex;
	gap: 16px;
}

.mh-search__input {
	flex: 1 1 auto;
	min-width: 0;
}

.mh-search__submit {
	flex: none;
}

/* ------------------------------------------------------------------ */
/* Comments                                                           */
/* ------------------------------------------------------------------ */

.mh-article__comments {
	padding-bottom: var(--mh-section-pad);
}

.mh-comments {
	margin-top: 56px;
	padding-top: 40px;
	border-top: 1px solid var(--mh-c-line);
}

.mh-article__comments .mh-comments {
	margin-top: 0;
}

.mh-comments__title,
.mh-comments__reply {
	margin: 0 0 24px;
}

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

.mh-comments__list .children {
	padding-left: 24px;
}

.mh-comments__list .comment-body {
	padding: 20px 0;
	border-bottom: 1px solid var(--mh-c-line);
}

.mh-comments__list .comment-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	color: var(--mh-c-muted);
	font-size: 14px;
	line-height: 20px;
}

.mh-comments__list .comment-author {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--mh-c-ink);
	font-weight: 600;
}

.mh-comments__list .avatar {
	border-radius: 50%;
}

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

.mh-comments__respond {
	margin-top: 40px;
}

.mh-comments .comment-form p {
	margin: 0 0 16px;
}

.mh-comments .comment-form label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
}

.mh-comments .comment-form input[type="text"],
.mh-comments .comment-form input[type="email"],
.mh-comments .comment-form input[type="url"],
.mh-comments .comment-form textarea {
	width: 100%;
	padding: 12px;
	border: 1px solid var(--mh-c-line);
	border-radius: var(--mh-radius-control);
	background: var(--mh-c-white);
	color: var(--mh-c-ink);
	font: inherit;
}

.mh-comments .comment-form .comment-form-cookies-consent label {
	display: inline;
	font-weight: 400;
}
