/*
Theme Name: Evopress
Theme URI: https://example.com/evopress
Author: Rune Hellem
Description: Classic multi-blog WordPress theme with blog-scoped navigation, calendar-driven archives, and configurable default blog selection, inspired by b2evolution.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: evopress
*/

:root {
	--evopress-paper: #f7f3ea;
	--evopress-surface: #fffdf8;
	--evopress-ink: #2f2a22;
	--evopress-muted: #696154;
	--evopress-border: #d4ccbe;
	--evopress-border-strong: #b8ae9f;
	--evopress-link: #294f62;
	--evopress-link-hover: #1f3f4d;
	--evopress-focus: #8f5d19;
	--evopress-shadow: 0 10px 28px rgba(43, 35, 24, 0.08);
	--evopress-content-width: 1040px;
	--evopress-sidebar-width: 300px;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
	line-height: 1.66;
	background:
		radial-gradient(circle at 0% 0%, rgba(212, 188, 140, 0.12), transparent 34%),
		radial-gradient(circle at 100% 100%, rgba(85, 123, 140, 0.1), transparent 30%),
		var(--evopress-paper);
	color: var(--evopress-ink);
	font-size: 17px;
}

a {
	color: var(--evopress-link);
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
	transition: color 0.18s ease;
}

a:hover {
	color: var(--evopress-link-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
	outline: 2px solid var(--evopress-focus);
	outline-offset: 2px;
}

.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;
}

.site-header,
.site-content {
	max-width: var(--evopress-content-width);
	margin: 0 auto;
	padding: 1.15rem;
}

.site-header {
	padding-bottom: 0;
}

.header-wrapper {
	background: var(--evopress-surface);
	border: 1px solid var(--evopress-border);
	box-shadow: var(--evopress-shadow);
	border-radius: 14px 14px 0 0;
	overflow: hidden;
}

.header-nav-region {
	padding: 0.72rem 1rem;
	border-bottom: 1px solid var(--evopress-border);
	background: linear-gradient(180deg, #f4ecdf 0%, #f9f5ed 100%);
	display: flex;
	gap: 0.8rem;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
}

.blog-menu ul,
.auth-menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 0.42rem;
	flex-wrap: wrap;
	align-items: center;
}

.blog-menu a,
.auth-menu a {
	font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, sans-serif;
	font-size: 0.8rem;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	text-decoration: none;
	display: inline-block;
	padding: 0.34rem 0.62rem;
	color: #3c352b;
	border: 1px solid #c8bfae;
	border-radius: 999px;
	background: #fffdf9;
}

.blog-menu a:hover,
.auth-menu a:hover {
	border-color: #9a8f7c;
	background: #f6efe4;
	text-decoration: none;
}

.blog-menu .is-current a {
	background: #2f4f5f;
	border-color: #2f4f5f;
	color: #f8f6ef;
	font-weight: 700;
}

.auth-menu .logged-in-as {
	font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, sans-serif;
	font-size: 0.76rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--evopress-muted);
	padding-right: 0.35rem;
}

.header-identity-region {
	padding: 1.25rem 1.25rem 1rem;
	border-bottom: 1px solid var(--evopress-border);
	background: linear-gradient(180deg, #fffdf9 0%, #faf5eb 100%);
}

.site-title {
	margin: 0;
	font-family: "Trebuchet MS", "Lucida Grande", Verdana, sans-serif;
	font-size: clamp(1.6rem, 1.3rem + 1.1vw, 2.2rem);
	line-height: 1.12;
	letter-spacing: 0.01em;
}

.site-title a {
	text-decoration: none;
	color: #2c261f;
}

.site-title a:hover {
	text-decoration: underline;
}

.header-context {
	margin: 0.28rem 0 0;
	font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, sans-serif;
	font-size: 0.82rem;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: #706758;
}

.site-tagline {
	margin: 0.32rem 0 0;
	font-size: 0.96rem;
	font-style: italic;
	color: #807767;
}

.header-media-region {
	min-height: 196px;
	background: #4f5f62;
	position: relative;
	border-top: 1px solid rgba(255, 255, 255, 0.55);
}

.blog-hero {
	min-height: 196px;
	background-size: cover;
	background-position: center;
	position: relative;
	display: flex;
	align-items: flex-end;
}

.blog-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(32, 29, 24, 0.1) 0%, rgba(32, 29, 24, 0.58) 80%, rgba(32, 29, 24, 0.76) 100%),
		repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.055) 0, rgba(255, 255, 255, 0.055) 9px, transparent 9px, transparent 18px);
}

.blog-hero-overlay {
	position: relative;
	z-index: 1;
	padding: 1.08rem 1.25rem;
	color: #fff;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.44);
}

.blog-hero-kicker {
	margin: 0 0 0.22rem;
	font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, sans-serif;
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	opacity: 0.9;
}

.blog-hero-title {
	margin: 0;
	font-size: clamp(1.34rem, 1.08rem + 1.2vw, 2rem);
	line-height: 1.18;
	font-weight: 700;
	max-width: 34ch;
}

.site-content {
	padding-top: 0;
}

.layout-shell {
	background: var(--evopress-surface);
	border: 1px solid var(--evopress-border);
	border-top: none;
	border-radius: 0 0 14px 14px;
	box-shadow: var(--evopress-shadow);
	padding: 1.4rem;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(250px, var(--evopress-sidebar-width));
	gap: 1.55rem;
	align-items: start;
}

.content-column {
	min-width: 0;
	display: grid;
	gap: 1rem;
}

.content-column > h2,
.archive-page-header h2,
#post-heading {
	margin: 0;
	font-family: "Trebuchet MS", "Lucida Grande", Verdana, sans-serif;
	font-weight: 700;
	line-height: 1.22;
	font-size: clamp(1.26rem, 1.1rem + 0.74vw, 1.65rem);
	color: #2f2a22;
	padding-bottom: 0.55rem;
	border-bottom: 1px solid #dfd6c7;
}

.post-listing,
.archive-post-stream {
	display: grid;
	gap: 1.08rem;
}

.post-card {
	background: linear-gradient(180deg, #fffef9 0%, #fcf8ef 100%);
	border: 1px solid #e0d7ca;
	border-radius: 10px;
	padding: 1.05rem 1.15rem;
	box-shadow: 0 1px 0 rgba(94, 77, 54, 0.06);
}

.post-card h3,
.post-title {
	margin: 0;
	font-family: "Trebuchet MS", "Lucida Grande", Verdana, sans-serif;
	font-size: clamp(1.12rem, 1.03rem + 0.45vw, 1.38rem);
	line-height: 1.3;
}

.post-card h3 a {
	text-decoration: none;
	color: #2d291f;
}

.post-card h3 a:hover {
	text-decoration: underline;
}

.entry-meta,
.post-meta {
	margin: 0.42rem 0 0.88rem;
	font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, sans-serif;
	font-size: 0.79rem;
	letter-spacing: 0.035em;
	text-transform: uppercase;
	color: #726956;
	display: flex;
	gap: 0.45rem;
	flex-wrap: wrap;
	align-items: center;
}

.entry-date,
.entry-categories a {
	color: inherit;
	text-decoration: none;
}

.entry-date:hover,
.entry-categories a:hover {
	text-decoration: underline;
}

.entry-categories::before {
	content: "|";
	color: #a49b8b;
	margin-right: 0.45rem;
}

.entry-private-indicator {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.45rem;
	height: 1.45rem;
	border: 1px solid #d6cbbe;
	border-radius: 999px;
	background: #f4eee3;
	color: #7a6f5e;
	font-size: 0.8rem;
	line-height: 1;
}

.entry-content,
.post-content {
	font-size: 1.03rem;
	line-height: 1.75;
	color: #302a22;
}

.entry-content > :first-child,
.post-content > :first-child {
	margin-top: 0;
}

.entry-content > :last-child,
.post-content > :last-child {
	margin-bottom: 0;
}

.entry-content img,
.post-content img {
	max-width: 100%;
	height: auto;
	border: 1px solid #d8cfbf;
	border-radius: 6px;
	padding: 2px;
	background: #fff;
}

.post-navigation,
.posts-navigation {
	font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, sans-serif;
	font-size: 0.88rem;
	margin-top: 0.3rem;
}

.post-navigation .nav-links,
.posts-navigation .nav-links {
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	padding-top: 0.25rem;
	border-top: 1px solid #e0d8ca;
	flex-wrap: wrap;
}

.archive-content {
	display: grid;
	gap: 1rem;
}

.archive-page-header {
	border-bottom: 1px solid #ddd3c2;
	padding-bottom: 0.58rem;
}

.archive-page-description {
	margin: 0.35rem 0 0;
	color: #6f6658;
	font-size: 0.95rem;
}

.archive-overview {
	border: 1px solid #d7cdbd;
	background: linear-gradient(180deg, #fdf9f1 0%, #f6efe4 100%);
	padding: 0.86rem;
	border-radius: 8px;
}

.evopress-archive-nav ul,
.evopress-category-tree ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.archive-list-root,
.category-branch-root {
	display: grid;
	gap: 0.46rem;
}

.archive-entry,
.category-entry {
	display: inline-flex;
	align-items: baseline;
	gap: 0.34rem;
	min-width: 0;
	line-height: 1.35;
}

.archive-list-months,
.category-item > .category-branch {
	display: grid;
	gap: 0.1rem;
	margin-top: 0.2rem;
	margin-left: 0.34rem;
	padding-left: 0.84rem;
	border-left: 1px solid #e4dbcb;
}

.archive-link,
.category-link {
	text-decoration: none;
	color: #3c3529;
}

.archive-link:hover,
.category-link:hover {
	text-decoration: underline;
}

.archive-link-year {
	font-family: "Trebuchet MS", "Lucida Grande", Verdana, sans-serif;
	font-weight: 700;
	font-size: 0.95rem;
}

.archive-link-month,
.category-item > .category-entry {
	font-size: 0.92rem;
}

.archive-year.is-current-year > .archive-entry,
.archive-month.is-current-month > .archive-entry,
.category-item.is-current > .category-entry,
.category-item.is-active-path > .category-entry,
.blog-root > .category-entry {
	background: #ebe2d1;
	border-radius: 5px;
	padding: 0.16rem 0.3rem;
}

.archive-month.is-current-month > .archive-entry,
.category-item.is-current > .category-entry {
	background: #dfd2bb;
}

.blog-root > .category-entry {
	font-family: "Trebuchet MS", "Lucida Grande", Verdana, sans-serif;
	font-weight: 700;
}

.evopress-count {
	color: #8a7f6c;
	font-size: 0.83em;
	white-space: nowrap;
}

.sidebar-column {
	min-width: 0;
	display: grid;
	gap: 0.92rem;
	padding-left: 0.95rem;
	border-left: 1px solid #ddd2c3;
}

.sidebar-block {
	border: 1px solid var(--evopress-border);
	border-radius: 8px;
	padding: 0.78rem;
	background: linear-gradient(180deg, #fffdf7 0%, #f7f0e4 100%);
}

.sidebar-block h2 {
	margin: 0 0 0.52rem;
	font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, sans-serif;
	font-size: 0.79rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #5f5547;
	padding-bottom: 0.3rem;
	border-bottom: 1px solid #e3d9ca;
}

.sidebar-block p {
	margin: 0;
	font-size: 0.91rem;
	color: #4c4538;
}

.evopress-sidebar-search-form {
	display: block;
}

.evopress-sidebar-search-input {
	width: 100%;
	border: 1px solid #c8bdab;
	border-radius: 999px;
	background: #fffdf8;
	color: #3d362c;
	font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, sans-serif;
	font-size: 0.82rem;
	line-height: 1.2;
	padding: 0.52rem 0.78rem;
}

.evopress-sidebar-search-input::placeholder {
	color: #7f7564;
	opacity: 1;
}

.evopress-sidebar-search-input:hover {
	border-color: #a89a84;
}

.evopress-sidebar-search-input:focus {
	border-color: #9b8a71;
	background: #fff;
}

.evopress-calendar {
	display: grid;
	gap: 0.44rem;
}

.evopress-calendar-nav {
	display: grid;
	grid-template-columns: auto auto 1fr auto auto;
	gap: 0.18rem;
	align-items: center;
}

.calendar-month-label {
	text-align: center;
	text-decoration: none;
	font-family: "Trebuchet MS", "Lucida Grande", Verdana, sans-serif;
	font-size: 0.87rem;
	font-weight: 700;
	color: #2f2b23;
}

.calendar-month-link,
.calendar-year-link {
	text-decoration: none;
	line-height: 1;
	font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, sans-serif;
	padding: 0.22rem 0.35rem;
	text-align: center;
	border: 1px solid #cfc4b3;
	border-radius: 4px;
	background: #fffdf8;
	color: #4b4337;
}

.calendar-month-link:hover,
.calendar-year-link:hover {
	border-color: #9d907c;
	background: #f2e9da;
}

.evopress-calendar-table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, sans-serif;
	font-size: 0.76rem;
	color: #4b4338;
}

.evopress-calendar-table th,
.evopress-calendar-table td {
	border: 1px solid #ddd2c2;
	text-align: center;
	padding: 0.25rem 0;
}

.evopress-calendar-table th {
	background: #f3ebde;
	font-weight: 700;
	font-size: 0.69rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.calendar-day {
	background: #fff;
	color: #7a6f5d;
}

.calendar-day.has-posts {
	background: #e9f0f3;
	color: #294f62;
	font-weight: 700;
}

.calendar-day.has-posts a {
	color: inherit;
	display: block;
	text-decoration: none;
}

.calendar-day.has-posts a:hover {
	text-decoration: underline;
}

.calendar-day.today {
	outline: 2px solid #9f844f;
	outline-offset: -2px;
}

.calendar-day.is-empty {
	background: #f7f2e8;
}

.evopress-archive-entry-point {
	display: grid;
	gap: 0.38rem;
}

.archive-summary {
	margin: 0;
	font-size: 0.86rem;
	color: #6f6555;
}

.archive-browse-link {
	display: inline-block;
	font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, sans-serif;
	font-size: 0.78rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	padding: 0.28rem 0.5rem;
	border: 1px solid #c8bdab;
	border-radius: 999px;
	background: #fffdf7;
	color: #3a3429;
}

.archive-browse-link:hover {
	border-color: #9b8f7b;
	background: #f4ecde;
}

.evopress-recent-posts {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.36rem;
}

.recent-post-item {
	display: grid;
	gap: 0.08rem;
}

.recent-post-link {
	font-size: 0.9rem;
	text-decoration: none;
	color: #3e372c;
}

.recent-post-link:hover {
	text-decoration: underline;
}

.recent-post-date {
	font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, sans-serif;
	font-size: 0.73rem;
	color: #877b67;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

@media (max-width: 960px) {
	body {
		font-size: 16px;
	}

	.site-header,
	.site-content {
		padding: 0.8rem;
	}

	.layout-shell {
		padding: 1.05rem;
		gap: 1.15rem;
	}
}

@media (max-width: 860px) {
	.layout-shell {
		grid-template-columns: 1fr;
	}

	.sidebar-column {
		border-left: none;
		padding-left: 0;
	}

	.header-nav-region {
		padding: 0.64rem 0.8rem;
	}

	.header-identity-region {
		padding: 1rem 0.85rem 0.8rem;
	}

	.blog-hero,
	.header-media-region {
		min-height: 160px;
	}

	.blog-hero-overlay {
		padding: 0.8rem 0.85rem;
	}
}

@media (max-width: 560px) {
	.blog-menu a,
	.auth-menu a {
		font-size: 0.72rem;
		padding: 0.3rem 0.48rem;
	}

	.post-card {
		padding: 0.9rem;
	}

	.entry-meta,
	.post-meta {
		font-size: 0.73rem;
	}

	.sidebar-block {
		padding: 0.68rem;
	}
}