/*
Theme Name: Anvil
Theme URI: https://www.grillanatomy.com
Author: Luis Herrera
Author URI: https://www.grillanatomy.com
Description: A clean, schematic-inspired design built on flat bordered components, technical typography, and a cool steel palette with bright callout accents.
Version: 2.4.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
	--bg: #10161d;
	--panel: #161e27;
	--fg: #e7edf3;
	--muted: #92a3b4;
	--border: #2e3d4d;
	--steel: #86a9c9;
	--accent: #ff6a1a;
	--gridline: rgba(134, 169, 201, 0.07);
	--radius: 0;
	--shadow: none;
	--media-ratio: 16 / 9;
	--thumb-ratio: 3 / 2;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.6em;
	color: #f4f7fa;
	font-weight: 700;
	line-height: 1.25;
}

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

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
	outline: 1px dashed var(--accent);
	outline-offset: 2px;
}

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

.entry-title,
.row-title,
.archive-title,
.hero-name,
.related-link,
.comment-content,
.entry-content {
	overflow-wrap: break-word;
}

::selection {
	background: var(--accent);
	color: #10161d;
}

.container {
	width: min(1180px, 92%);
	margin-inline: auto;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	word-wrap: normal !important;
	border: 0;
}

/* ---------- Header ---------- */

.site-header {
	background: #0b0f14;
	border-bottom: 1px solid var(--border);
}

.header-top {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
	padding: 0.85rem 0;
}

.site-branding {
	display: flex;
	align-items: center;
}

h1.site-logo,
.site-logo {
	margin: 0;
}

.custom-logo-link img,
.custom-logo {
	display: block;
	width: auto;
	max-height: 46px;
}

.site-name {
	margin: 0;
	font-size: 1.15rem;
}

.site-name a {
	display: inline-flex;
	align-items: center;
	color: #f4f7fa;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-decoration: none;
}

.site-name a::before {
	content: "";
	display: inline-block;
	width: 0.62em;
	height: 0.62em;
	margin-right: 0.55em;
	background: var(--accent);
}

.site-name a:hover {
	color: var(--accent);
}

.header-search {
	margin-left: auto;
}

.menu-toggle {
	display: none;
	align-items: center;
	gap: 0.55rem;
	margin-left: 0.5rem;
	padding: 0.5rem 0.8rem;
	background: transparent;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--fg);
	font: inherit;
	font-size: 0.85rem;
	cursor: pointer;
}

.toggle-bars {
	position: relative;
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
}

.toggle-bars::before,
.toggle-bars::after {
	content: "";
	position: absolute;
	left: 0;
	width: 18px;
	height: 2px;
	background: currentColor;
}

.toggle-bars::before {
	top: -6px;
}

.toggle-bars::after {
	top: 6px;
}

.main-navigation {
	border-top: 1px solid var(--border);
}

.nav-menu {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nav-menu li {
	position: relative;
}

.nav-menu a {
	display: block;
	padding: 0.8rem 1rem;
	color: var(--fg);
	font-size: 0.9rem;
	text-decoration: none;
}

.nav-menu > li > a:hover,
.nav-menu > li > a:focus {
	color: var(--accent);
}

.nav-menu .current-menu-item > a,
.nav-menu .current-menu-ancestor > a,
.nav-menu .current_page_item > a {
	color: var(--accent);
}

.nav-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 50;
	min-width: 240px;
	margin: 0;
	padding: 0.35rem 0;
	list-style: none;
	background: var(--panel);
	border: 1px solid var(--border);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.nav-menu li:hover > .sub-menu,
.nav-menu li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.nav-menu .sub-menu a {
	padding: 0.5rem 1rem;
	color: var(--muted);
	font-size: 0.88rem;
}

.nav-menu .sub-menu a:hover,
.nav-menu .sub-menu a:focus {
	color: var(--accent);
}

.submenu-toggle {
	display: none;
}

/* ---------- Layout ---------- */

.site-body {
	padding: 2rem 0 3rem;
}

.layout.has-sidebar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 2.5rem;
	align-items: start;
}

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

/* ---------- Breadcrumb ---------- */

.breadcrumb {
	margin-bottom: 1.5rem;
	font-family: var(--mono);
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}

.breadcrumb a {
	color: var(--muted);
	text-decoration: none;
}

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

.crumb-sep {
	margin: 0 0.5rem;
	color: #46586b;
}

/* ---------- Homepage hero (category index) ---------- */

.hero-index {
	margin-bottom: 2rem;
	padding: 1.4rem;
	border: 1px solid var(--border);
	background-color: var(--panel);
	background-image: linear-gradient(var(--gridline) 1px, transparent 1px), linear-gradient(90deg, var(--gridline) 1px, transparent 1px);
	background-size: 26px 26px;
}

.hero-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hero-cell {
	position: relative;
	padding: 1rem 1.1rem 1rem 2.9rem;
	border: 1px solid var(--border);
	background: var(--bg);
}

.hero-marker {
	position: absolute;
	top: 1rem;
	left: 0.9rem;
	padding: 0.05rem 0.35rem;
	border: 1px solid var(--accent);
	font-family: var(--mono);
	font-size: 0.78rem;
	color: var(--accent);
}

.hero-name {
	display: block;
	color: #f4f7fa;
	font-weight: 700;
	text-decoration: none;
}

.hero-name:hover {
	color: var(--accent);
}

.hero-desc {
	margin: 0.35rem 0 0;
	color: var(--muted);
	font-size: 0.85rem;
}

/* ---------- Post list rows ---------- */

.post-list {
	display: grid;
	gap: 1.25rem;
}

.post-row {
	display: grid;
	grid-template-columns: 208px minmax(0, 1fr);
	gap: 1.25rem;
	padding: 1rem;
	border: 1px solid var(--border);
	background: var(--panel);
}

.post-row.sticky {
	border-left: 3px solid var(--accent);
}

.row-thumb {
	display: block;
	border: 1px solid var(--border);
}

.row-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: var(--thumb-ratio);
	object-fit: cover;
}

.row-title {
	margin: 0 0 0.4rem;
	font-size: 1.2rem;
}

.row-title a {
	color: #f4f7fa;
	text-decoration: none;
}

.row-title a:hover {
	color: var(--accent);
}

.row-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1rem;
	margin-bottom: 0.5rem;
	font-family: var(--mono);
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted);
}

.row-meta a {
	color: var(--muted);
	text-decoration: none;
}

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

.row-excerpt {
	color: var(--muted);
	font-size: 0.94rem;
}

.row-excerpt p {
	margin: 0;
}

/* ---------- Archive headers ---------- */

.archive-header {
	margin-bottom: 1.75rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--border);
}

.archive-title {
	margin: 0;
	font-size: 1.6rem;
}

.archive-description {
	margin-top: 0.6rem;
	color: var(--muted);
	font-size: 0.95rem;
}

.archive-description p {
	margin: 0 0 0.6rem;
}

/* ---------- Single post ---------- */

.entry-header {
	margin-bottom: 1.25rem;
}

.entry-title {
	margin-bottom: 0.6rem;
	font-size: 2rem;
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.2rem;
	padding: 0.6rem 0;
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
	font-family: var(--mono);
	font-size: 0.78rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted);
}

.entry-meta a {
	color: var(--steel);
	text-decoration: none;
}

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

.entry-media {
	margin: 0 0 1.5rem;
	border: 1px solid var(--border);
}

.entry-media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: var(--media-ratio);
	object-fit: cover;
}

.entry-content > *:first-child {
	margin-top: 0;
}

.entry-content h2 {
	margin-top: 2.2rem;
	padding-bottom: 0.4rem;
	border-bottom: 1px solid var(--border);
	font-size: 1.5rem;
}

.entry-content h2::before {
	content: "";
	display: inline-block;
	width: 0.5em;
	height: 0.5em;
	margin-right: 0.55em;
	background: var(--accent);
}

.entry-content h3 {
	margin-top: 1.8rem;
	font-size: 1.2rem;
}

.entry-content h4 {
	margin-top: 1.6rem;
	font-size: 1.05rem;
}

.entry-content p,
.entry-content ul,
.entry-content ol {
	margin: 0 0 1.2rem;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.4rem;
}

.entry-content li {
	margin-bottom: 0.35rem;
}

.entry-content blockquote {
	margin: 1.5rem 0;
	padding: 0.2rem 0 0.2rem 1.2rem;
	border-left: 3px solid var(--steel);
	color: var(--muted);
}

.entry-content blockquote cite {
	display: block;
	margin-top: 0.5rem;
	font-size: 0.85rem;
}

.entry-content code {
	padding: 0.1em 0.35em;
	border: 1px solid var(--border);
	background: var(--panel);
	font-family: var(--mono);
	font-size: 0.88em;
}

.entry-content pre {
	margin: 0 0 1.5rem;
	padding: 1rem 1.2rem;
	border: 1px solid var(--border);
	background: var(--panel);
	overflow-x: auto;
}

.entry-content pre code {
	padding: 0;
	border: 0;
	background: none;
}

.entry-content table {
	width: 100%;
	margin: 0 0 1.5rem;
	border-collapse: collapse;
	font-size: 0.92rem;
}

.entry-content th,
.entry-content td {
	padding: 0.5rem 0.7rem;
	border: 1px solid var(--border);
	text-align: left;
}

.entry-content th {
	background: var(--panel);
}

.entry-content hr {
	margin: 2rem 0;
	border: 0;
	border-top: 1px solid var(--border);
}

.entry-content figure {
	margin: 0 0 1.5rem;
}

.entry-content figcaption,
.wp-caption-text {
	margin-top: 0.5rem;
	color: var(--muted);
	font-size: 0.82rem;
}

.alignleft {
	float: left;
	margin: 0.3rem 1.2rem 1rem 0;
}

.alignright {
	float: right;
	margin: 0.3rem 0 1rem 1.2rem;
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.wp-caption {
	max-width: 100%;
}

.page-links {
	margin: 1.5rem 0;
	font-size: 0.9rem;
}

/* ---------- Post modules ---------- */

.entry-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.45rem;
	margin-top: 1.75rem;
}

.tags-label {
	font-family: var(--mono);
	font-size: 0.72rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}

.entry-tags a {
	display: inline-block;
	padding: 0.18rem 0.6rem;
	border: 1px solid var(--border);
	color: var(--muted);
	font-size: 0.8rem;
	text-decoration: none;
}

.entry-tags a:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.author-bio {
	display: flex;
	gap: 1.1rem;
	margin-top: 1.75rem;
	padding: 1.1rem 1.2rem;
	border: 1px solid var(--border);
	background: var(--panel);
}

.bio-avatar {
	flex: 0 0 auto;
}

.bio-avatar img {
	display: block;
	width: 64px;
	height: 64px;
	border: 1px solid var(--border);
	object-fit: cover;
}

.bio-body {
	min-width: 0;
}

.bio-name {
	font-weight: 700;
}

.bio-name a {
	color: #f4f7fa;
	text-decoration: none;
}

.bio-name a:hover {
	color: var(--accent);
}

.bio-desc {
	margin: 0.35rem 0 0;
	color: var(--muted);
	font-size: 0.92rem;
}

.related-posts {
	margin-top: 2.25rem;
}

.related-title {
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--border);
	font-size: 1.15rem;
}

.related-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 1rem;
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
}

.related-item {
	padding: 0.85rem 1rem;
	border: 1px solid var(--border);
	background: var(--panel);
}

.related-thumb {
	display: block;
	margin: -0.85rem -1rem 0.7rem;
	border-bottom: 1px solid var(--border);
}

.related-thumb img {
	display: block;
	width: 100%;
	aspect-ratio: var(--thumb-ratio);
	object-fit: cover;
}

.related-link {
	display: block;
	color: #f4f7fa;
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
}

.related-link:hover {
	color: var(--accent);
}

.related-date {
	display: block;
	margin-top: 0.3rem;
	font-family: var(--mono);
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted);
}

.article-note {
	margin-top: 2.25rem;
	padding-left: 1rem;
	border-left: 2px solid var(--accent);
	color: var(--muted);
	font-size: 0.88rem;
}

.article-note p {
	margin: 0 0 0.6rem;
}

.article-note p:last-child {
	margin-bottom: 0;
}

/* ---------- Pagination ---------- */

.pagination {
	margin-top: 2rem;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.page-numbers {
	display: inline-block;
	min-width: 2.2rem;
	padding: 0.35rem 0.6rem;
	border: 1px solid var(--border);
	color: var(--muted);
	font-size: 0.85rem;
	text-align: center;
	text-decoration: none;
}

.page-numbers.current {
	border-color: var(--accent);
	background: var(--accent);
	color: #10161d;
	font-weight: 600;
}

.page-numbers:hover:not(.current):not(.dots) {
	border-color: var(--accent);
	color: var(--accent);
}

.page-numbers.dots {
	border-color: transparent;
}

/* ---------- Search form ---------- */

.search-form {
	display: flex;
	align-items: stretch;
	gap: 8px;
}

.search-field {
	flex: 1 1 auto;
	width: 200px;
	min-width: 0;
	padding: 0.45rem 0.7rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--panel);
	color: var(--fg);
	font: inherit;
	font-size: 0.9rem;
}

.search-field:focus {
	border-color: var(--accent);
}

.search-submit {
	flex: 0 0 auto;
	padding: 0.45rem 0.9rem;
	border: 1px solid var(--accent);
	border-radius: var(--radius);
	background: var(--accent);
	color: #10161d;
	font: inherit;
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	cursor: pointer;
}

.search-submit:hover {
	border-color: #ff7d38;
	background: #ff7d38;
}

/* ---------- Sidebar / widgets ---------- */

.widget {
	margin-bottom: 1.5rem;
	padding: 1.1rem 1.2rem;
	border: 1px solid var(--border);
	background: var(--panel);
}

.widget-title {
	margin: 0 0 0.9rem;
	padding-bottom: 0.6rem;
	border-bottom: 1px solid var(--border);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

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

.widget ul li {
	padding: 0.35rem 0;
	border-bottom: 1px dashed var(--border);
	font-size: 0.92rem;
}

.widget ul li:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.widget a {
	color: var(--muted);
	text-decoration: none;
}

.widget a:hover {
	color: var(--accent);
}

.widget select,
.widget input[type="text"],
.widget input[type="search"],
.widget input[type="email"] {
	width: 100%;
}

.widget .search-form,
.widget .search-field {
	width: 100%;
}

.widget .wp-block-tag-cloud a,
.widget .tag-cloud-link {
	display: inline-block;
	margin: 0 0.3rem 0.4rem 0;
	padding: 0.12rem 0.55rem;
	border: 1px solid var(--border);
	font-size: 0.8rem !important;
}

.widget .wp-block-tag-cloud a:hover,
.widget .tag-cloud-link:hover {
	border-color: var(--accent);
	color: var(--accent);
}

/* ---------- Comments ---------- */

.comments-area {
	margin-top: 2.5rem;
}

.comments-title {
	padding-top: 1.5rem;
	border-top: 1px solid var(--border);
	font-size: 1.25rem;
}

.comment-list {
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
}

.comment-list .children {
	margin: 1rem 0 -1rem;
	padding-left: 1.4rem;
	list-style: none;
}

.comment-body {
	margin-bottom: 1rem;
	padding: 1rem 1.2rem;
	border: 1px solid var(--border);
	background: var(--panel);
}

.comment-meta {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	margin-bottom: 0.7rem;
}

.comment-avatar {
	flex: 0 0 auto;
}

.comment-avatar img {
	display: block;
	width: 44px;
	height: 44px;
	border: 1px solid var(--border);
	object-fit: cover;
}

.comment-heading {
	min-width: 0;
}

.comment-author {
	display: block;
	font-size: 0.95rem;
	font-weight: 700;
}

.comment-author a {
	color: #f4f7fa;
	text-decoration: none;
}

.comment-author a:hover {
	color: var(--accent);
}

.comment-date {
	display: block;
	font-family: var(--mono);
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted);
	text-decoration: none;
}

.comment-awaiting-moderation {
	margin: 0 0 0.7rem;
	color: var(--accent);
	font-size: 0.82rem;
}

.comment-content p {
	margin: 0 0 0.8rem;
}

.comment-content p:last-child {
	margin-bottom: 0;
}

.comment-actions {
	display: flex;
	gap: 1rem;
	margin-top: 0.7rem;
	font-size: 0.8rem;
}

.comment-actions a {
	text-decoration: none;
}

.comment-navigation {
	display: flex;
	justify-content: space-between;
	margin-bottom: 1.5rem;
	font-size: 0.85rem;
}

.comment-respond {
	padding: 1.3rem 1.4rem;
	border: 1px solid var(--border);
	background: var(--panel);
}

.comment-reply-title {
	margin: 0 0 1rem;
	font-size: 1.1rem;
}

.comment-form label {
	display: block;
	margin-bottom: 0.3rem;
	color: var(--muted);
	font-size: 0.85rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 0.55rem 0.7rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg);
	color: var(--fg);
	font: inherit;
}

.comment-form input:focus,
.comment-form textarea:focus {
	border-color: var(--accent);
}

.comment-form .form-submit {
	margin-bottom: 0;
}

.comment-form .submit {
	padding: 0.6rem 1.3rem;
	border: 1px solid var(--accent);
	border-radius: var(--radius);
	background: var(--accent);
	color: #10161d;
	font: inherit;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	cursor: pointer;
}

.comment-form .submit:hover {
	border-color: #ff7d38;
	background: #ff7d38;
}

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

#cancel-comment-reply-link {
	margin-left: 0.6rem;
	font-size: 0.8rem;
	font-weight: 400;
}

/* ---------- Empty states ---------- */

.empty-state,
.error-page {
	padding: 2rem;
	border: 1px solid var(--border);
	background: var(--panel);
}

.error-page .page-title {
	margin-top: 0;
}

.empty-state .search-form,
.error-page .search-form {
	max-width: 460px;
	margin-top: 1rem;
}

/* ---------- Footer ---------- */

.site-footer {
	margin-top: 3rem;
	padding: 2.5rem 0 1.8rem;
	border-top: 1px solid var(--border);
	background: #0b0f14;
}

.footer-menu {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 1.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-heading {
	display: block;
	margin: 0 0 0.8rem;
	color: #f4f7fa;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
}

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

.footer-item a {
	display: inline-block;
	padding: 0.22rem 0;
	color: var(--muted);
	font-size: 0.9rem;
	text-decoration: none;
}

.footer-item a:hover {
	color: var(--accent);
}

.footer-note {
	margin: 2rem 0 0;
	padding-top: 1.2rem;
	border-top: 1px solid var(--border);
	color: var(--muted);
	font-size: 0.85rem;
}

.copyright {
	margin: 1rem 0 0;
	font-family: var(--mono);
	font-size: 0.82rem;
	color: var(--muted);
}

/* ---------- Responsive ---------- */

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

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

@media (max-width: 860px) {
	.menu-toggle {
		display: inline-flex;
	}

	.main-navigation {
		display: none;
	}

	.main-navigation.is-open {
		display: block;
	}

	.nav-menu {
		flex-direction: column;
		align-items: stretch;
	}

	.nav-menu li {
		border-top: 1px solid var(--border);
	}

	.nav-menu a {
		padding: 0.85rem 3.2rem 0.85rem 0.2rem;
	}

	.nav-menu .sub-menu {
		position: static;
		display: none;
		min-width: 0;
		padding: 0;
		border: 0;
		border-top: 1px solid var(--border);
		background: transparent;
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: none;
	}

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

	.nav-menu .sub-menu a {
		padding-left: 1.2rem;
	}

	.submenu-toggle {
		position: absolute;
		top: 0;
		right: 0;
		display: block;
		width: 44px;
		height: 46px;
		padding: 0;
		border: 0;
		border-left: 1px solid var(--border);
		background: transparent;
		color: var(--muted);
		cursor: pointer;
	}

	.submenu-toggle::after {
		content: "";
		display: block;
		width: 8px;
		height: 8px;
		margin: 0 auto;
		border-right: 2px solid currentColor;
		border-bottom: 2px solid currentColor;
		transform: rotate(45deg) translateY(-2px);
		transition: transform 0.15s ease;
	}

	.nav-menu li.sub-open > .submenu-toggle::after {
		transform: rotate(225deg) translateX(-2px);
	}
}

@media (max-width: 640px) {
	.header-top {
		column-gap: 0.75rem;
		row-gap: 0.75rem;
	}

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

	.site-name {
		font-size: 1.05rem;
	}

	.header-search {
		flex-basis: 100%;
		order: 3;
		margin-left: 0;
	}

	.header-search .search-form {
		width: 100%;
	}

	.header-search .search-field {
		flex: 1;
		width: auto;
	}

	.menu-toggle {
		flex: 0 0 auto;
		margin-left: auto;
	}

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

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

	.row-thumb {
		max-width: 320px;
	}

	.entry-title {
		font-size: 1.6rem;
	}

	.comment-list .children {
		padding-left: 0.8rem;
	}

	.entry-content {
		overflow-x: hidden;
	}

	.m9x2pv-table-wrap {
		overflow-x: auto;
		max-width: 100%;
		-webkit-overflow-scrolling: touch;
	}

	.m9x2pv-table-wrap table {
		width: auto;
		min-width: 100%;
		margin-bottom: 0;
	}

	.m9x2pv-table-wrap th {
		white-space: nowrap;
	}

	.m9x2pv-table-wrap td {
		min-width: 8rem;
	}
}
