/* NOTE: no CSS custom properties - Jetpack's CSS processor strips :root
   definitions while keeping var() references, which breaks every colour. */
/* ================= layout / typography (colour-free) ================= */
.entry-content p,
.entry-content li {
	text-align: justify;
	-webkit-hyphens: auto;
	hyphens: auto;
}

.entry-content p.no-justify,
.entry-content p:has(br) {
	text-align: left !important;
	-webkit-hyphens: none;
	hyphens: none;
}

.entry-content a {
	text-underline-offset: 3px;
}

.entry-content h2 {
	font-size: 2.1rem !important;
	font-weight: 600 !important;
	margin-top: 3.25rem !important;
	margin-bottom: 1rem !important;
}

.entry-content h3 {
	font-size: 1.45rem !important;
	font-weight: 600 !important;
	margin-top: 2.4rem !important;
	margin-bottom: .7rem !important;
}

.entry-content ul {
	margin-top: .7rem !important;
}

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

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

.entry-content h1, .entry-content h2, .entry-content h3,
.entry-title, .page-title, .site-title {
	text-align: left;
	-webkit-hyphens: none;
	hyphens: none;
	overflow-wrap: normal;
	word-break: normal;
}

.site-title {
	text-transform: none !important;
	letter-spacing: 0 !important;
	line-height: 1.25 !important;
	max-width: 19ch;
}

.site-title a {
	text-decoration: none !important;
}

.site-branding {
	min-width: 0;
}

.jump-list {
	line-height: 2.1;
}

.jump-list a {
	text-decoration: none !important;
}

.jump-list a:hover, .jump-list a:focus {
	text-decoration: underline !important;
}

.matters-grid {
	display: block;
}

.matters-grid > .wp-block-group__inner-container,
.matters-grid:not(:has(> .wp-block-group__inner-container)) {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	align-items: start;
	max-width: none !important;
	width: 100%;
}

.matters-grid .matter-box {
	max-width: none !important;
	margin: 0 !important;
	width: auto !important;
}

.matter-box {
	border-width: 1px;
	border-style: solid;
	border-radius: 6px;
	scroll-margin-top: 1.5rem;
	transition: border-color .15s ease, background-color .15s ease;
}

.matter-box > summary {
	cursor: pointer;
	list-style: none;
	padding: 15px 18px;
	font-size: 1.1rem;
	font-weight: 600;
	line-height: 1.3;
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
}

.matter-box > summary::-webkit-details-marker {
	display: none;
}

.matter-box > summary::after {
	content: "+";
	font-weight: 400;
	opacity: .55;
}

.matter-box[open] > summary::after {
	content: "\2212";
}

.matter-box[open] > summary {
	border-bottom-width: 1px;
	border-bottom-style: solid;
}

.matters-grid .matter-box[open] {
	grid-column: 1 / -1;
}

.matter-box > ul {
	margin: 14px 20px 18px 40px !important;
	max-width: 54ch;
}

/* ================= LIGHT MODE colours (default) ================= */
.entry-content a {
	color: #1B4F8A;
}

.entry-content a:hover, .entry-content a:focus {
	color: #0F3562;
}

.jump-list a {
	color: #4A5568 !important;
}

.jump-list a:hover, .jump-list a:focus {
	color: #1B4F8A !important;
}

.matter-box {
	border-color: rgba(0,0,0,.18);
	background-color: rgba(0,0,0,.030);
}

.matter-box:hover {
	border-color: rgba(0,0,0,.36);
	background-color: rgba(0,0,0,.055);
}

.matter-box[open] > summary {
	border-bottom-color: rgba(0,0,0,.14);
}

/* ================= DARK MODE colours ================= */
body.is-dark-theme, body.is-dark-theme .entry-content, body.is-dark-theme .entry-content p, body.is-dark-theme .entry-content li {
	color: #D6DAE1;
}

body.is-dark-theme .entry-content a {
	color: #9FC3E8;
}

body.is-dark-theme .entry-content a:hover, body.is-dark-theme .entry-content a:focus {
	color: #C8DEF7;
}

body.is-dark-theme .jump-list a {
	color: #A7AEBB !important;
}

body.is-dark-theme .jump-list a:hover, body.is-dark-theme .jump-list a:focus {
	color: #9FC3E8 !important;
}

body.is-dark-theme .matter-box {
	border-color: rgba(255,255,255,.16);
	background-color: rgba(255,255,255,.035);
}

body.is-dark-theme .matter-box:hover {
	border-color: rgba(255,255,255,.32);
	background-color: rgba(255,255,255,.060);
}

body.is-dark-theme .matter-box[open] > summary {
	border-bottom-color: rgba(255,255,255,.12);
}

/* ================= phone ================= */
@media (max-width: 781px) {
	.matters-grid > .wp-block-group__inner-container,
			  .matters-grid:not(:has(> .wp-block-group__inner-container)) {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 600px) {
	.jump-list {
		display: none !important;
	}
	
	.entry-title, .page-title {
		font-size: 2.1rem !important;
		line-height: 1.2 !important;
	}
	
	.entry-content h2 {
		font-size: 1.55rem !important;
	}
	
	.entry-content h3 {
		font-size: 1.2rem !important;
	}
	
	.site-title {
		font-size: 1.15rem !important;
		max-width: none;
	}
	
	.entry-content p, .entry-content li {
		font-size: 1.05rem !important;
		line-height: 1.6 !important;
	}
	
	.matter-box > summary {
		font-size: 1.02rem;
		padding: 13px 15px;
	}
	
	.matter-box > ul {
		margin: 12px 15px 15px 32px !important;
		max-width: none;
	}
	
	.wp-block-separator {
		margin-top: 1.6rem !important;
		margin-bottom: 1.6rem !important;
	}
	
	.entry-header, .entry-content > :first-child {
		margin-top: 0 !important;
	}
}

/* ================= desktop: wider reading column (theme default is 610px) ================= */
@media (min-width: 822px) {
	.default-max-width,
			.entry-header,
			.page-header,
			.entry-content > :not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.matters-grid) {
		max-width: 940px !important;
	}
	
	.entry-content > .matters-grid {
		max-width: 1100px !important;
	}
	
	.matter-box > ul {
		max-width: none;
	}
}

/* AH monogram logo (added 20 Nov 2026) */
.site-header .site-logo { text-align: left; border-bottom: 0; padding-bottom: 0; margin-bottom: 12px; }
.site-header .site-logo .custom-logo { width: 72px; height: 72px; max-width: 72px; max-height: 72px; }
body.is-dark-theme .site-header .site-logo .custom-logo { filter: brightness(0) invert(0.94); }
