:root {
	--mhb-journal-wine: #6f243b;
	--mhb-journal-wine-dark: #421724;
	--mhb-journal-green: #173e34;
	--mhb-journal-ink: #34251f;
	--mhb-journal-paper: #fffaf0;
	--mhb-journal-line: #d7c3a5;
}

.mhb-journal-composer-shell,
.mhb-journal-composer-access {
	width: min(1120px, calc(100% - 2rem));
	box-sizing: border-box;
	margin: 2rem auto 5rem;
	color: var(--mhb-journal-ink);
}

.mhb-journal-composer-header {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 2rem;
	align-items: end;
	padding: clamp(1.5rem, 4vw, 3rem);
	color: #fff9ec;
	background: linear-gradient(135deg, var(--mhb-journal-green), var(--mhb-journal-wine));
	border-radius: 24px;
	box-shadow: 0 24px 60px rgba(55, 29, 26, .2);
}

.mhb-journal-composer-header h1,
.mhb-journal-composer-access h1 {
	margin: .25rem 0 .75rem;
	font: 700 clamp(2.25rem, 6vw, 4.5rem)/.98 Georgia, "Times New Roman", serif;
}

.mhb-journal-composer-header p { max-width: 760px; margin: .5rem 0 0; line-height: 1.55; }
.mhb-journal-composer-kicker { margin: 0; font-size: .76rem; font-weight: 850; letter-spacing: .16em; }
.mhb-journal-composer-header nav { display: grid; gap: .55rem; min-width: 165px; }
.mhb-journal-composer-header nav a { padding: .65rem .8rem; color: #fff9ec; border: 1px solid rgba(255,255,255,.38); border-radius: 10px; text-align: center; text-decoration: none; }
.mhb-journal-composer-header nav a:hover,
.mhb-journal-composer-header nav a:focus { background: rgba(255,255,255,.13); }

.mhb-journal-notice { margin: 1.25rem 0; padding: .9rem 1rem; border-radius: 12px; font-weight: 750; }
.mhb-journal-notice.is-success { color: #16472f; background: #e2f2e8; border: 1px solid #9bc6aa; }
.mhb-journal-notice.is-error { color: #7b1f2f; background: #fff0f0; border: 1px solid #dea5ad; }
.mhb-journal-notice a { color: inherit; }

.mhb-journal-composer-form,
.mhb-journal-preview {
	margin-top: 1.5rem;
	padding: clamp(1.2rem, 4vw, 2.5rem);
	background: var(--mhb-journal-paper);
	border: 1px solid var(--mhb-journal-line);
	border-radius: 22px;
	box-shadow: 0 16px 46px rgba(72, 47, 34, .1);
}

.mhb-journal-status { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; margin-bottom: 1.4rem; color: #6b5144; font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.mhb-journal-field { display: grid; gap: .55rem; margin: 1.35rem 0; }
.mhb-journal-field > span,
.mhb-journal-existing-photo label > span { font-size: .82rem; font-weight: 850; letter-spacing: .04em; }
.mhb-journal-field input,
.mhb-journal-field textarea,
.mhb-journal-existing-photo input { width: 100%; box-sizing: border-box; padding: .82rem .9rem; color: var(--mhb-journal-ink); background: #fff; border: 1px solid #bfa98b; border-radius: 10px; font: inherit; }
.mhb-journal-title input { padding: .8rem 0; background: transparent; border: 0; border-bottom: 2px solid var(--mhb-journal-line); border-radius: 0; font: 700 clamp(2rem, 5vw, 3.65rem)/1.05 Georgia, "Times New Roman", serif; }
.mhb-journal-title input:focus { outline: 0; border-color: var(--mhb-journal-wine); }
.mhb-journal-story .wp-editor-wrap { background: #fff; }
.mhb-journal-story .wp-editor-container { border-color: #bfa98b; }
.mhb-journal-story .mce-toolbar-grp { background: #f3eadb; }

.mhb-journal-photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0; }
.mhb-journal-photo-panel { min-width: 0; padding: 1.15rem; background: #f5ead8; border: 1px solid #d8c0a0; border-radius: 16px; }
.mhb-journal-photo-panel h2 { margin: 0 0 .25rem; color: var(--mhb-journal-wine-dark); font: 700 1.45rem/1.1 Georgia, "Times New Roman", serif; }
.mhb-journal-photo-panel > p { margin: .25rem 0 1rem; color: #6e5547; font-size: .9rem; }
.mhb-journal-lead-preview img { display: block; width: 100%; max-height: 360px; object-fit: cover; border-radius: 12px; }
.mhb-journal-file { display: grid; gap: .45rem; margin-top: 1rem; padding: .8rem; background: #fff; border: 1px dashed #9b7b59; border-radius: 10px; font-weight: 800; cursor: pointer; }
.mhb-journal-file input { max-width: 100%; font-weight: 500; }
.mhb-journal-photo-caption { display: grid; gap: .45rem; margin-top: .9rem; font-size: .82rem; font-weight: 850; }
.mhb-journal-photo-caption input { width: 100%; box-sizing: border-box; padding: .65rem .75rem; color: var(--mhb-journal-ink); background: #fff; border: 1px solid #bfa98b; border-radius: 8px; font: inherit; font-weight: 500; }
.mhb-journal-check { display: flex !important; align-items: center; gap: .45rem; margin-top: .75rem; font-size: .82rem; }
.mhb-journal-check input { width: auto; }
.mhb-journal-existing-photos,
.mhb-journal-new-captions { display: grid; gap: .75rem; }
.mhb-journal-existing-photo,
.mhb-journal-new-photo { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: .75rem; align-items: center; padding: .75rem; background: #fffaf2; border-radius: 12px; }
.mhb-journal-existing-photo img,
.mhb-journal-new-photo img { width: 92px; height: 78px; object-fit: cover; border-radius: 8px; }
.mhb-journal-existing-photo .mhb-journal-check { grid-column: 2; margin: 0; }
.mhb-journal-new-photo label { display: grid; min-width: 0; gap: .4rem; }
.mhb-journal-new-photo strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mhb-journal-new-photo input { width: 100%; box-sizing: border-box; padding: .65rem .75rem; border: 1px solid #bfa98b; border-radius: 8px; }

.mhb-journal-composer-actions { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.6rem -1rem -1rem; padding: 1rem; background: rgba(255,250,240,.96); border-top: 1px solid var(--mhb-journal-line); backdrop-filter: blur(8px); }
.mhb-journal-save-state { flex: 1 1 100%; min-height: 1.2em; margin: 0; color: #6b5144; font-size: .86rem; font-weight: 800; }
.mhb-journal-composer-actions button,
.mhb-journal-primary { min-height: 46px; padding: .72rem 1.05rem; color: var(--mhb-journal-wine); background: #fff; border: 1px solid var(--mhb-journal-wine); border-radius: 999px; font: inherit; font-size: .92rem; font-weight: 800; line-height: 1; cursor: pointer; text-decoration: none; }
.mhb-journal-composer-actions button.is-primary,
.mhb-journal-primary { margin-left: auto; color: #fff; background: var(--mhb-journal-wine); }
.mhb-journal-composer-actions button.is-danger { color: #8b2134; border-color: #bf8290; }
.mhb-journal-composer-actions button:disabled { cursor: wait; opacity: .62; }

.mhb-journal-preview { background: #efe2cc; }
.mhb-journal-preview > article { width: min(820px, 100%); box-sizing: border-box; margin: 1rem auto 0; padding: clamp(1.2rem, 5vw, 3.5rem); background: #fffdf8; border-radius: 16px; }
.mhb-journal-preview-lead { margin: calc(0px - clamp(1.2rem, 5vw, 3.5rem)) calc(0px - clamp(1.2rem, 5vw, 3.5rem)) 2rem; text-align:center; }
.mhb-journal-preview-lead img { display: block; width: auto; max-width: 100%; height:auto; max-height:min(58vh,520px); margin-inline:auto; object-fit: contain; border-radius: 16px 16px 0 0; }
.mhb-journal-preview-lead figcaption,
.mhb-journal-article-lead figcaption { padding: .7rem .85rem; color: #60483d; background: #f4eadb; font-size: .86rem; line-height: 1.45; }
.mhb-journal-preview header > p:first-child { color: var(--mhb-journal-wine); font-size: .78rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.mhb-journal-preview h2 { margin: .35rem 0 .75rem; color: var(--mhb-journal-wine-dark); font: 700 clamp(2.1rem, 6vw, 4rem)/1 Georgia, "Times New Roman", serif; }
.mhb-journal-preview-excerpt { color: #6d5143; font: italic 1.1rem/1.55 Georgia, "Times New Roman", serif; }
.mhb-journal-preview-story { font: 1.04rem/1.72 Georgia, "Times New Roman", serif; }
.mhb-journal-preview-story .wp-block-image,
.mhb-single-content .wp-block-image { text-align:center; }
.mhb-journal-preview-story :where(figure, .wp-caption, picture),
.mhb-single-content :where(figure, .wp-caption, picture) { max-width:100%!important; }
.mhb-journal-preview-story :where(figure.alignwide, figure.alignfull, .wp-caption.alignwide, .wp-caption.alignfull),
.mhb-single-content :where(figure.alignwide, figure.alignfull, .wp-caption.alignwide, .wp-caption.alignfull) { width:100%!important; margin-inline:0!important; }
.mhb-journal-preview-story img,
.mhb-single-content img { display:block!important; width:auto!important; max-width:min(100%,620px)!important; height:auto!important; max-height:min(55vh,520px)!important; margin-inline:auto!important; object-fit:contain!important; }
.mhb-journal-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 2rem 0; }
.mhb-journal-gallery figure { margin: 0; overflow: hidden; background: #f4eadb; border-radius: 12px; text-align:center; }
.mhb-journal-gallery img { display:block!important; width:auto!important; max-width:100%!important; height:auto!important; max-height:min(48vh,400px)!important; margin-inline:auto!important; object-fit:contain!important; }
.mhb-journal-gallery figcaption { padding: .7rem .85rem; color: #60483d; font-size: .86rem; line-height: 1.45; }
.mhb-journal-article-lead { margin: 0 0 2rem; text-align:center; }
.mhb-journal-article-lead-image { display:block!important; width:auto!important; max-width:min(100%,680px)!important; height:auto!important; max-height:min(52vh,520px)!important; margin-inline:auto!important; object-fit:contain!important; border-radius:16px; }

@media (max-width: 760px) {
	.mhb-journal-composer-header { grid-template-columns: 1fr; align-items: start; }
	.mhb-journal-composer-header nav { grid-template-columns: 1fr; width: 100%; }
	.mhb-journal-photo-grid { grid-template-columns: 1fr; }
	.mhb-journal-gallery { grid-template-columns: 1fr; }
	.mhb-journal-preview-lead img,
	.mhb-journal-article-lead-image { max-height:min(42vh,360px)!important; }
	.mhb-journal-preview-story img,
	.mhb-single-content img { max-height:min(38vh,320px)!important; }
	.mhb-journal-gallery img { max-height:min(36vh,300px)!important; }
	.mhb-journal-composer-actions { position: static; margin-inline: 0; padding-inline: 0; }
	.mhb-journal-composer-actions button { flex: 1 1 100%; }
	.mhb-journal-composer-actions button.is-primary { margin-left: 0; }
}

@media (max-width: 520px) {
	.mhb-journal-composer-shell,
	.mhb-journal-composer-access { width: min(100% - 1rem, 1120px); margin-top: .5rem; }
	.mhb-journal-composer-header,
	.mhb-journal-composer-form,
	.mhb-journal-preview { border-radius: 16px; }
	.mhb-journal-existing-photo,
	.mhb-journal-new-photo { grid-template-columns: 72px minmax(0, 1fr); }
	.mhb-journal-existing-photo img,
	.mhb-journal-new-photo img { width: 72px; height: 68px; }
}

/* Match the opened Official Journal lead to the Member Table Story reading card. */
.mhb-single-content .mhb-journal-article-lead {
	margin:0 0 1.25rem;
	overflow:hidden;
	background:#edf1e5;
	border-radius:12px;
	text-align:left;
}
.mhb-single-content .mhb-journal-article-lead-image {
	display:block!important;
	width:100%!important;
	max-width:none!important;
	height:auto!important;
	max-height:560px!important;
	margin:0!important;
	aspect-ratio:16 / 10!important;
	object-fit:cover!important;
	border-radius:12px 12px 0 0;
}

/* Legacy articles may already contain their featured photograph as an ordinary first figure. */
.mhb-publication-detail--official .mhb-reader-source > figure:first-of-type,
.mhb-publication-detail--official .mhb-reader-source > .wp-block-image:first-of-type {
	width:100%!important;
	max-width:none!important;
	margin:0 0 1.25rem!important;
	overflow:hidden;
	background:#edf1e5;
	border-radius:12px;
}
.mhb-publication-detail--official .mhb-reader-source > figure:first-of-type img,
.mhb-publication-detail--official .mhb-reader-source > .wp-block-image:first-of-type img {
	display:block!important;
	width:100%!important;
	max-width:none!important;
	height:auto!important;
	max-height:560px!important;
	margin:0!important;
	aspect-ratio:16 / 10!important;
	object-fit:cover!important;
	border-radius:12px 12px 0 0;
}

/* The Official Journal now uses the same article card as Member Table Stories. */
.mhb-community-preview-article.mhb-publication-detail--official .mhb-single-content figure:first-of-type {
	width:100%!important;
	max-width:none!important;
	margin:0 0 1.25rem!important;
	overflow:hidden;
	background:#edf1e5;
	border-radius:12px;
}
.mhb-community-preview-article.mhb-publication-detail--official .mhb-single-content figure:first-of-type img {
	display:block!important;
	width:100%!important;
	max-width:none!important;
	height:auto!important;
	max-height:560px!important;
	margin:0!important;
	aspect-ratio:16 / 10!important;
	object-fit:cover!important;
	border-radius:12px 12px 0 0;
}
