/*
Theme Name: Northline Journal
Author: Calder Finch Studio
Description: A polished mobile-first classic WordPress theme with flexible homepage content, latest-post grids, clean single posts, and no hardcoded categories.
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: mpt-theme
*/

:root {
	--mpt-ink: #191718;
	--mpt-ink-soft: #2d292a;
	--mpt-paper: #f5f1eb;
	--mpt-card: #ffffff;
	--mpt-muted: #756e69;
	--mpt-line: #e3d9d0;
	--mpt-red: #e51c32;
	--mpt-red-dark: #b91526;
	--mpt-red-soft: #ffe5e9;
	--mpt-shadow: 0 18px 46px rgba(25, 23, 24, 0.12);
	--mpt-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--mpt-display: "Arial Narrow", "Roboto Condensed", Impact, var(--mpt-font);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--mpt-paper);
	color: var(--mpt-ink);
	font-family: var(--mpt-font);
	font-size: 16px;
	line-height: 1.65;
	text-rendering: optimizeLegibility;
}

img,
svg,
video,
iframe {
	display: block;
	max-width: 100%;
}

img,
video {
	height: auto;
}

a {
	color: inherit;
	text-decoration: none;
}

a:hover,
a:focus-visible {
	color: var(--mpt-red);
}

button,
input,
textarea,
select {
	font: inherit;
}

.mpt-screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.mpt-screen-reader-text:focus,
.mpt-skip-link:focus {
	z-index: 1000;
	top: 12px;
	left: 12px;
	width: auto;
	height: auto;
	padding: 10px 14px;
	clip: auto;
	background: var(--mpt-card);
	color: var(--mpt-ink);
	border: 2px solid var(--mpt-red);
	border-radius: 6px;
}

.mpt-shell {
	width: min(1120px, calc(100% - 32px));
	margin: 0 auto;
}

.mpt-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background: rgba(255, 255, 255, 0.96);
	border-bottom: 1px solid rgba(25, 23, 24, 0.08);
	backdrop-filter: blur(14px);
}

.mpt-topline {
	background: var(--mpt-ink);
	color: rgba(255, 255, 255, 0.76);
	font-size: 0.72rem;
	font-weight: 800;
	text-transform: uppercase;
}

.mpt-topline-inner {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	min-height: 34px;
	padding: 8px 0;
}

.mpt-topline-inner span {
	overflow-wrap: anywhere;
}

.mpt-topline-inner span:last-child {
	display: none;
	white-space: nowrap;
}

.mpt-header-inner {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 16px;
	min-height: 76px;
}

.mpt-brand {
	min-width: 0;
}

.mpt-logo-link,
.mpt-site-title {
	display: inline-flex;
	align-items: center;
	color: var(--mpt-ink);
	font-family: var(--mpt-display);
	font-size: 1.45rem;
	font-weight: 900;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0;
}

.mpt-site-title::before {
	content: "";
	display: inline-block;
	width: 13px;
	height: 13px;
	margin-right: 9px;
	background: var(--mpt-red);
	transform: skew(-12deg);
}

.mpt-logo-image {
	max-width: 210px;
	max-height: 58px;
	object-fit: contain;
}

.mpt-tagline {
	display: none;
	margin: 6px 0 0;
	color: var(--mpt-muted);
	font-size: 0.78rem;
	line-height: 1.25;
}

.mpt-nav-toggle {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 0;
	background: var(--mpt-ink);
	border: 0;
	border-radius: 6px;
	cursor: pointer;
}

.mpt-nav-toggle-line {
	display: block;
	width: 20px;
	height: 2px;
	margin: 0 auto;
	background: #ffffff;
	border-radius: 20px;
}

.mpt-navigation {
	display: none;
	grid-column: 1 / -1;
	width: 100%;
	padding: 8px 0 18px;
}

.mpt-navigation[data-open="true"] {
	display: block;
}

.mpt-nav-list,
.mpt-footer-list {
	display: flex;
	flex-direction: column;
	gap: 5px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.mpt-nav-item {
	position: relative;
}

.mpt-nav-link {
	display: flex;
	align-items: center;
	min-height: 42px;
	padding: 8px 0;
	color: var(--mpt-ink);
	font-size: 0.82rem;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 0;
}

.mpt-nav-active > .mpt-nav-link {
	color: var(--mpt-red);
}

.mpt-submenu {
	display: grid;
	gap: 4px;
	padding: 4px 0 8px 18px;
	margin: 0;
	list-style: none;
}

.mpt-button,
.mpt-pagination a,
.mpt-search-form button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 18px;
	background: var(--mpt-red);
	color: #ffffff;
	border: 0;
	border-radius: 5px;
	font-size: 0.78rem;
	font-weight: 900;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0;
	cursor: pointer;
	transition: background 160ms ease, transform 160ms ease;
}

.mpt-button:hover,
.mpt-button:focus-visible,
.mpt-pagination a:hover,
.mpt-pagination a:focus-visible,
.mpt-search-form button:hover,
.mpt-search-form button:focus-visible {
	background: var(--mpt-red-dark);
	color: #ffffff;
	transform: translateY(-1px);
}

.mpt-button-dark {
	background: var(--mpt-ink);
}

.mpt-button-dark:hover,
.mpt-button-dark:focus-visible {
	background: var(--mpt-ink-soft);
}

.mpt-main {
	min-height: 62vh;
}

.mpt-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background:
		linear-gradient(90deg, rgba(25, 23, 24, 0.96), rgba(25, 23, 24, 0.74), rgba(25, 23, 24, 0.38)),
		var(--mpt-hero-image, linear-gradient(135deg, #201c1d, #5a3337));
	background-position: center;
	background-size: cover;
	color: #ffffff;
}

.mpt-hero::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: -1;
	height: 178px;
	background: var(--mpt-red);
}

.mpt-hero-inner {
	display: flex;
	align-items: flex-end;
	min-height: 500px;
	padding: 86px 0 116px;
}

.mpt-hero-copy {
	width: min(620px, 100%);
}

.mpt-eyebrow {
	margin: 0 0 10px;
	color: var(--mpt-red);
	font-size: 0.68rem;
	font-weight: 900;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: 0;
}

.mpt-hero-title,
.mpt-section-title,
.mpt-page-title,
.mpt-article-title,
.mpt-empty-title {
	margin: 0;
	font-family: var(--mpt-display);
	font-weight: 900;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0;
}

.mpt-hero-title {
	max-width: 620px;
	color: #ffffff;
	font-size: 2.25rem;
	line-height: 1.02;
}

.mpt-hero-summary {
	max-width: 520px;
	margin: 14px 0 22px;
	color: rgba(255, 255, 255, 0.86);
	font-size: 0.95rem;
	line-height: 1.58;
}

.mpt-quick-wrap {
	position: relative;
	margin-top: -84px;
	padding-bottom: 44px;
}

.mpt-quick-panel {
	display: grid;
	gap: 20px;
	padding: 22px;
	background: var(--mpt-ink);
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 8px;
	box-shadow: 0 24px 60px rgba(25, 23, 24, 0.2);
}

.mpt-quick-copy {
	display: grid;
	gap: 8px;
}

.mpt-quick-kicker {
	margin: 0;
	color: var(--mpt-red);
	font-size: 0.72rem;
	font-weight: 900;
	text-transform: uppercase;
}

.mpt-quick-title {
	margin: 0;
	font-family: var(--mpt-display);
	font-size: 1.8rem;
	font-weight: 900;
	line-height: 1;
	text-transform: uppercase;
}

.mpt-quick-text {
	margin: 0;
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.95rem;
	line-height: 1.55;
}

.mpt-quick-panel .mpt-search-form {
	align-content: center;
}

.mpt-quick-panel .mpt-search-field {
	background: var(--mpt-ink-soft);
	border-color: rgba(255, 255, 255, 0.12);
	color: #ffffff;
}

.mpt-quick-panel .mpt-search-field::placeholder {
	color: rgba(255, 255, 255, 0.48);
}

.mpt-posts-section {
	padding: 64px 0 56px;
	background: var(--mpt-paper);
}

.mpt-section-heading {
	display: flex;
	flex-direction: column;
	margin-bottom: 24px;
}

.mpt-section-title {
	font-size: 2.15rem;
}

.mpt-posts-grid {
	display: grid;
	gap: 18px;
}

.mpt-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	min-width: 0;
	background: var(--mpt-card);
	border: 1px solid var(--mpt-line);
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(25, 23, 24, 0.06);
}

.mpt-card-media {
	display: grid;
	place-items: center;
	aspect-ratio: 16 / 11;
	overflow: hidden;
	background: var(--mpt-ink);
	color: #ffffff;
}

.mpt-card-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 220ms ease;
}

.mpt-card:hover .mpt-card-image {
	transform: scale(1.04);
}

.mpt-card-placeholder {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background:
		linear-gradient(135deg, rgba(229, 28, 50, 0.88), rgba(25, 23, 24, 0.96)),
		var(--mpt-ink);
	font-family: var(--mpt-display);
	font-size: 3.4rem;
	font-weight: 900;
	line-height: 1;
}

.mpt-card-body {
	display: grid;
	gap: 12px;
	padding: 20px;
}

.mpt-card-meta,
.mpt-article-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	color: var(--mpt-muted);
	font-size: 0.76rem;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 0;
}

.mpt-meta-link {
	color: var(--mpt-red);
}

.mpt-meta-separator {
	color: var(--mpt-line);
}

.mpt-card-title {
	margin: 0;
	font-size: 1.28rem;
	line-height: 1.18;
}

.mpt-card-title-link {
	color: var(--mpt-ink);
}

.mpt-card-excerpt {
	color: var(--mpt-muted);
	font-size: 0.96rem;
	line-height: 1.65;
}

.mpt-card-excerpt p {
	margin: 0;
}

.mpt-home-content-section {
	padding: 0 0 72px;
	background: var(--mpt-paper);
}

.mpt-home-content {
	overflow: hidden;
	background: var(--mpt-card);
	border: 1px solid var(--mpt-line);
	border-radius: 8px;
	box-shadow: var(--mpt-shadow);
}

.mpt-home-content .mpt-entry-content {
	width: 100%;
	max-width: none;
	padding: 24px;
	color: var(--mpt-ink-soft);
}

.mpt-home-content .mpt-entry-content > * {
	max-width: 920px;
	margin-right: auto;
	margin-left: auto;
}

.mpt-home-content .mpt-entry-content > * + * {
	margin-top: 1.2rem;
}

.mpt-home-content .mpt-entry-content :where(.alignfull, .alignwide, [class*="alignfull"], [class*="alignwide"]) {
	width: 100% !important;
	max-width: 100% !important;
	margin-right: 0 !important;
	margin-left: 0 !important;
}

.mpt-home-content .mpt-entry-content :where(section, article, div, figure, img, iframe, video) {
	max-width: 100% !important;
}

.mpt-home-content .mpt-entry-content :where([style*="width"], [style*="WIDTH"]) {
	max-width: 100% !important;
}

.mpt-home-content .mpt-entry-content :where([style*="margin-left"], [style*="MARGIN-LEFT"]) {
	margin-right: auto !important;
	margin-left: auto !important;
}

.mpt-home-content .mpt-entry-content :where([style*="min-height"], [style*="MIN-HEIGHT"]) {
	min-height: 0 !important;
}

.mpt-home-content .mpt-entry-content :where(section, .wp-block-group, .wp-block-cover) {
	width: 100% !important;
	min-height: 0 !important;
	margin-right: auto !important;
	margin-left: auto !important;
	padding: 24px !important;
	border-radius: 8px;
}

.mpt-home-content .mpt-entry-content img {
	width: auto;
	max-height: 420px;
	margin-right: auto;
	margin-left: auto;
	object-fit: contain;
}

.mpt-home-content .mpt-entry-content h1,
.mpt-home-content .mpt-entry-content h2,
.mpt-home-content .mpt-entry-content h3 {
	color: var(--mpt-ink);
	font-family: var(--mpt-display);
	font-weight: 900;
	line-height: 1.05;
	text-transform: uppercase;
	letter-spacing: 0;
}

.mpt-home-content .mpt-entry-content h1 {
	font-size: 2.3rem !important;
}

.mpt-home-content .mpt-entry-content h2 {
	font-size: 2rem !important;
}

.mpt-home-content .mpt-entry-content h3 {
	font-size: 1.55rem !important;
}

.mpt-page-header,
.mpt-not-found {
	padding: 56px 0;
	background: var(--mpt-ink);
	color: #ffffff;
}

.mpt-page-title {
	max-width: 900px;
	font-size: 2.4rem;
}

.mpt-page-description {
	max-width: 680px;
	margin-top: 18px;
	color: rgba(255, 255, 255, 0.76);
}

.mpt-article {
	width: min(80vw, 920px);
	margin: 0 auto;
	padding: 56px 0 76px;
}

.mpt-article-header {
	display: grid;
	gap: 18px;
	margin-bottom: 34px;
	padding-bottom: 28px;
	border-bottom: 1px solid var(--mpt-line);
}

.mpt-article-title {
	font-size: 2.45rem;
}

.mpt-article-excerpt {
	max-width: 760px;
	color: var(--mpt-muted);
	font-size: 1.06rem;
	line-height: 1.7;
}

.mpt-article-excerpt p {
	margin: 0;
}

.mpt-entry-content {
	color: var(--mpt-ink-soft);
	font-size: 1.04rem;
}

.mpt-entry-content > * {
	margin-top: 0;
	margin-bottom: 0;
}

.mpt-entry-content > * + * {
	margin-top: 1.35em;
}

.mpt-entry-content :where(h2, h3, h4, h5, h6) {
	margin-top: 1.8em;
	color: var(--mpt-ink);
	font-family: var(--mpt-display);
	font-weight: 900;
	line-height: 1.08;
	text-transform: uppercase;
	letter-spacing: 0;
}

.mpt-entry-content h2 {
	font-size: 2rem;
}

.mpt-entry-content h3 {
	font-size: 1.55rem;
}

.mpt-entry-content a {
	color: var(--mpt-red);
	font-weight: 800;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.18em;
}

.mpt-entry-content blockquote {
	padding: 18px 0 18px 22px;
	border-left: 5px solid var(--mpt-red);
	color: var(--mpt-ink);
	font-size: 1.12rem;
	font-weight: 700;
}

.mpt-entry-content figure {
	margin-right: 0;
	margin-left: 0;
}

.mpt-entry-content img {
	border-radius: 8px;
}

.mpt-entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.mpt-entry-content th,
.mpt-entry-content td {
	padding: 12px;
	border: 1px solid var(--mpt-line);
	text-align: left;
}

.mpt-entry-content pre {
	overflow-x: auto;
	padding: 18px;
	background: var(--mpt-ink);
	color: #ffffff;
	border-radius: 8px;
}

.mpt-page-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 28px;
}

.mpt-page-links a,
.mpt-page-links span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 40px;
	padding: 0 12px;
	background: var(--mpt-card);
	border: 1px solid var(--mpt-line);
	border-radius: 5px;
}

.mpt-article-footer {
	display: grid;
	gap: 10px;
	margin-top: 38px;
	padding-top: 24px;
	border-top: 1px solid var(--mpt-line);
}

.mpt-tags-label {
	color: var(--mpt-muted);
	font-size: 0.78rem;
	font-weight: 900;
	text-transform: uppercase;
}

.mpt-tags-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.mpt-tags-list a {
	display: inline-flex;
	padding: 7px 10px;
	background: var(--mpt-red-soft);
	color: var(--mpt-red-dark);
	border-radius: 5px;
	font-size: 0.82rem;
	font-weight: 800;
}

.mpt-post-nav {
	display: grid;
	gap: 14px;
	margin-top: 42px;
}

.mpt-post-nav a {
	display: grid;
	gap: 6px;
	padding: 18px;
	background: var(--mpt-card);
	border: 1px solid var(--mpt-line);
	border-radius: 8px;
}

.mpt-post-nav-label {
	color: var(--mpt-red);
	font-size: 0.72rem;
	font-weight: 900;
	text-transform: uppercase;
}

.mpt-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: space-between;
	margin-top: 30px;
}

.mpt-empty {
	display: grid;
	gap: 18px;
	max-width: 680px;
	padding: 30px;
	background: var(--mpt-card);
	border: 1px solid var(--mpt-line);
	border-radius: 8px;
}

.mpt-empty-title {
	font-size: 2.1rem;
}

.mpt-empty-text {
	margin: 0;
	color: var(--mpt-muted);
}

.mpt-search-form {
	display: grid;
	gap: 10px;
}

.mpt-search-field {
	width: 100%;
	min-height: 48px;
	padding: 0 14px;
	background: var(--mpt-paper);
	border: 1px solid var(--mpt-line);
	border-radius: 5px;
	color: var(--mpt-ink);
}

.mpt-search-field:focus {
	outline: 2px solid var(--mpt-red);
	outline-offset: 2px;
}

.mpt-footer {
	padding: 44px 0 24px;
	background: var(--mpt-ink);
	color: #ffffff;
}

.mpt-footer-top {
	display: grid;
	gap: 28px;
}

.mpt-footer-brand {
	display: grid;
	gap: 14px;
	max-width: 460px;
}

.mpt-footer .mpt-site-title,
.mpt-footer .mpt-logo-link {
	color: #ffffff;
}

.mpt-footer-note {
	margin: 0;
	color: rgba(255, 255, 255, 0.68);
}

.mpt-footer-list {
	gap: 8px;
}

.mpt-footer-list .mpt-nav-link {
	min-height: auto;
	padding: 0;
	color: rgba(255, 255, 255, 0.82);
}

.mpt-footer-bottom {
	margin-top: 34px;
	padding-top: 18px;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	color: rgba(255, 255, 255, 0.58);
	font-size: 0.88rem;
}

.mpt-footer-bottom p {
	margin: 0;
}

@media (min-width: 700px) {
	.mpt-topline-inner span:last-child {
		display: inline;
	}

	.mpt-hero-title {
		font-size: 3.1rem;
	}

	.mpt-section-title {
		font-size: 3.15rem;
	}

	.mpt-page-title,
	.mpt-article-title {
		font-size: 3.55rem;
	}

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

	.mpt-quick-panel {
		grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
		align-items: center;
		padding: 28px;
	}

	.mpt-home-content .mpt-entry-content {
		padding: 34px;
	}

	.mpt-search-form {
		grid-template-columns: 1fr auto;
	}

	.mpt-post-nav {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.mpt-post-nav-next {
		text-align: right;
	}

	.mpt-footer-top {
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: start;
	}
}

@media (min-width: 900px) {
	.mpt-header-inner {
		grid-template-columns: minmax(210px, auto) 1fr;
		min-height: 86px;
	}

	.mpt-tagline {
		display: block;
	}

	.mpt-nav-toggle {
		display: none;
	}

	.mpt-navigation {
		display: block;
		grid-column: auto;
		width: auto;
		padding: 0;
		justify-self: end;
	}

	.mpt-nav-list {
		flex-direction: row;
		align-items: center;
		gap: 24px;
	}

	.mpt-nav-link {
		min-height: 86px;
		padding: 0;
	}

	.mpt-submenu {
		position: absolute;
		top: calc(100% - 10px);
		left: -16px;
		display: none;
		min-width: 210px;
		padding: 10px;
		background: #ffffff;
		border: 1px solid var(--mpt-line);
		border-radius: 8px;
		box-shadow: var(--mpt-shadow);
	}

	.mpt-nav-item:hover > .mpt-submenu,
	.mpt-nav-item:focus-within > .mpt-submenu {
		display: grid;
	}

	.mpt-nav-link-child {
		min-height: 38px;
	}

	.mpt-hero-inner {
		min-height: 620px;
		padding-top: 108px;
		padding-bottom: 132px;
	}

	.mpt-hero-title {
		font-size: 3.65rem;
	}

	.mpt-section-title {
		font-size: 4.15rem;
	}

	.mpt-quick-title {
		font-size: 2.25rem;
	}

	.mpt-page-title,
	.mpt-article-title {
		font-size: 4.55rem;
	}

	.mpt-posts-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 22px;
	}

	.mpt-card:first-child {
		grid-column: span 2;
	}

	.mpt-card:first-child .mpt-card-media {
		aspect-ratio: 16 / 9;
	}

	.mpt-card-placeholder {
		font-size: 5rem;
	}

	.mpt-home-content .mpt-entry-content {
		padding: 42px;
	}

	.mpt-entry-content h2 {
		font-size: 3rem;
	}

	.mpt-entry-content h3 {
		font-size: 2.1rem;
	}
}

@media (max-width: 420px) {
	.mpt-shell {
		width: min(1120px, calc(100% - 24px));
	}

	.mpt-hero-title {
		font-size: 2rem;
	}

	.mpt-card-body,
	.mpt-empty,
	.mpt-home-content .mpt-entry-content {
		padding: 18px;
	}

	.mpt-article {
		width: min(80vw, calc(100% - 24px));
	}
}
