/*
Theme Name: inkwell
Description: A warm hand-printed reading theme in moss green, warm sand and toasted cream, with thin uneven ink lines and quiet paper grain.
Author: Rumah Bulu
Version: 2.4.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: qk4fzn
*/

/* ---------------------------------------------------------------
   1. Tokens
--------------------------------------------------------------- */

:root {
	--bg: #f3ead6;
	--cream: #faf4e6;
	--sand: #e7d8b7;
	--fg: #27231a;
	--muted: #6e6757;
	--border: #d8cbae;
	--accent: #3f5a3d;
	--accent-deep: #2e452d;
	--radius: 16px;
	--radius-hand: 18px 26px 16px 24px / 24px 16px 26px 18px;
	--shadow: 6px 6px 0 rgba(39, 35, 26, 0.12);
	--shadow-small: 3px 3px 0 rgba(39, 35, 26, 0.14);
	--media-ratio: 16 / 9;
	--thumb-ratio: 16 / 9;
	--wrap: 1160px;
	--reading: 44rem;
	--space-1: 0.5rem;
	--space-2: 1rem;
	--space-3: 1.5rem;
	--space-4: 2.5rem;
	--space-5: 4rem;
}

/* ---------------------------------------------------------------
   2. Base
--------------------------------------------------------------- */

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

html {
	font-size: 100%;
}

body {
	margin: 0;
	background-color: var(--bg);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)' opacity='0.055'/%3E%3C/svg%3E");
	color: var(--fg);
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 1.0625rem;
	line-height: 1.8;
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--accent);
	text-decoration-thickness: 1.5px;
	text-underline-offset: 3px;
}

a:hover,
a:focus-visible {
	color: var(--accent-deep);
}

h1, h2, h3, h4, h5, h6 {
	font-family: Georgia, 'Times New Roman', serif;
	font-weight: 700;
	line-height: 1.3;
	color: var(--fg);
	margin: 0 0 var(--space-2);
}

h1 { font-size: 2.25rem; letter-spacing: 0.01em; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p {
	margin: 0 0 var(--space-3);
}

ul, ol {
	margin: 0 0 var(--space-3);
	padding-left: 1.5em;
}

blockquote {
	margin: 0 0 var(--space-3);
	padding: var(--space-2) var(--space-3);
	background: var(--cream);
	border: 2px solid var(--fg);
	border-radius: var(--radius-hand);
	box-shadow: var(--shadow-small);
	font-style: italic;
}

table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 var(--space-3);
	background: var(--cream);
}

.table-wrap {
	overflow-x: auto;
	margin-bottom: var(--space-3);
}

.table-wrap table {
	margin-bottom: 0;
}

th, td {
	border: 2px solid var(--fg);
	padding: 0.55em 0.8em;
	text-align: left;
}

th {
	background: var(--sand);
}

code, pre {
	font-family: 'Courier New', monospace;
	background: var(--sand);
	border-radius: 6px;
}

code { padding: 0.1em 0.35em; }
pre { padding: var(--space-2); border: 2px solid var(--fg); }

.wrap {
	max-width: var(--wrap);
	margin: 0 auto;
	padding-left: 24px;
	padding-right: 24px;
}

.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;
}

/* Long words never break the layout */
.entry-title,
.entry-content,
.card-title,
.card-excerpt,
.toc-list,
.comment-list,
.comment-form,
.side-block,
.not-found-panel,
.no-results-panel {
	overflow-wrap: break-word;
}

/* ---------------------------------------------------------------
   3. Header
--------------------------------------------------------------- */

.site-header {
	background: var(--cream);
	border-bottom: 2px solid var(--fg);
}

.header-inner {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	padding-top: var(--space-2);
	padding-bottom: var(--space-2);
	flex-wrap: wrap;
}

.site-title {
	order: 1;
	margin: 0;
	font-size: 1.55rem;
	font-weight: 700;
	letter-spacing: 0.015em;
}

.site-title a {
	color: var(--fg);
	text-decoration: none;
	border-bottom: 3px solid var(--accent);
	padding-bottom: 2px;
}

.site-title a:hover,
.site-title a:focus-visible {
	color: var(--accent-deep);
}

.primary-nav {
	order: 4;
	flex-basis: 100%;
}

.primary-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.primary-nav .menu {
	display: flex;
	gap: 0.25rem;
	flex-wrap: wrap;
}

.primary-nav .menu-item {
	position: relative;
}

.primary-nav .menu > .menu-item > a {
	display: block;
	padding: 0.55em 0.85em;
	color: var(--fg);
	text-decoration: none;
	font-size: 0.98rem;
	border-radius: 10px 14px 10px 14px;
}

.primary-nav .menu > .menu-item > a:hover,
.primary-nav .menu > .menu-item > a:focus-visible,
.primary-nav .menu-item-has-children:focus-within > a {
	background: var(--sand);
	color: var(--accent-deep);
}

.primary-nav .menu-item-has-children > a::after {
	content: '';
	display: inline-block;
	margin-left: 0.45em;
	border: 5px solid transparent;
	border-top-color: var(--accent);
	transform: translateY(2px);
}

.primary-nav .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 60;
	min-width: 15rem;
	background: var(--cream);
	border: 2px solid var(--fg);
	border-radius: var(--radius-hand);
	box-shadow: var(--shadow);
	padding: 0.5rem;
	display: none;
}

.primary-nav .menu-item.sub-open > .sub-menu {
	display: block;
}

@media (min-width: 761px) {
	.primary-nav {
		border-top: 1.5px dashed var(--border);
		padding-top: var(--space-1);
	}

	.primary-nav .menu-item:hover > .sub-menu,
	.primary-nav .menu-item:focus-within > .sub-menu {
		display: block;
	}
}

.primary-nav .sub-menu .menu-item a {
	display: block;
	padding: 0.5em 0.8em;
	color: var(--fg);
	text-decoration: none;
	font-size: 0.95rem;
	border-radius: 8px;
}

.primary-nav .sub-menu .menu-item a:hover,
.primary-nav .sub-menu .menu-item a:focus-visible {
	background: var(--sand);
	color: var(--accent-deep);
}

.sub-toggle {
	display: none;
	background: none;
	border: 0;
	cursor: pointer;
	color: var(--fg);
	font: inherit;
	padding: 0.55em 0.6em;
}

.sub-toggle::before {
	content: '';
	display: inline-block;
	border: 6px solid transparent;
	border-top-color: var(--accent);
}

.menu-item.sub-open > .sub-toggle::before {
	border-top-color: transparent;
	border-bottom-color: var(--accent);
	transform: translateY(-3px);
}

.nav-toggle {
	display: none;
	order: 3;
	background: var(--cream);
	border: 2px solid var(--fg);
	border-radius: 10px 14px 10px 14px;
	box-shadow: var(--shadow-small);
	padding: 0.5em 0.9em;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	color: var(--fg);
}

.search-toggle {
	display: none;
	order: 2;
	background: var(--cream);
	border: 2px solid var(--fg);
	border-radius: 10px 14px 10px 14px;
	box-shadow: var(--shadow-small);
	padding: 0.5em 0.7em;
	cursor: pointer;
	color: var(--fg);
	align-items: center;
}

.search-toggle .search-icon {
	display: block;
}

.nav-toggle .bars {
	display: inline-block;
	width: 1.1em;
	height: 2px;
	background: var(--fg);
	box-shadow: 0 5px 0 var(--fg), 0 -5px 0 var(--fg);
	margin-right: 0.5em;
	vertical-align: middle;
}

.header-search {
	order: 2;
	margin-left: auto;
	flex: 0 1 300px;
}

@media (max-width: 760px) {
	.header-search {
		display: none;
		flex-basis: 100%;
		order: 6;
		margin-left: 0;
	}

	.header-search.search-open {
		display: block;
	}
}

/* ---------------------------------------------------------------
   4. Search form
--------------------------------------------------------------- */

.search-form {
	display: flex;
	gap: 0.5rem;
	align-items: stretch;
}

.search-field {
	flex: 1;
	min-width: 0;
	font: inherit;
	padding: 0.5em 0.9em;
	background: var(--cream);
	border: 2px solid var(--fg);
	border-radius: 12px 18px 12px 18px;
	color: var(--fg);
}

.search-field:focus {
	outline: 3px solid rgba(63, 90, 61, 0.35);
	outline-offset: 1px;
}

.search-submit {
	font: inherit;
	font-weight: 700;
	padding: 0.5em 1.2em;
	background: var(--accent);
	color: var(--cream);
	border: 2px solid var(--fg);
	border-radius: 18px 12px 18px 12px;
	box-shadow: var(--shadow-small);
	cursor: pointer;
}

.search-submit:hover,
.search-submit:focus-visible {
	background: var(--accent-deep);
	color: var(--cream);
}

/* ---------------------------------------------------------------
   5. Layout
--------------------------------------------------------------- */

.site-main {
	padding-top: var(--space-4);
	padding-bottom: var(--space-5);
}

.layout-with-sidebar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: var(--space-4);
	align-items: start;
}

/* ---------------------------------------------------------------
   6. Breadcrumb
--------------------------------------------------------------- */

.breadcrumb {
	margin-bottom: var(--space-3);
	font-size: 0.85rem;
	color: var(--muted);
}

.breadcrumb .trail {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35em;
	margin: 0;
	padding: 0;
}

.breadcrumb .crumb + .crumb::before {
	content: '\203A';
	margin-right: 0.35em;
	color: var(--border);
}

.breadcrumb a {
	color: var(--muted);
	text-decoration: none;
	border-bottom: 1.5px solid var(--border);
}

.breadcrumb a:hover {
	color: var(--accent-deep);
	border-bottom-color: var(--accent);
}

/* ---------------------------------------------------------------
   7. Post grid and cards
--------------------------------------------------------------- */

.page-heading {
	margin-bottom: var(--space-3);
	padding-bottom: var(--space-2);
	border-bottom: 3px solid var(--accent);
	display: block;
}

.archive-description {
	color: var(--muted);
	margin-bottom: var(--space-4);
}

.post-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--space-4) var(--space-3);
	margin-bottom: var(--space-4);
}

.card {
	background: var(--cream);
	border: 2px solid var(--fg);
	border-radius: var(--radius-hand);
	box-shadow: var(--shadow);
	display: flex;
	flex-direction: column;
}

.card-media {
	display: block;
	border-bottom: 2px solid var(--fg);
}

.card-img {
	width: 100%;
	aspect-ratio: var(--thumb-ratio);
	object-fit: cover;
	border-radius: 15px 23px 0 0 / 21px 13px 0 0;
}

.card-body {
	padding: var(--space-2) var(--space-3) var(--space-3);
	display: flex;
	flex-direction: column;
	flex: 1;
}

.card-kicker {
	margin: 0 0 0.35rem;
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.card-kicker a {
	color: var(--accent);
	text-decoration: none;
}

.card-title {
	font-size: 1.15rem;
	margin-bottom: 0.5rem;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.card-title a {
	color: var(--fg);
	text-decoration: none;
}

.card-title a:hover,
.card-title a:focus-visible {
	color: var(--accent-deep);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

.card-excerpt {
	font-size: 0.95rem;
	color: var(--muted);
	margin-bottom: var(--space-2);
	flex: 1;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.card-meta {
	margin: 0;
	font-size: 0.82rem;
	color: var(--muted);
}

.card-meta time {
	border-bottom: 1.5px solid var(--border);
	padding-bottom: 1px;
}

/* Hero card (first post on the homepage) */

.card-hero {
	grid-column: 1 / -1;
	flex-direction: row;
	align-items: stretch;
}

.card-hero .card-media {
	flex: 0 0 55%;
	border-bottom: 0;
	border-right: 2px solid var(--fg);
}

.card-hero .card-img {
	height: 100%;
	border-radius: 15px 0 0 21px / 21px 0 0 13px;
}

.card-hero .card-body {
	padding: var(--space-3) var(--space-4);
	justify-content: center;
}

.card-hero .card-title {
	font-size: 1.8rem;
}

.card-hero .card-excerpt {
	font-size: 1.05rem;
}

/* ---------------------------------------------------------------
   8. Single post
--------------------------------------------------------------- */

.entry {
	max-width: 100%;
}

.entry-header {
	margin-bottom: var(--space-3);
}

.entry-title {
	font-size: 2.4rem;
	margin-bottom: var(--space-2);
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em 1.2em;
	font-size: 0.88rem;
	color: var(--muted);
	padding-bottom: var(--space-2);
	border-bottom: 1.5px dashed var(--border);
}

.entry-meta .meta-label {
	font-weight: 700;
	color: var(--fg);
}

.entry-meta a {
	color: var(--accent);
}

.entry-thumb {
	margin: 0 0 var(--space-3);
	border: 2px solid var(--fg);
	border-radius: var(--radius-hand);
	box-shadow: var(--shadow);
}

.entry-thumb img {
	width: 100%;
	aspect-ratio: var(--media-ratio);
	object-fit: cover;
	border-radius: 16px 24px 14px 22px / 22px 14px 24px 16px;
}

.article-note {
	background: var(--sand);
	border: 2px solid var(--fg);
	border-left: 8px solid var(--accent);
	border-radius: var(--radius-hand);
	box-shadow: var(--shadow-small);
	padding: var(--space-2) var(--space-3);
	margin-bottom: var(--space-3);
	font-size: 0.95rem;
}

.article-note .note-label {
	display: block;
	font-weight: 700;
	font-size: 0.8rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--accent-deep);
	margin-bottom: 0.3em;
}

.toc {
	background: var(--sand);
	border: 2px solid var(--fg);
	border-radius: var(--radius-hand);
	box-shadow: var(--shadow-small);
	padding: var(--space-2) var(--space-3);
	margin-bottom: var(--space-3);
	max-width: var(--reading);
}

.toc-title {
	margin: 0 0 0.5rem;
	font-weight: 700;
	font-size: 0.85rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--accent-deep);
}

.toc-list {
	margin: 0;
	padding-left: 1.4em;
	font-size: 0.95rem;
}

.toc-list li {
	margin-bottom: 0.2em;
}

.toc-list a {
	color: var(--fg);
	text-decoration: none;
	border-bottom: 1.5px solid var(--border);
}

.toc-list a:hover,
.toc-list a:focus-visible {
	color: var(--accent-deep);
	border-bottom-color: var(--accent);
}

.entry-content {
	margin-bottom: var(--space-3);
}

.entry-content h2 {
	margin-top: var(--space-4);
	padding-bottom: 0.3em;
	border-bottom: 3px solid var(--accent);
	scroll-margin-top: 1.5rem;
}

.entry-content h3 {
	margin-top: var(--space-3);
}

.entry-content img {
	border: 2px solid var(--fg);
	border-radius: var(--radius-hand);
}

.page-links {
	margin-bottom: var(--space-3);
	font-weight: 700;
}

.entry-tags {
	margin-bottom: var(--space-3);
}

.tag-list {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
}

.tag-list a {
	display: inline-block;
	padding: 0.25em 0.9em;
	background: var(--cream);
	border: 2px solid var(--fg);
	border-radius: 999px;
	box-shadow: var(--shadow-small);
	color: var(--fg);
	text-decoration: none;
	font-size: 0.85rem;
}

.tag-list a:hover,
.tag-list a:focus-visible {
	background: var(--sand);
	color: var(--accent-deep);
}

.author-bio {
	display: flex;
	gap: var(--space-3);
	align-items: flex-start;
	background: var(--cream);
	border: 2px solid var(--fg);
	border-radius: var(--radius-hand);
	box-shadow: var(--shadow);
	padding: var(--space-3);
	margin-bottom: var(--space-4);
}

.author-bio .avatar {
	border: 2px solid var(--fg);
	border-radius: 14px 20px 14px 20px;
	flex-shrink: 0;
}

.author-name {
	font-size: 1.15rem;
	margin-bottom: 0.3rem;
}

.author-bio p {
	margin: 0;
	font-size: 0.95rem;
	color: var(--muted);
}

.related-posts {
	margin-bottom: var(--space-4);
}

.related-title {
	padding-bottom: 0.3em;
	border-bottom: 3px solid var(--accent);
	margin-bottom: var(--space-3);
}

/* ---------------------------------------------------------------
   9. Comments
--------------------------------------------------------------- */

.comments-area {
	background: var(--cream);
	border: 2px solid var(--fg);
	border-radius: var(--radius-hand);
	box-shadow: var(--shadow);
	padding: var(--space-3);
}

.comments-title {
	font-size: 1.4rem;
	padding-bottom: 0.3em;
	border-bottom: 3px solid var(--accent);
	margin-bottom: var(--space-3);
}

.comment-list {
	list-style: none;
	margin: 0 0 var(--space-3);
	padding: 0;
}

.comment-list .comment {
	border-bottom: 1.5px dashed var(--border);
	padding: var(--space-2) 0;
}

.comment-list .children {
	list-style: none;
	margin: var(--space-2) 0 0;
	padding-left: var(--space-3);
	border-left: 3px solid var(--sand);
}

.comment-author {
	font-weight: 700;
}

.comment-author .avatar {
	border: 2px solid var(--fg);
	border-radius: 10px 14px 10px 14px;
	vertical-align: middle;
	margin-right: 0.5em;
}

.comment-metadata {
	font-size: 0.8rem;
	color: var(--muted);
}

.comment-metadata a {
	color: var(--muted);
}

.reply a,
.comment-reply-link {
	display: inline-block;
	padding: 0.2em 0.8em;
	background: var(--sand);
	border: 2px solid var(--fg);
	border-radius: 999px;
	font-size: 0.8rem;
	color: var(--fg);
	text-decoration: none;
}

.comment-form label {
	display: block;
	font-weight: 700;
	font-size: 0.9rem;
}

.comment-form input[type='text'],
.comment-form input[type='email'],
.comment-form input[type='url'],
.comment-form textarea {
	width: 100%;
	font: inherit;
	padding: 0.5em 0.9em;
	background: var(--bg);
	border: 2px solid var(--fg);
	border-radius: 12px 18px 12px 18px;
	color: var(--fg);
	margin-bottom: var(--space-2);
}

.comment-form .submit {
	font: inherit;
	font-weight: 700;
	padding: 0.55em 1.4em;
	background: var(--accent);
	color: var(--cream);
	border: 2px solid var(--fg);
	border-radius: 18px 12px 18px 12px;
	box-shadow: var(--shadow-small);
	cursor: pointer;
}

.comment-form .submit:hover,
.comment-form .submit:focus-visible {
	background: var(--accent-deep);
}

.comment-notes,
.logged-in-as {
	font-size: 0.85rem;
	color: var(--muted);
}

.no-comments {
	font-style: italic;
	color: var(--muted);
}

/* ---------------------------------------------------------------
   10. Sidebar
--------------------------------------------------------------- */

.site-sidebar .side-block {
	background: var(--cream);
	border: 2px solid var(--fg);
	border-radius: var(--radius-hand);
	box-shadow: var(--shadow-small);
	padding: var(--space-2) var(--space-3) var(--space-3);
	margin-bottom: var(--space-3);
}

.side-title {
	font-size: 1rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent-deep);
	padding-bottom: 0.4em;
	border-bottom: 3px solid var(--accent);
	margin-bottom: var(--space-2);
}

.side-block ul {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.93rem;
}

.side-block li {
	padding: 0.3em 0;
	border-bottom: 1.5px dashed var(--border);
}

.side-block li:last-child {
	border-bottom: 0;
}

.side-block li a {
	color: var(--fg);
	text-decoration: none;
}

.side-block li a:hover,
.side-block li a:focus-visible {
	color: var(--accent-deep);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.side-block .children {
	padding-left: 1em;
	margin-top: 0.3em;
}

.side-block .post-count,
.side-block li .count {
	color: var(--muted);
	font-size: 0.8em;
}

.recent-item {
	display: flex;
	gap: 0.8em;
	align-items: flex-start;
}

.recent-thumb {
	flex: 0 0 84px;
}

.recent-thumb img {
	width: 84px;
	aspect-ratio: var(--thumb-ratio);
	object-fit: cover;
	border: 2px solid var(--fg);
	border-radius: 8px 12px 8px 12px;
}

.recent-text {
	font-size: 0.9rem;
	line-height: 1.45;
}

.recent-date {
	display: block;
	font-size: 0.75rem;
	color: var(--muted);
	margin-top: 0.2em;
}

/* ---------------------------------------------------------------
   11. Pagination
--------------------------------------------------------------- */

.pagination {
	margin-bottom: var(--space-4);
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.pagination .page-numbers {
	display: inline-block;
	min-width: 2.4em;
	text-align: center;
	padding: 0.3em 0.6em;
	background: var(--cream);
	border: 2px solid var(--fg);
	border-radius: 10px 14px 10px 14px;
	box-shadow: var(--shadow-small);
	color: var(--fg);
	text-decoration: none;
	font-size: 0.95rem;
}

.pagination .page-numbers.current {
	background: var(--accent);
	color: var(--cream);
}

.pagination .page-numbers.dots {
	border-color: transparent;
	background: transparent;
	box-shadow: none;
}

.pagination a.page-numbers:hover,
.pagination a.page-numbers:focus-visible {
	background: var(--sand);
	color: var(--accent-deep);
}

/* ---------------------------------------------------------------
   12. Footer
--------------------------------------------------------------- */

.site-footer {
	background: var(--accent-deep);
	color: var(--cream);
	border-top: 2px solid var(--fg);
	margin-top: var(--space-4);
}

.footer-inner {
	padding-top: var(--space-4);
	padding-bottom: var(--space-4);
}

.footer-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--space-4);
	align-items: start;
	margin-bottom: var(--space-4);
}

.footer-site-name {
	margin: 0 0 var(--space-2);
	font-size: 1.3rem;
	font-weight: 700;
	letter-spacing: 0.015em;
}

.footer-site-name a {
	color: var(--cream);
	text-decoration: none;
	border-bottom: 3px solid var(--sand);
	padding-bottom: 2px;
}

.footer-site-name a:hover,
.footer-site-name a:focus-visible {
	color: var(--sand);
}

.footer-groups {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--space-3);
}

.footer-group .group-heading {
	display: block;
	font-weight: 700;
	font-size: 0.85rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--sand);
	padding-bottom: 0.5em;
	border-bottom: 2px solid rgba(250, 244, 230, 0.35);
	margin-bottom: var(--space-2);
}

.footer-links {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-links li {
	margin-bottom: 0.4em;
}

.footer-links a {
	color: var(--cream);
	text-decoration: none;
	font-size: 0.93rem;
	border-bottom: 1.5px solid transparent;
}

.footer-links a:hover,
.footer-links a:focus-visible {
	color: var(--sand);
	border-bottom-color: var(--sand);
}

.footer-plain {
	color: rgba(250, 244, 230, 0.75);
	font-size: 0.93rem;
}

.footer-note {
	font-size: 0.88rem;
	color: var(--sand);
	margin: 0 0 var(--space-2);
}

.copyright {
	font-size: 0.82rem;
	color: rgba(250, 244, 230, 0.65);
	margin: 0;
	padding-top: var(--space-2);
	border-top: 1.5px dashed rgba(250, 244, 230, 0.25);
}

/* ---------------------------------------------------------------
   13. 404 / empty states
--------------------------------------------------------------- */

.not-found-panel,
.no-results-panel {
	background: var(--cream);
	border: 2px solid var(--fg);
	border-radius: var(--radius-hand);
	box-shadow: var(--shadow);
	padding: var(--space-4);
	max-width: var(--reading);
	margin: 0 auto;
	text-align: center;
}

.not-found-panel .page-heading,
.no-results-panel .page-heading {
	border-bottom: 0;
	padding-bottom: 0;
}

.not-found-panel .search-form,
.no-results-panel .search-form {
	max-width: 26rem;
	margin: 0 auto var(--space-3);
}

.not-found-topics {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
	margin: 0;
	padding: 0;
}

.not-found-topics a {
	display: inline-block;
	padding: 0.25em 0.9em;
	background: var(--sand);
	border: 2px solid var(--fg);
	border-radius: 999px;
	color: var(--fg);
	text-decoration: none;
	font-size: 0.88rem;
}

.not-found-topics a:hover,
.not-found-topics a:focus-visible {
	background: var(--cream);
	color: var(--accent-deep);
}

/* ---------------------------------------------------------------
   14. Responsive
--------------------------------------------------------------- */

@media (max-width: 1000px) {
	.layout-with-sidebar {
		grid-template-columns: 1fr;
	}

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

	.footer-grid {
		grid-template-columns: 1fr;
	}

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

	.card-hero {
		flex-direction: column;
	}

	.card-hero .card-media {
		flex-basis: auto;
		border-right: 0;
		border-bottom: 2px solid var(--fg);
	}

	.card-hero .card-img {
		border-radius: 15px 23px 0 0 / 21px 13px 0 0;
	}
}

@media (max-width: 760px) {
	body {
		font-size: 1rem;
	}

	h1 { font-size: 1.7rem; }
	.entry-title { font-size: 1.7rem; }

	.header-inner {
		gap: var(--space-2);
	}

	.search-toggle {
		display: inline-flex;
		margin-left: auto;
	}

	.nav-toggle {
		display: inline-flex;
		align-items: center;
	}

	.primary-nav {
		display: none;
		flex-basis: 100%;
		margin-left: 0;
		order: 5;
	}

	.primary-nav.is-open {
		display: block;
	}

	.primary-nav .menu {
		flex-direction: column;
		gap: 0;
		border: 2px solid var(--fg);
		border-radius: var(--radius-hand);
		background: var(--cream);
		box-shadow: var(--shadow-small);
		padding: 0.5rem;
	}

	.primary-nav .menu > .menu-item > a {
		padding: 0.7em 0.9em;
	}

	.primary-nav .menu-item-has-children {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
	}

	.primary-nav .menu-item-has-children > a {
		flex: 1;
	}

	.primary-nav .menu-item-has-children > a::after {
		display: none;
	}

	.sub-toggle {
		display: inline-block;
	}

	.primary-nav .sub-menu {
		position: static;
		flex-basis: 100%;
		box-shadow: none;
		border: 0;
		border-top: 1.5px dashed var(--border);
		border-radius: 0;
		padding: 0.3rem 0 0.3rem 0.8rem;
	}

	.post-grid {
		grid-template-columns: 1fr;
	}

	.footer-groups {
		grid-template-columns: 1fr;
	}

	.author-bio {
		flex-direction: column;
	}
}
