/*
 * Invox — all frontend styles.
 * Monochrome palette only (black, white, grays). No colored UI.
 * Breakpoint: 1280px (desktop three-column grid below, stacked above it).
 */

/* --------------------------------------------------------------------------
   Fonts (self-hosted, font-display: swap)
   -------------------------------------------------------------------------- */

@font-face {
	font-family: 'DM Sans';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/dm-sans-v17-latin-regular.woff2') format('woff2');
}
@font-face {
	font-family: 'DM Sans';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('../fonts/dm-sans-v17-latin-500.woff2') format('woff2');
}
@font-face {
	font-family: 'DM Sans';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/dm-sans-v17-latin-700.woff2') format('woff2');
}
@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/inter-v20-latin-regular.woff2') format('woff2');
}
@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('../fonts/inter-v20-latin-500.woff2') format('woff2');
}
@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/inter-v20-latin-700.woff2') format('woff2');
}
@font-face {
	font-family: 'Fira Sans Condensed';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/fira-sans-condensed-v11-latin-regular.woff2') format('woff2');
}
@font-face {
	font-family: 'Fira Sans Condensed';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('../fonts/fira-sans-condensed-v11-latin-500.woff2') format('woff2');
}
@font-face {
	font-family: 'Fira Sans Condensed';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/fira-sans-condensed-v11-latin-700.woff2') format('woff2');
}
@font-face {
	font-family: 'Roboto';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/roboto-v51-latin-regular.woff2') format('woff2');
}
@font-face {
	font-family: 'Roboto';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('../fonts/roboto-v51-latin-500.woff2') format('woff2');
}
@font-face {
	font-family: 'Roboto';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/roboto-v51-latin-700.woff2') format('woff2');
}

/* --------------------------------------------------------------------------
   Design tokens
   -------------------------------------------------------------------------- */

:root {
	/* Light theme (default values). */
	--invox-bg: #ffffff;
	--invox-surface: #f5f5f5;
	--invox-border: #e0e0e0;
	--invox-text: #141414;
	--invox-text-secondary: #5c5c5c;
	--invox-hover: #ececec;

	/* Typography — overwritten per pairing below. */
	--font-heading: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
	--font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;

	--invox-radius: 6px;
	--invox-bottom-bar-height: 56px;
}

:root[data-fonts='editorial'] {
	--font-heading: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
	--font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
}
:root[data-fonts='compact'] {
	--font-heading: 'Fira Sans Condensed', 'Arial Narrow', Arial, sans-serif;
	--font-body: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

/* Dark theme: explicit user/Customizer choice. */
:root[data-theme='dark'] {
	--invox-bg: #0a0a0a;
	--invox-surface: #171717;
	--invox-border: #2e2e2e;
	--invox-text: #f2f2f2;
	--invox-text-secondary: #a3a3a3;
	--invox-hover: #222222;
}

/* Dark theme: Browser Default mode (data-theme is "default" or absent)
   following the OS preference. */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme='light']):not([data-theme='dark']) {
		--invox-bg: #0a0a0a;
		--invox-surface: #171717;
		--invox-border: #2e2e2e;
		--invox-text: #f2f2f2;
		--invox-text-secondary: #a3a3a3;
		--invox-hover: #222222;
	}
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

body {
	margin: 0;
	background: var(--invox-bg);
	color: var(--invox-text);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	font-weight: 700;
	line-height: 1.25;
	margin: 0 0 0.5em;
}

a {
	color: var(--invox-text);
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}

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

/* Visible focus everywhere. */
:focus-visible {
	outline: 2px solid var(--invox-text);
	outline-offset: 2px;
	border-radius: 2px;
}

/* Buttons: small-medium, slightly rounded — never pill-shaped. */
button,
.button,
input[type='submit'] {
	font: inherit;
	font-size: 0.875rem;
	padding: 0.45em 1em;
	border: 1px solid var(--invox-border);
	border-radius: var(--invox-radius);
	background: var(--invox-surface);
	color: var(--invox-text);
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}
button:hover,
.button:hover,
input[type='submit']:hover {
	background: var(--invox-hover);
}

/* --------------------------------------------------------------------------
   Accessibility helpers
   -------------------------------------------------------------------------- */

.invox-skip-link {
	position: absolute;
	top: -100px;
	left: 16px;
	z-index: 200;
	padding: 0.5em 1em;
	background: var(--invox-text);
	color: var(--invox-bg);
	border-radius: var(--invox-radius);
}
.invox-skip-link:focus {
	top: 16px;
	text-decoration: none;
}

/* Visually hidden but still readable by screen readers. */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

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

.invox-header {
	border-bottom: 1px solid var(--invox-border);
	background: var(--invox-bg);
}
.invox-header__inner {
	max-width: 1440px;
	margin: 0 auto;
	padding: 12px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}
.invox-site-title {
	font-family: var(--font-heading);
	font-size: 1.4rem;
	font-weight: 700;
}
/* When the site title doubles as the page <h1> (posts index only). */
.invox-site-title--heading,
.invox-site-title--logo {
	margin: 0;
}
.invox-header .custom-logo {
	max-height: 40px;
	width: auto;
}

.invox-menu-toggle {
	display: none; /* shown <1280px */
	align-items: center;
	justify-content: center;
	padding: 8px;
	min-width: 44px;
	min-height: 44px;
	line-height: 0;
}

/* --------------------------------------------------------------------------
   Three-column layout
   -------------------------------------------------------------------------- */

.invox-layout {
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 24px;
	display: grid;
	grid-template-columns: minmax(200px, 1fr) 768px minmax(240px, 1fr);
	column-gap: 24px;
	align-items: start;
}

.invox-content {
	min-width: 0; /* allow grid children to shrink without overflow */
	padding: 16px 0;
}

.invox-sidebar {
	padding: 16px 0;
}

/* --------------------------------------------------------------------------
   Primary menu (sidebar + bottom bar share this markup)
   -------------------------------------------------------------------------- */

.invox-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}
.invox-menu li {
	margin: 2px 0;
}
.invox-menu-link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border-radius: var(--invox-radius);
	font-weight: 500;
	transition: background-color 0.2s ease;
}
.invox-menu-link:hover {
	background: var(--invox-hover);
	text-decoration: none;
}
.invox-menu-link[aria-current='page'] {
	font-weight: 700;
}
.invox-menu-icon {
	display: inline-flex;
	line-height: 0;
}

/* --------------------------------------------------------------------------
   Secondary menu + dropdowns
   -------------------------------------------------------------------------- */

.invox-secondary-nav {
	margin-top: 16px;
}
.invox-secondary-menu,
.invox-submenu {
	list-style: none;
	margin: 0;
	padding: 0;
}
.invox-secondary-menu li {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}
.invox-submenu-link {
	flex: 1;
	display: block;
	padding: 8px 12px;
	border-radius: var(--invox-radius);
	color: var(--invox-text-secondary);
	transition: background-color 0.2s ease, color 0.2s ease;
}
.invox-submenu-link:hover {
	background: var(--invox-hover);
	color: var(--invox-text);
	text-decoration: none;
}
.invox-submenu-toggle {
	padding: 6px;
	border: 0;
	background: transparent;
	line-height: 0;
}
.invox-submenu-toggle svg {
	transition: transform 0.2s ease;
}
.invox-submenu-toggle[aria-expanded='true'] svg {
	transform: rotate(180deg);
}

.invox-submenu {
	display: none;
	flex-basis: 100%;
	padding-left: 16px;
}
/* Progressive enhancement: hover / keyboard focus also opens dropdowns. */
.menu-item-has-children.is-open > .invox-submenu,
.menu-item-has-children:hover > .invox-submenu,
.menu-item-has-children:focus-within > .invox-submenu {
	display: block;
}

/* --------------------------------------------------------------------------
   Color-mode switcher (segmented control)
   -------------------------------------------------------------------------- */

.invox-color-switcher {
	display: inline-flex;
	gap: 0;
	margin-top: 16px;
	border: 1px solid var(--invox-border);
	border-radius: var(--invox-radius);
	overflow: hidden;
}
.invox-color-switcher__btn {
	border: 0;
	border-radius: 0;
	background: var(--invox-bg);
	color: var(--invox-text-secondary);
}
.invox-color-switcher__btn + .invox-color-switcher__btn {
	border-left: 1px solid var(--invox-border);
}
.invox-color-switcher__btn[aria-pressed='true'] {
	background: var(--invox-text);
	color: var(--invox-bg);
}

/* --------------------------------------------------------------------------
   Widgets
   -------------------------------------------------------------------------- */

.invox-widget {
	margin: 0 0 24px;
	padding: 16px;
	background: var(--invox-surface);
	border: 1px solid var(--invox-border);
	border-radius: var(--invox-radius);
	font-size: 0.9375rem;
}
.invox-widget__title {
	font-size: 1.05rem;
	margin-bottom: 0.75em;
}
.invox-widget ul {
	margin: 0;
	padding-left: 1.1em;
}
.invox-widget a {
	color: var(--invox-text);
}

/* Search form (injected by WP search widget or get_search_form()). */
.search-form {
	display: flex;
	gap: 8px;
}
.search-form label {
	flex: 1;
}
.search-form .search-field {
	width: 100%;
	padding: 0.45em 0.75em;
	border: 1px solid var(--invox-border);
	border-radius: var(--invox-radius);
	background: var(--invox-bg);
	color: var(--invox-text);
	font: inherit;
}

/* --------------------------------------------------------------------------
   Content: loop cards, pagination, nothing-found
   -------------------------------------------------------------------------- */

.invox-card {
	padding: 16px;
	border-bottom: 1px solid var(--invox-border); /* X-like separators */
}
.invox-card__title {
	font-size: 1.25rem;
	margin-bottom: 0.25em;
}
/* Monochrome links rely on underline for affordance. */
.invox-card__title a:hover,
.invox-card__title a:focus-visible {
	text-decoration: underline;
}
.invox-card__media {
	display: block;
	margin: 0 0 12px;
	overflow: hidden;
	border-radius: var(--invox-radius);
}
.invox-card__media img {
	display: block;
	width: 100%;
	height: auto;
}
.invox-card__meta {
	margin: 0 0 0.5em;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 12px;
	font-size: 0.8125rem;
	color: var(--invox-text-secondary);
}
.invox-card__meta a {
	color: inherit;
}
.invox-card__meta a:hover {
	text-decoration: underline;
}
.invox-card__reading-time {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}
.invox-card__reading-time svg {
	flex-shrink: 0;
}
.invox-card__excerpt {
	color: var(--invox-text);
}
.invox-card__excerpt p {
	margin: 0 0 0.75em;
}

.nav-links,
.pagination .nav-links {
	display: flex;
	gap: 4px;
	padding: 16px;
}
.page-numbers {
	display: inline-block;
	padding: 0.35em 0.75em;
	border: 1px solid var(--invox-border);
	border-radius: var(--invox-radius);
	font-size: 0.875rem;
}
.page-numbers.current {
	background: var(--invox-text);
	color: var(--invox-bg);
	border-color: var(--invox-text);
}
.page-numbers:hover {
	background: var(--invox-hover);
	text-decoration: none;
}
.page-numbers.current:hover {
	background: var(--invox-text);
}

.invox-none {
	padding: 48px 16px;
}
.invox-none__title {
	font-size: 1.5rem;
	margin-bottom: 0.25em;
}
.invox-none__text {
	color: var(--invox-text-secondary);
}
.invox-none__search {
	margin-top: 16px;
	max-width: 420px;
}

/* --------------------------------------------------------------------------
   Content: archive & search headers
   -------------------------------------------------------------------------- */

.invox-archive-header {
	padding: 16px 16px 16px;
	border-bottom: 1px solid var(--invox-border);
}
.invox-archive-header__title {
	font-size: 1.5rem;
	margin-bottom: 0.25em;
}
.invox-search-header__query {
	background: var(--invox-surface);
	border-radius: 2px;
	padding: 0 0.2em;
}
.invox-archive-header__description {
	color: var(--invox-text-secondary);
}
.invox-archive-header__description p {
	margin: 0 0 0.5em;
}
.invox-archive-header__count {
	margin: 0.5em 0 0;
	font-size: 0.875rem;
	color: var(--invox-text-secondary);
}

/* --------------------------------------------------------------------------
   Content: single post & page
   -------------------------------------------------------------------------- */

.invox-single__header {
	padding: 16px;
}
.invox-single__title {
	font-size: 1.75rem;
	margin-bottom: 0.35em;
}
.invox-single__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	font-size: 0.8125rem;
	color: var(--invox-text-secondary);
}
.invox-single__meta .invox-share {
	margin-left: auto;
}

.invox-byline {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 8px;
}
.invox-byline__author a {
	color: inherit;
	font-weight: 500;
}
.invox-byline__author a:hover {
	text-decoration: underline;
}

.invox-reading-time {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}
.invox-reading-time svg {
	flex-shrink: 0;
}

.invox-share__button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0.4em 0.8em;
}
.invox-share__button svg {
	flex-shrink: 0;
}

.invox-single__media {
	margin: 0 16px 16px;
}
.invox-single__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--invox-radius);
}

.invox-single__content {
	padding: 0 16px 24px;
}
.entry-content {
	line-height: 1.7;
}
.entry-content::after {
	content: '';
	display: table;
	clear: both;
}
.entry-content > * {
	margin-top: 0;
	margin-bottom: 1.25em;
}
.entry-content h1 {
	font-size: 1.6rem;
}
.entry-content h2 {
	font-size: 1.35rem;
}
.entry-content h3 {
	font-size: 1.15rem;
}
.entry-content h4,
.entry-content h5,
.entry-content h6 {
	font-size: 1rem;
}
.entry-content a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}
.entry-content ul,
.entry-content ol {
	padding-left: 1.5em;
}
.entry-content li {
	margin-bottom: 0.5em;
}
.entry-content blockquote {
	margin: 0 0 1.25em;
	padding: 0.25em 0 0.25em 1em;
	border-left: 3px solid var(--invox-text);
	color: var(--invox-text-secondary);
}
.entry-content blockquote p:last-child {
	margin-bottom: 0;
}
.entry-content img {
	height: auto;
}
.entry-content figure {
	margin: 0 0 1.25em;
}
.entry-content figcaption {
	margin-top: 0.5em;
	font-size: 0.8125rem;
	color: var(--invox-text-secondary);
	text-align: center;
}
.entry-content pre {
	padding: 16px;
	overflow-x: auto;
	background: var(--invox-surface);
	border: 1px solid var(--invox-border);
	border-radius: var(--invox-radius);
	font-size: 0.875rem;
}
.entry-content code {
	font-family: ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;
	font-size: 0.9em;
	background: var(--invox-surface);
	border-radius: 2px;
	padding: 0.1em 0.3em;
}
.entry-content pre code {
	background: none;
	padding: 0;
}
.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
}
.entry-content th,
.entry-content td {
	padding: 0.5em 0.75em;
	border: 1px solid var(--invox-border);
	text-align: left;
}
.entry-content th {
	background: var(--invox-surface);
}
.entry-content hr {
	border: 0;
	border-top: 1px solid var(--invox-border);
	margin: 2em 0;
}
.entry-content .alignleft {
	float: left;
	margin: 0 1.25em 1em 0;
}
.entry-content .alignright {
	float: right;
	margin: 0 0 1em 1.25em;
}
.entry-content .aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}
.entry-content .alignwide,
.entry-content .alignfull {
	margin-left: 0;
	margin-right: 0;
}

.invox-single__footer {
	padding: 16px;
	border-top: 1px solid var(--invox-border);
	font-size: 0.875rem;
	color: var(--invox-text-secondary);
}
.invox-single__footer a {
	color: var(--invox-text-secondary);
}
.invox-single__footer > * {
	margin: 0 0 0.5em;
}
.invox-single__footer > *:last-child {
	margin-bottom: 0;
}

.invox-page-links {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px;
	margin-top: 1.25em;
}
.invox-page-links__label {
	margin-right: 8px;
	font-weight: 500;
}

/* --------------------------------------------------------------------------
   Content: related posts
   -------------------------------------------------------------------------- */

.invox-related {
	padding: 16px;
	border-top: 1px solid var(--invox-border);
}
.invox-related__title {
	font-size: 1.05rem;
	margin-bottom: 0.75em;
}
.invox-related .invox-card {
	padding-left: 0;
	padding-right: 0;
}
.invox-related .invox-card:first-child {
	padding-top: 0;
}
.invox-related .invox-card:last-child {
	border-bottom: 0;
}

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

.invox-comments {
	padding: 16px;
}
.invox-comments__title {
	font-size: 1.05rem;
	margin-bottom: 0.75em;
}
.comment-list {
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
}
.comment-list .children {
	list-style: none;
	margin: 16px 0 0 24px;
	padding: 0;
}
.comment-body {
	padding: 16px 0;
	border-bottom: 1px solid var(--invox-border);
}
.comment-body .avatar {
	float: left;
	margin-right: 12px;
	border-radius: 50%;
}
.comment-author {
	font-weight: 500;
}
.comment-metadata {
	font-size: 0.8125rem;
	color: var(--invox-text-secondary);
}
.comment-metadata a {
	color: inherit;
}
.comment-content {
	margin: 8px 0;
}
.comment-content p {
	margin: 0 0 0.75em;
}
.reply {
	margin-bottom: 8px;
}
.comment-reply-link {
	font-size: 0.8125rem;
	color: var(--invox-text-secondary);
}
.comment-respond {
	margin-top: 16px;
}
.comment-form > p {
	margin: 0 0 1em;
}
.comment-form label {
	display: block;
	margin-bottom: 4px;
	font-size: 0.875rem;
}
.comment-form input[type='text'],
.comment-form input[type='email'],
.comment-form input[type='url'],
.comment-form textarea {
	width: 100%;
	padding: 0.45em 0.75em;
	border: 1px solid var(--invox-border);
	border-radius: var(--invox-radius);
	background: var(--invox-bg);
	color: var(--invox-text);
	font: inherit;
}
.comment-form textarea {
	min-height: 140px;
}
.comment-form .comment-form-cookies-consent {
	display: flex;
	align-items: baseline;
	gap: 8px;
}
.comment-form .comment-form-cookies-consent label {
	display: inline;
}
.comment-notes,
.logged-in-as {
	font-size: 0.8125rem;
	color: var(--invox-text-secondary);
}

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

.invox-footer {
	max-width: 1440px;
	margin: 0 auto;
	padding: 24px;
	border-top: 1px solid var(--invox-border);
	color: var(--invox-text-secondary);
	font-size: 0.875rem;
}
.invox-footer__widgets {
	display: grid;
	gap: 24px;
	margin-bottom: 16px;
}
@media (min-width: 768px) {
	.invox-footer__widgets {
		grid-template-columns: repeat(3, 1fr);
	}
}
.invox-footer__copyright {
	margin: 0;
}

/* --------------------------------------------------------------------------
   Social links (footer) and the WeChat ID/QR modal
   -------------------------------------------------------------------------- */

.invox-social-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
}
.invox-social-links__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px; /* ≥ 44px touch target */
	height: 44px;
	border: 1px solid var(--invox-border);
	border-radius: var(--invox-radius);
	color: var(--invox-text-secondary);
	transition: color 0.2s ease, border-color 0.2s ease;
}
.invox-social-links__link:hover,
.invox-social-links__link:focus {
	color: var(--invox-text);
	border-color: var(--invox-text-secondary);
}

.invox-wechat-modal {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgb(0 0 0 / 0.5);
}
.invox-wechat-modal[hidden] {
	display: none;
}
.invox-wechat-modal__card {
	width: 100%;
	max-width: 320px;
	padding: 24px;
	background: var(--invox-surface);
	border: 1px solid var(--invox-border);
	border-radius: var(--invox-radius);
	text-align: center;
}
.invox-wechat-modal__title {
	margin: 0 0 12px;
	font-family: var(--font-heading);
	font-size: 1.125rem;
}
.invox-wechat-modal__qr {
	margin: 0 0 12px;
}
.invox-wechat-modal__qr img {
	display: block;
	max-width: 200px;
	height: auto;
	margin: 0 auto;
	border: 1px solid var(--invox-border);
	border-radius: var(--invox-radius);
}
.invox-wechat-modal__id {
	margin: 0 0 16px;
	word-break: break-word;
}
.invox-wechat-modal__id-label {
	font-weight: 500;
}
.invox-wechat-modal__close {
	display: inline-block;
	padding: 8px 16px;
	border: 1px solid var(--invox-border);
	border-radius: var(--invox-radius);
	background: var(--invox-bg);
	color: var(--invox-text);
	cursor: pointer;
}
.invox-wechat-modal__close:hover,
.invox-wechat-modal__close:focus {
	background: var(--invox-hover);
}

/* --------------------------------------------------------------------------
   Mobile (<1280px): sticky bottom bar, drawer, stacked layout
   -------------------------------------------------------------------------- */

.invox-bottom-bar,
.invox-scrim,
.invox-drawer {
	display: none;
}

@media (max-width: 1279.98px) {
	/* Room so the sticky bottom bar never covers content. */
	body {
		padding-bottom: var(--invox-bottom-bar-height);
	}

	.invox-layout {
		display: flex;
		flex-direction: column;
	}
	.invox-content {
		order: 1;
	}
	.invox-sidebar--right {
		order: 2;
	}
	/* Left sidebar contents move to the bottom bar + drawer. */
	.invox-sidebar--left {
		display: none;
	}

	.invox-menu-toggle {
		display: inline-flex;
	}

	/* Sticky bottom bar: the ONLY home of the primary menu on mobile. */
	.invox-bottom-bar {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 100;
		height: var(--invox-bottom-bar-height);
		background: var(--invox-bg);
		border-top: 1px solid var(--invox-border);
	}
	.invox-primary-nav--bottom .invox-menu {
		display: flex;
		justify-content: space-around;
		align-items: center;
		height: 100%;
	}
	.invox-primary-nav--bottom .invox-menu li {
		margin: 0;
	}
	.invox-primary-nav--bottom .invox-menu-link {
		padding: 8px 12px;
	}
	/* Icons only on mobile. */
	.invox-primary-nav--bottom .invox-menu-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		clip-path: inset(50%);
		white-space: nowrap;
	}

	/* Scrim behind the drawer. */
	.invox-scrim {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 110;
		background: rgb(0 0 0 / 0.5);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.25s ease, visibility 0.25s ease;
	}
	.invox-scrim.is-open {
		opacity: 1;
		visibility: visible;
	}

	/* Slide-out drawer. */
	.invox-drawer {
		display: block;
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		z-index: 120;
		width: min(320px, 85vw);
		background: var(--invox-bg);
		border-right: 1px solid var(--invox-border);
		overflow-y: auto;
		transform: translateX(-100%);
		visibility: hidden;
		transition: transform 0.25s ease, visibility 0.25s ease;
	}
	.invox-drawer.is-open {
		transform: translateX(0);
		visibility: visible;
	}
	.invox-drawer__header {
		display: flex;
		justify-content: flex-end;
		padding: 12px 16px;
		border-bottom: 1px solid var(--invox-border);
	}
	.invox-drawer__body {
		padding: 16px;
	}
	.invox-drawer .invox-secondary-nav,
	.invox-drawer .invox-color-switcher {
		margin-top: 0;
	}
	.invox-drawer .invox-color-switcher {
		margin: 16px 0;
	}
}

/* --------------------------------------------------------------------------
   Motion: paragraph fade-in.
   The .invox-reveal class is added only by assets/js/motion.js, so content
   stays visible when JavaScript is unavailable. .is-visible marks a
   paragraph that has already been animated (once only).
   -------------------------------------------------------------------------- */

.invox-reveal {
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}
.invox-reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Print and similar non-viewport contexts: never hide animated content. */
@media print {
	.invox-reveal {
		opacity: 1;
		transform: none;
	}
}

/* --------------------------------------------------------------------------
   Reduced motion: no transitions or animations at all.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
	}

	/* Safety net: motion.js bails out on reduced motion, but if a reveal
	   class is somehow present, show the content instead of hiding it. */
	.invox-reveal,
	.invox-reveal.is-visible {
		opacity: 1;
		transform: none;
	}
}
