/*
 * EEPMON theme layer (eepmon-theme.css)
 * Loaded after legacy styles to provide a clean, consistent system.
 */

:root {
	--font-sans: "Roboto", "Noto Sans JP", "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--font-size-body: clamp(15px, 1.1vw, 18px);
	--font-size-meta: 12px;
	--font-size-nav: 13px;
	--line-body: 1.62;
	--line-heading: 1.18;

	--space-1: 6px;
	--space-2: 10px;
	--space-3: 16px;
	--space-4: 24px;
	--space-5: 32px;
	--space-6: 48px;

	--content-max-width: min(1920px, 100vw);
	--content-pad-x: clamp(10px, 2.2vw, 32px);
	--card-gap: clamp(10px, 1.2vw, 24px);
	--card-min-width: 300px;

	/* Header bar height — used for sticky section nav (replaces legacy 61px border hacks). */
	--eepmon-header-height: 64px;
	--nav-social-icon-size: 20px;

	--color-bg: #000;
	--color-surface: #111316;
	--color-surface-alt: #171b21;
	--color-text: #eceef2;
	--color-muted: #a8b0bd;
	--color-link: #42d0ff;
	--color-border: #2b3038;
	--color-hero-overlay: rgba(0, 0, 0, 0.62);
	--social-color: #ffffff;
	--social-instagram-mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 169.063 169.063'%3E%3Cpath fill='black' d='M122.406 0H46.654C20.929 0 0 20.93 0 46.655v75.752c0 25.726 20.929 46.655 46.654 46.655h75.752c25.727 0 46.656-20.93 46.656-46.655V46.655C169.063 20.93 148.133 0 122.406 0zm31.657 122.407c0 17.455-14.201 31.655-31.656 31.655H46.654C29.2 154.063 15 139.862 15 122.407V46.655C15 29.201 29.2 15 46.654 15h75.752c17.455 0 31.656 14.201 31.656 31.655V122.407z'/%3E%3Cpath fill='black' d='M84.531 40.97c-24.021 0-43.563 19.542-43.563 43.563 0 24.02 19.542 43.561 43.563 43.561s43.563-19.541 43.563-43.561c0-24.021-19.542-43.563-43.563-43.563zm0 72.123c-15.749 0-28.563-12.812-28.563-28.561 0-15.75 12.813-28.563 28.563-28.563s28.563 12.813 28.563 28.563c0 15.749-12.814 28.561-28.563 28.561z'/%3E%3Cpath fill='black' d='M129.921 28.251c-2.89 0-5.729 1.17-7.77 3.22-2.051 2.04-3.23 4.88-3.23 7.78 0 2.891 1.18 5.73 3.23 7.78 2.04 2.04 4.88 3.22 7.77 3.22 2.9 0 5.73-1.18 7.78-3.22 2.05-2.05 3.22-4.89 3.22-7.78 0-2.9-1.17-5.74-3.22-7.78-2.04-2.05-4.88-3.22-7.78-3.22z'/%3E%3C/svg%3E");
	--social-x-mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 300.251'%3E%3Cpath fill='black' d='M178.57 127.15 290.27 0h-26.46l-97.03 110.38L89.34 0H0l117.13 166.93L0 300.25h26.46l102.4-116.59 81.8 116.59h89.34M36.01 19.54H76.66l187.13 262.13h-40.66'/%3E%3C/svg%3E");
}

:root[data-theme="light"] {
	--color-bg: #f5f7fa;
	--color-surface: #ffffff;
	--color-surface-alt: #f2f5f9;
	--color-text: #11151b;
	--color-muted: #5f6b7c;
	--color-link: #0b74aa;
	--color-border: #d4dbe3;
	--color-hero-overlay: rgba(0, 0, 0, 0.4);
	--logo-color: #ffffff;
	--social-color: #11151b;
}

html,
body,
button,
input,
textarea,
select {
	font-family: var(--font-sans);
}

body {
	background: var(--color-bg);
	color: var(--color-text);
	font-size: var(--font-size-body);
	line-height: var(--line-body);
}

h1,
h2,
h3,
h4,
h5,
h6,
.entry-title {
	font-family: var(--font-sans);
	letter-spacing: 0.02em;
	line-height: var(--line-heading);
}

a,
a:visited,
.entry-title a {
	color: var(--color-text);
	text-decoration: none;
}

a:hover,
a:focus,
.entry-title a:hover {
	color: var(--color-link) !important;
}

.site,
.site-header,
.site-main,
.site-footer,
.navbar,
.main-navigation,
.archive-header,
.page-header,
.post-navigation {
	background: var(--color-bg) !important;
	color: var(--color-text);
}

.site,
.site-header {
	max-width: var(--content-max-width) !important;
	width: 100% !important;
}

/* Normal flow header (no body border-top / negative top offset). */
.site-header {
	position: relative !important;
	top: 0 !important;
	z-index: 50;
	border-bottom: 1px solid var(--color-border);
}

.navbar {
	position: relative;
	z-index: 5;
	min-height: var(--eepmon-header-height);
	overflow: visible;
}

/*
 * Top “gap” vs static preview: WordPress adds html { margin-top: 32px !important }
 * (46px ≤782px) when the admin toolbar is shown. front-page.html has no WP, so no offset.
 * On a black site that band can look like empty space if the bar blends in or sits under layers.
 * Drop the html margin; pad the header so logo/chrome clears the fixed #wpadminbar.
 */
html {
	margin-top: 0 !important;
}

body.admin-bar .site-header {
	padding-top: 32px;
	box-sizing: border-box;
}

@media screen and (max-width: 782px) {
	body.admin-bar .site-header {
		padding-top: 46px;
	}
}

/* Header search only (primary nav = .section-nav in content). */

#main,
#primary,
#content,
.site-content,
.site-main {
	max-width: none !important;
	width: 100% !important;
}

/*
 * Parent theme blocks.css sets .content-area { overflow-x: hidden } (wide blocks).
 * That non-visible overflow creates a scroll containment that breaks position: sticky
 * for .section-nav in WebKit/Blink. Restore visible overflow on the main column.
 */
#primary.content-area,
.content-area {
	overflow-x: visible !important;
	overflow-y: visible !important;
}

.site-main {
	padding-left: var(--content-pad-x);
	padding-right: var(--content-pad-x);
}

/* Center in navbar; avoid legacy left:-60px + margin-left:50% (pushes logo off-screen on wide layouts). */
.logo {
	background: none !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 152px;
	height: 31px;
	cursor: pointer;
	position: absolute;
	left: 50%;
	/* Align logo vertical center with #nav-social (see --nav-social-icon-size). */
	top: 12px;
	transform: translateX(-50%);
	z-index: 8;
	margin: 8px 0 0 0;
	text-indent: 0;
	overflow: visible;
	font-size: 0 !important;
	line-height: 0 !important;
}

.logo .logo-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}

/* White SVG as <img> — visible on light theme */
:root[data-theme="light"] .logo .logo-img {
	filter: brightness(0);
}

.logo .logo-inline {
	display: block;
	width: 100%;
	height: 100%;
}

.logo .logo-inline svg {
	display: block;
	width: 100%;
	height: 100%;
}

.logo .logo-inline .st0 {
	fill: #fff !important;
}

:root[data-theme="light"] .logo .logo-inline .st0 {
	fill: #11151b !important;
}

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

/* PNG-era masks apply to .social-link; header uses <img> SVGs — tint for dark/light */
#nav-social .nav-social-icon {
	display: block;
	width: var(--nav-social-icon-size);
	height: var(--nav-social-icon-size);
	object-fit: contain;
	filter: brightness(0) invert(1);
}

:root[data-theme="light"] #nav-social .nav-social-icon {
	filter: none;
}

#nav-social .social-link {
	display: inline-flex;
	width: var(--nav-social-icon-size);
	height: var(--nav-social-icon-size);
	align-items: center;
	justify-content: center;
}

/* Spacing between the two social icons; keep left-aligned (not right:*) on all breakpoints */
#nav-social {
	position: absolute;
	left: var(--content-pad-x);
	right: auto;
	/* Vertical centering within the navbar height */
	top: calc((var(--eepmon-header-height) - var(--nav-social-icon-size)) / 2);
	z-index: 9;
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 0;
	margin: 0;
}

#nav-social li {
	float: none !important;
	width: var(--nav-social-icon-size);
	height: var(--nav-social-icon-size);
	margin: 0 !important;
}

#nav-social .social-link::before {
	content: "";
	display: block;
	width: 15px;
	height: 15px;
	background-color: var(--social-color);
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
	-webkit-mask-size: contain;
	mask-repeat: no-repeat;
	mask-position: center;
	mask-size: contain;
}

#nav-social .social-instagram::before {
	-webkit-mask-image: var(--social-instagram-mask);
	mask-image: var(--social-instagram-mask);
}

#nav-social .social-x::before {
	-webkit-mask-image: var(--social-x-mask);
	mask-image: var(--social-x-mask);
}

#nav-social .social-link:hover::before,
#nav-social .social-link:focus::before {
	background-color: var(--color-link);
}

.theme-mode-toggle {
	position: absolute;
	right: 58px;
	/* Vertical centering within the navbar height */
	top: calc((var(--eepmon-header-height) - 30px) / 2);
	z-index: 1100;
	height: 30px;
	min-width: 62px;
	padding: 0 var(--space-2);
	border: 1px solid var(--color-border) !important;
	border-radius: 999px;
	background: var(--color-surface) !important;
	color: var(--color-text);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
}

.theme-mode-toggle:hover,
.theme-mode-toggle:focus {
	border-color: var(--color-link) !important;
	color: var(--color-link);
}

.nav-menu li a {
	color: var(--color-text);
	font-size: var(--font-size-nav);
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.nav-menu li:hover > a,
.nav-menu li a:hover,
.nav-menu li:focus > a,
.nav-menu li a:focus {
	color: var(--color-link) !important;
	background: transparent;
	text-decoration: none;
}

.nav-menu .sub-menu,
.nav-menu .children {
	background: var(--color-surface) !important;
}

.site-header .search-field {
	width: 24px;
	height: 24px;
	padding: 0;
	background-size: 18px 18px;
	background-position: center;
}

/*
 * Card grid lives in .eepmon-post-grid — not on #content — so .section-nav is NOT a grid item.
 * position: sticky is unreliable on grid children in WebKit/Blink when #content was display:grid.
 */
.home #content.site-content,
.archive #content.site-content,
.search-results #content.site-content,
.date #content.site-content {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: var(--card-gap);
}

.home .eepmon-post-grid,
.archive .eepmon-post-grid,
.search-results .eepmon-post-grid,
.date .eepmon-post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(var(--card-min-width), 1fr));
	gap: var(--card-gap);
	align-items: start;
}

.home .eepmon-post-grid > article,
.archive .eepmon-post-grid > article,
.search-results .eepmon-post-grid > article,
.date .eepmon-post-grid > article {
	float: none;
	width: 100% !important;
	margin: 0 !important;
	background: var(--color-bg);
	border-top: 2px solid var(--color-link);
}

.eepmon-post-grid > .navigation.paging-navigation {
	grid-column: 1 / -1;
}

.home .entry-header,
.archive .entry-header,
.search-results .entry-header,
.date .entry-header {
	margin-top: 0;
	padding-top: var(--space-2);
}

.home .entry-thumbnail img,
.archive .entry-thumbnail img,
.search-results .entry-thumbnail img,
.date .entry-thumbnail img {
	display: block;
	width: 100%;
	height: auto;
}

.entry-title {
	margin: 0;
	padding: 0 var(--space-2) var(--space-2) var(--space-2);
	font-size: clamp(12px, 0.95vw, 16px);
	text-align: center;
}

.entry-content,
.entry-summary {
	margin-top: var(--space-2);
}

.archive .eepmon-post-grid > article.category-contact,
.search-results .eepmon-post-grid > article.category-contact {
	grid-column: 1 / -1;
	border-top: 0;
}

/* Single + page readability */
/*
 * jScripts.min.js sets $("article:not(.front-hero)") to a fixed ~310px width on wide
 * viewports for the card grid. On single posts that pins the article (and sticky
 * .section-nav) to the left while .entry-header / .entry-content use max-width +
 * auto margins inside #content — pills no longer line up with the title. Undo on
 * singles and use one grid column for all article children.
 */
.single #content.site-content > article:not(.front-hero) {
	display: grid;
	grid-template-columns: 1fr minmax(0, min(100%, 1000px)) 1fr;
	width: 100% !important;
	max-width: none;
	float: none !important;
	clear: both;
	margin-left: 0 !important;
	margin-right: 0 !important;
	box-sizing: border-box;
}

.single #content.site-content > article:not(.front-hero) > * {
	grid-column: 2;
	min-width: 0;
}

.single .entry-header,
.single .entry-content,
.single .entry-summary,
.single .entry-meta,
.page .entry-header,
.page .entry-content,
.page .entry-summary,
.page .entry-meta {
	max-width: min(100%, 1000px) !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

.single .entry-title,
.page .entry-title {
	font-size: clamp(20px, 2.2vw, 36px);
	line-height: 1.2;
	padding: 0;
	text-align: left;
}

.single .entry-content p,
.page .entry-content p {
	font-size: clamp(16px, 1.1vw, 20px);
	line-height: 1.75;
	color: var(--color-text);
}

.single img.size-full,
.single img.size-large,
.single img.wp-post-image {
	border-color: var(--color-border);
}

/* Hero */
/* Hero is outside .eepmon-post-grid */
.home #content > article.front-hero {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-top: 2px solid var(--color-link);
}

/*
 * Legacy style.css uses article { float: left } + jScripts.min.js sets width on $("article").
 * Grid cards ignore float; the home hero is a normal <article> and was squeezed to ~310px wide.
 */
article.front-hero {
	float: none !important;
	clear: both;
	width: 100% !important;
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	box-sizing: border-box;
}

.front-hero {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: clamp(280px, 52vw, 560px);
	border: 1px solid var(--color-border);
	border-top: 2px solid var(--color-link);
	background: var(--color-surface);
	overflow: hidden;
	margin-bottom: var(--card-gap);
}

/* Full-bleed featured image; sits under gradient + copy */
.front-hero-media {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: block;
	min-height: 100%;
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
}

/* Legibility scrim: image shows through at top, darker toward the copy */
.front-hero::after {
	content: "";
	display: block;
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, 0.88) 0%,
		rgba(0, 0, 0, 0.5) 42%,
		rgba(0, 0, 0, 0.15) 72%,
		transparent 100%
	);
}

:root[data-theme="light"] .front-hero::after {
	background: linear-gradient(
		to top,
		rgba(245, 247, 250, 0.94) 0%,
		rgba(245, 247, 250, 0.65) 38%,
		rgba(245, 247, 250, 0.2) 70%,
		transparent 100%
	);
}

.front-hero-content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	width: 100%;
	max-width: 72ch;
	padding: clamp(20px, 4vw, 36px);
	padding-top: clamp(48px, 12vw, 120px);
	color: var(--color-text);
	font-family: var(--font-sans);
	text-align: left;
}

/* One rhythm: strip ad-hoc margins so gap controls vertical alignment */
.front-hero-content > * {
	margin: 0 !important;
}

.front-hero-content > p:has(.front-hero-link) {
	margin-top: 6px !important;
}

/*
 * Legacy child style.css sets `h1 { padding-left: 10px }` (all headings).
 * Hero title is an h1; kicker/meta are p — that alone staggers the left edge.
 * Normalize so kicker, title, date, excerpt, and CTA share one vertical alignment.
 */
.front-hero .front-hero-content h1.front-hero-title {
	padding: 0 !important;
	margin: 0 !important;
	width: 100%;
	max-width: 100%;
	text-align: left;
	box-sizing: border-box;
}

/* Exclude .front-hero-kicker — it should hug the label, not span the column */
.front-hero .front-hero-content > p:not(.front-hero-kicker),
.front-hero .front-hero-content > .front-hero-excerpt {
	padding: 0 !important;
	width: 100%;
	max-width: 100%;
	text-align: left;
	box-sizing: border-box;
}

.front-hero .front-hero-content .front-hero-excerpt * {
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	text-align: left;
}

.front-hero .front-hero-content .front-hero-title a {
	display: inline;
	padding: 0;
	margin: 0;
	vertical-align: baseline;
}

.front-hero-kicker {
	display: inline-block;
	width: fit-content;
	max-width: 100%;
	align-self: flex-start;
	margin: 0 !important;
	padding: 5px 10px;
	box-sizing: border-box;
	border-radius: 4px;
	background: var(--color-link) !important;
	color: #000 !important;
	font-family: var(--font-sans);
	font-size: 11px !important;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.2;
	white-space: nowrap;
}

.front-hero-title {
	font-family: var(--font-sans);
	font-size: clamp(22px, 3.2vw, 38px);
	line-height: 1.12;
	font-weight: 700;
}

.front-hero-title a,
.front-hero-title a:visited {
	color: var(--color-text);
}

/* Hero title, date, excerpt — normal drop shadow (offset + blur) */
.front-hero .front-hero-title a,
.front-hero .front-hero-meta,
.front-hero .front-hero-excerpt {
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* Date + excerpt: same size, same line height, Roboto (var --font-sans) */
.front-hero-meta,
.front-hero-excerpt {
	font-family: var(--font-sans);
	font-size: var(--font-size-body);
	font-weight: 400;
	line-height: var(--line-body);
	letter-spacing: 0.01em;
	max-width: none;
}

.front-hero-meta {
	color: rgba(236, 238, 242, 0.88) !important;
}

:root[data-theme="light"] .front-hero-meta {
	color: var(--color-muted) !important;
}

.front-hero-excerpt {
	color: rgba(236, 238, 242, 0.9);
}

:root[data-theme="light"] .front-hero-excerpt {
	color: var(--color-muted);
}

.front-hero-link {
	display: inline-block;
	padding: 10px 18px;
	border: 1px solid var(--color-link);
	color: var(--color-link) !important;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.front-hero-link:hover,
.front-hero-link:focus {
	border-color: var(--color-link);
	background: var(--color-link);
	color: var(--color-bg) !important;
}

:root[data-theme="light"] .front-hero-link:hover,
:root[data-theme="light"] .front-hero-link:focus {
	color: #fff !important;
}

/* Fix for light-mode hero link hover (avoids :root selector typo above). */
:root[data-theme="light"] .front-hero-link:hover,
:root[data-theme="light"] .front-hero-link:focus {
	color: #fff !important;
}

/* Section/sub-category navigation */
.section-nav {
	flex-shrink: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 8px 0;
	position: -webkit-sticky;
	position: sticky;
	top: 0;
	/* Keep above the header chrome (header z-index: 50) so it can't be layered behind it. */
	z-index: 80;
	background: var(--color-bg);
	border-bottom: 1px solid var(--color-border);
}

/* Logged-in WP toolbar (header bar is not fixed, so strip sticks to viewport top). */
body.admin-bar .section-nav {
	top: 32px;
}

/* On single posts, the sticky strip sits right after the title. Add a bit of spacing
 * so it doesn't reach `top: 0` before the title has fully scrolled away (prevents clipping).
 * Singles: width comes from the article grid column above (same edge as the title).
 * Pages: .section-nav sits above the article in #content — constrain like entry-header. */
.single .section-nav {
	margin-top: var(--space-3);
	justify-content: flex-start;
	min-width: 0;
}

.page .section-nav {
	margin-top: var(--space-3);
	max-width: min(100%, 1000px) !important;
	margin-left: auto !important;
	margin-right: auto !important;
	width: 100%;
	box-sizing: border-box;
	justify-content: flex-start;
}

@media screen and (max-width: 782px) {
	body.admin-bar .section-nav {
		top: 46px;
	}
}

.section-nav a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 12px;
	border: 1px solid var(--color-border);
	background: var(--color-surface);
	color: var(--color-text);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.section-nav a:hover,
.section-nav a:focus {
	border-color: var(--color-link);
	color: var(--color-link) !important;
}

.section-nav a.is-active {
	border-color: var(--color-link);
	background: var(--color-surface-alt);
	color: var(--color-text);
}

/* Footer cleanup */
.site-footer {
	padding: var(--space-5) var(--content-pad-x) var(--space-3) var(--content-pad-x);
}

.site-info {
	border-top: 1px solid var(--color-border);
}

.site-info a,
.site-footer .widget a {
	color: var(--color-link);
}

.widget ul,
.widget ol {
	font-family: var(--font-sans);
	font-size: 13px;
}

/* --------------------------------------------------------------
   Legacy post compatibility layer
   Keeps existing handcrafted post HTML stable (col-1/col-2/etc.)
-------------------------------------------------------------- */
.single .entry-content .col-1,
.page .entry-content .col-1 {
	display: block;
	width: 100%;
	max-width: min(100%, 1040px);
	margin: 0 auto;
	padding: 0;
	column-count: 1 !important;
}

.single .entry-content .col-2,
.page .entry-content .col-2 {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	width: 100%;
	max-width: min(100%, 1200px);
	margin: 0 auto;
	padding: 0;
	column-count: 1 !important;
}

.single .entry-content .col-3,
.page .entry-content .col-3 {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	width: 100%;
	max-width: min(100%, 1320px);
	margin: 0 auto;
	padding: 0;
	column-count: 1 !important;
}

.single .entry-content .col-2 > img,
.page .entry-content .col-2 > img {
	width: 100%;
	height: auto;
	margin: 0 !important;
}

.single .entry-content .col-3 > img,
.page .entry-content .col-3 > img {
	width: 100%;
	height: auto;
	margin: 0 !important;
}

.single .entry-content .col-2 > div,
.page .entry-content .col-2 > div {
	min-width: 0;
}

.single .entry-content .col-3 > div,
.page .entry-content .col-3 > div {
	min-width: 0;
}

.single .entry-content .col-2 p,
.page .entry-content .col-2 p {
	margin: 0;
}

.single .entry-content .col-3 p,
.page .entry-content .col-3 p {
	margin: 0;
}

.single .entry-content img.aligncenter,
.single .entry-content img.alignnone,
.page .entry-content img.aligncenter,
.page .entry-content img.alignnone {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
}

.single .entry-content a[href*="pdf"],
.page .entry-content a[href*="pdf"] {
	display: inline-block;
	padding: 8px 14px;
	border: 1px solid var(--color-border);
	background: var(--color-surface);
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.single .entry-content hr,
.page .entry-content hr {
	border: 0;
	border-top: 1px solid var(--color-border);
	margin: 28px 0;
}

/* Responsive behavior */
@media (max-width: 900px) {
	.theme-mode-toggle {
		right: 52px;
		top: calc((var(--eepmon-header-height) - 28px) / 2);
		min-width: 56px;
		height: 28px;
		font-size: 10px;
	}
}

@media (max-width: 700px) {
	:root {
		--card-min-width: 220px;
	}

	.front-hero {
		min-height: clamp(260px, 62vw, 480px);
	}

	.single .entry-content .col-2,
	.page .entry-content .col-2 {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.single .entry-content .col-3,
	.page .entry-content .col-3 {
		grid-template-columns: 1fr;
		gap: 16px;
	}
}

@media (max-width: 590px) {
	.theme-mode-toggle {
		right: 52px;
		/* Avoid calc-based positioning issues on some mobile layouts */
		top: 16px;
	}

	/*
	 * Legacy style.css used margin-left:50% !important on .logo at this breakpoint, which
	 * overrode transform centering. Keep the mark visually centered in the navbar at all widths.
	 */
	.navbar {
		overflow-x: visible;
	}

	.navbar .logo {
		position: absolute !important;
		left: 50% !important;
		right: auto !important;
		transform: translateX(-50%) !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		max-width: min(152px, calc(100vw - 140px));
	}

	/* Legacy style.css used right:20px here — pin socials to the left with the content inset */
	.navbar #nav-social {
		left: var(--content-pad-x) !important;
		right: auto !important;
		/* Avoid calc-based positioning issues on some mobile layouts */
		top: 16px !important;
		margin-top: 0 !important; /* overrides legacy `margin-top: 14px` in style.css */
	}
}

@media (max-width: 479px) {
	.home .eepmon-post-grid,
	.archive .eepmon-post-grid,
	.search-results .eepmon-post-grid,
	.date .eepmon-post-grid {
		grid-template-columns: 1fr;
	}

	.entry-title {
		text-align: left;
	}

	.section-nav {
		gap: 6px;
	}

	/* Ensure header chrome stays visible at narrow widths */
	.navbar #nav-social {
		top: 16px !important;
	}

	.theme-mode-toggle {
		top: 16px !important;
	}

	.section-nav a {
		padding: 8px 10px;
		font-size: 10px;
	}
}