/* Dark shell for site landings. Homepage layout stays in home-dark.css. */

html:has(body.page-dark) {
	color-scheme: dark;
	background: #16181c;
}

body.page-dark {
	--ink: #16181c;
	--stone: #23262c;
	--text: #e8eaee;
	--muted: #b0b6c0;
	--line: rgba(232, 234, 238, 0.16);
	--menu: #f5f7fa;
	background: var(--ink);
	color: var(--text);
	--footer-bg: #16181c;
	--footer-bg-dark: #16181c;
	--footer-bg-light: #23262c;
	--footer-text: #e8eaee;
	--footer-text-light: #b0b6c0;
	--footer-border: rgba(232, 234, 238, 0.16);
	--footer-primary: #e6c36a;
	--footer-primary-light: #f3d78a;
	--footer-hover: #f4f6f8;
	--footer-link: #f3d78a;
}

body.page-dark main {
	background: var(--ink);
	color: var(--text);
}

body.page-dark .header {
	background: #16181c;
	color: var(--menu);
	box-shadow: none;
	border-bottom: 1px solid var(--line);
	max-width: 100%;
	overflow: visible;
	padding: 0;
}

body.page-dark .header .wrapper {
	align-items: center;
	padding-block: 0.4rem;
}

body.page-dark .header-item-left,
body.page-dark .header-item-right,
body.page-dark .header-item-center {
	padding-block: 0;
}

body.page-dark .header .menu > ul > li {
	line-height: 1 !important;
}

@media (min-width: 993px) {
	body.page-dark .header .wrapper {
		align-items: center;
		padding-block: 0.35rem;
		flex-wrap: nowrap;
		flex-direction: row;
	}

	body.page-dark .header-item-right {
		order: 0;
		display: flex;
		align-items: center;
		justify-content: flex-end;
		flex: 0 0 auto;
		padding: 0 !important;
	}

	body.page-dark .header-item-center {
		order: 1;
		flex: 1 1 auto;
		justify-content: center;
	}

	body.page-dark .header-item-left {
		order: 2;
	}

	body.page-dark .header .menu > ul {
		display: flex;
		align-items: center;
		margin: 0;
		padding: 0;
		min-height: 0;
	}

	body.page-dark .header-item-left {
		padding: 0 !important;
		align-self: center;
	}

	body.page-dark .header-search__panel {
		top: calc(100% + 0.2rem);
		right: 0;
		left: auto;
		inset-inline-start: auto;
		inset-inline-end: auto;
		transform: none;
		width: min(16rem, calc(100vw - 2rem));
	}
}

body.page-dark .user-menu-trigger {
	padding: 0;
	margin: 0;
}

body.page-dark main {
	margin-top: 3.55rem;
}

body.page-dark .header .menu > ul > li > a,
body.page-dark .header .menu > ul > li .menu-subs a,
body.page-dark .header .menu > ul > li .menu-subs > ul > li > a,
body.page-dark .header-item-right a,
body.page-dark .header-item-right .menu-icon,
body.page-dark .menu-mobile-title,
body.page-dark .menu-mobile-close,
body.page-dark .menu-mobile-arrow {
	color: var(--menu) !important;
}

body.page-dark .header .menu > ul > li:hover > a,
body.page-dark .header .menu > ul > li .menu-subs a:hover,
body.page-dark .header-item-right a:hover {
	color: #f3d78a !important;
}

body.page-dark .header .menu > ul > li .menu-subs,
body.page-dark .user-dropdown-menu {
	background: var(--stone);
	color: var(--menu);
	border: 1px solid var(--line);
	border-top: 1px solid var(--primary-color, #8b6bb8);
	box-shadow: none;
}

body.page-dark .header .menu-mobile-trigger span {
	background: var(--menu);
	height: 1px;
}

body.page-dark .header .menu > ul > li > .menu-parent {
	background: transparent;
	border: 0;
	color: var(--menu);
	font: inherit;
	cursor: pointer;
	padding: 0;
	line-height: 1.25;
}

body.page-dark .header .menu .menu-subs li {
	border: 0;
}

body.page-dark .header .menu-subs.menu-mega svg,
body.page-dark .header .menu-subs.menu-mega svg path {
	fill: #f3d78a;
}

body.page-dark .header .menu .menu-subs a,
body.page-dark .header .menu .menu-subs a:hover {
	text-decoration: none !important;
	border-top: 0;
	border-bottom: 0;
}

body.page-dark .header .menu .menu-subs li:last-child > a,
body.page-dark .header .menu .menu-subs li:last-child > a:hover,
body.page-dark .header .menu .menu-subs .list-item:last-child > a,
body.page-dark .header .menu .menu-subs .list-item:last-child > a:hover {
	border-bottom: 0 !important;
}

body.page-dark .header .menu {
	background: transparent !important;
	color: #f5f7fa !important;
}

body.page-dark .header .menu ul,
body.page-dark .header .menu li {
	list-style: none;
}

@media (max-width: 992px) {
	body.page-dark .header .menu.active,
	body.page-dark .header .menu.active .menu-mobile-header,
	body.page-dark .header .menu.active .menu-section,
	body.page-dark .header .menu.active .menu-subs {
		background: #23262c !important;
		color: #f5f7fa !important;
	}
}

body.page-dark .header .menu a,
body.page-dark .header .menu-mobile-title,
body.page-dark .header .menu-mobile-arrow,
body.page-dark .header .menu-mobile-close {
	color: #f5f7fa !important;
}

body.page-dark .header .menu .title,
body.page-dark .header .menu-subs .title,
body.page-dark .header .menu > ul > li .menu-subs a.active {
	color: #d5dce6 !important;
}

body.page-dark .header .menu-mobile-close {
	position: relative;
	background: transparent;
	border: 0;
	box-shadow: none;
}

body.page-dark .header .menu-mobile-close::before,
body.page-dark .header .menu-mobile-close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 0.7rem;
	right: 0.7rem;
	height: 1.5px;
	background: #f5f7fa;
}

body.page-dark .header .menu-mobile-close::before {
	transform: rotate(45deg);
}

body.page-dark .header .menu-mobile-close::after {
	transform: rotate(-45deg);
}

body.page-dark .header-search {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	width: auto;
	margin: 0;
}

body.page-dark .theme-toggle {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	color: #f5f7fa;
	border: 0;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0.5rem;
	font-size: 1.15rem;
	line-height: 1;
	cursor: pointer;
}

body.page-dark .theme-toggle:hover {
	color: #f3d78a;
}

body.page-dark .theme-toggle:focus-visible {
	outline: 2px solid #f3d78a;
	outline-offset: 2px;
}

body.page-dark .theme-toggle__text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

body.page-dark .theme-toggle__icon--moon,
body.page-dark .theme-toggle__text--moon {
	display: none;
}

html.theme-light body.page-dark .theme-toggle__icon--sun,
html.theme-light body.page-dark .theme-toggle__text--sun {
	display: none;
}

html.theme-light body.page-dark .theme-toggle__icon--moon {
	display: inline-block;
}

html.theme-light body.page-dark .theme-toggle__text--moon {
	display: block;
}

body.page-dark .header-search__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	color: #f5f7fa;
	border: 0;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0.5rem;
	font-size: 1.15rem;
	line-height: 1;
	cursor: pointer;
}

body.page-dark .header-search__panel {
	position: absolute;
	z-index: 1100;
	top: calc(100% + 0.2rem);
	inset-inline-start: 0;
	inset-inline-end: auto;
	left: auto;
	right: auto;
	transform: none;
	width: min(16rem, calc(100vw - 1.5rem));
	max-width: calc(100vw - 1.5rem);
	margin: 0;
	padding: 0.2rem 0.45rem;
	background: var(--stone);
	border: 1px solid #f3d78a;
	border-radius: 3px;
	outline: none;
}

body.page-dark .header-search__panel[hidden] {
	display: none;
}

body.page-dark .header-search__label {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	border: 0;
}

body.page-dark .header-search__input,
body.page-dark .header-search__input:focus,
body.page-dark .header-search__input:focus-visible {
	width: 100%;
	background: transparent;
	color: #f5f7fa;
	border: 0;
	border-radius: 0;
	padding: 0.4rem 0.2rem;
	font: inherit;
	box-shadow: none;
	outline: none;
}

body.page-dark .header-search__input::placeholder {
	color: #9aa3b2;
}

body.page-dark .search-page {
	max-width: 46rem;
	margin: 0 auto;
	padding: 2rem 1.15rem 3rem;
}

body.page-dark .search-page h1,
body.page-dark .search-page h2 {
	color: #f5f7fa;
}

body.page-dark .search-page h1 {
	font-size: 1.6rem;
	margin: 0 0 0.4rem;
}

body.page-dark .search-page h2 {
	font-size: 1.05rem;
	margin: 1.5rem 0 0.6rem;
}

body.page-dark .search-page > p {
	color: #d5dbe3;
}

body.page-dark .search-page a {
	color: #f3d78a;
}

body.page-dark .search-results {
	list-style: none;
	margin: 0;
	padding: 0;
}

body.page-dark .search-results li {
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--line);
}

body.page-dark .search-results p {
	margin: 0.25rem 0 0;
	color: var(--muted);
}

@media (max-width: 992px) {
	body.page-dark .header .wrapper {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr) auto;
		grid-template-areas: "burger search avatar";
		direction: rtl;
		align-items: center;
		gap: 0.45rem;
		padding: 0.4rem 0.75rem;
	}

	body.page-dark .header-item-right {
		grid-area: burger;
		justify-self: start;
		display: flex;
		align-items: center;
		justify-content: flex-start;
		gap: 0.35rem;
		border: 0 !important;
		border-radius: 0 !important;
		margin: 0 !important;
		padding: 0.2rem !important;
		background: transparent;
	}

	body.page-dark .header-search {
		position: relative;
		width: max-content;
	}

	body.page-dark .header-search__panel {
		top: 50%;
		inset-inline-start: calc(100% + 0.4rem);
		inset-inline-end: auto;
		width: min(15rem, calc(100vw - 8.5rem));
		transform: translateY(-50%);
	}

	body.page-dark .header-item-left {
		grid-area: avatar;
		justify-self: end;
		padding: 0;
	}

	body.page-dark .header-item-center {
		position: absolute;
		width: 0;
		height: 0;
		overflow: visible;
		flex: none;
		padding: 0;
		margin: 0;
	}
}

@media (max-width: 992px) {
	body.page-dark .header .menu {
		background: var(--stone);
		color: var(--menu);
	}

	body.page-dark .header .menu > ul > li > a,
	body.page-dark .header .menu > ul > li > .menu-parent {
		border-bottom: 1px solid var(--line);
	}

	body.page-dark .header .menu > ul > li > .menu-parent {
		display: block;
		width: 100%;
		text-align: inherit;
		line-height: 3.125rem;
		height: 3.125rem;
		padding: 0 3.125rem 0 1rem;
	}

	body.page-dark .header .menu .menu-subs a,
	body.page-dark .header .menu .menu-subs .menu-parent {
		display: block;
		padding: 0.85rem 0.2rem;
		border-top: 0;
		border-bottom: 0;
	}
}

body.page-dark .modern-footer {
	background: #16181c;
	border-top: 1px solid var(--line);
}

body.page-dark .modern-footer::before {
	display: none;
}

body.page-dark .floating-btn.go-to-top {
	width: 48px;
	height: 48px;
	border-radius: 50% !important;
	background: #23262c !important;
	color: #f3d78a !important;
	border: 1px solid #f3d78a !important;
	box-shadow: none !important;
}

body.page-dark .floating-btn.go-to-top:hover,
body.page-dark .floating-btn.go-to-top:active,
body.page-dark .floating-btn.go-to-top:focus {
	border-radius: 50% !important;
	background: #23262c !important;
	color: #f3d78a !important;
	border: 1px solid #fff !important;
	box-shadow: 0 0 3px rgba(255, 255, 255, 0.45) !important;
	transform: none !important;
}

body.page-dark .user-dropdown-menu,
body.page-dark .user-menu-list a,
body.page-dark .user-menu-list a i,
body.page-dark .user-name-display,
body.page-dark .user-email {
	color: #f5f7fa !important;
}

body.page-dark .user-menu-list a:hover,
body.page-dark .user-menu-list a:hover i {
	background: transparent;
	color: #f3d78a !important;
}

body.page-dark .user-menu-list li.divider {
	height: 1px;
	min-height: 1px;
	max-height: 1px;
	border: 0;
	background: var(--line);
	margin: 0.35rem 0;
	padding: 0;
}

body.page-dark .user-info {
	border-bottom: 1px solid var(--line);
}

@media (min-width: 993px) {
	body.page-dark .header .menu .menu-subs a,
	body.page-dark .header .menu .menu-subs a:hover {
		display: block;
		width: 100%;
		box-sizing: border-box;
		text-decoration: none !important;
		border-top: 0 !important;
		border-bottom: 0 !important;
	}

	body.page-dark .header .menu .menu-subs li:last-child > a,
	body.page-dark .header .menu .menu-subs li:last-child > a:hover,
	body.page-dark .header .menu .menu-subs .list-item:last-child > a,
	body.page-dark .header .menu .menu-subs .list-item:last-child > a:hover {
		border-bottom: 0 !important;
	}

	body.page-dark .header-search__panel {
		position: absolute;
		top: calc(100% + 0.2rem);
		right: 0;
		left: auto;
		width: min(16rem, calc(100vw - 2rem));
		transform: none;
	}
}

/* Light mode: dark surfaces turn light, text turns dark. */
html.theme-light:has(body.page-dark) {
	color-scheme: light;
	background: #f4f6f8;
}

html.theme-light body.page-dark {
	--ink: #f4f6f8;
	--stone: #ffffff;
	--text: #1a1d23;
	--muted: #3c4452;
	--line: rgba(26, 29, 35, 0.14);
	--menu: #1a1d23;
	background: var(--ink);
	color: var(--text);
	--footer-bg: #f4f6f8;
	--footer-bg-dark: #e7ebf0;
	--footer-bg-light: #ffffff;
	--footer-text: #1a1d23;
	--footer-text-light: #3c4452;
	--footer-border: rgba(26, 29, 35, 0.16);
	--footer-primary: #6d4c09;
	--footer-primary-light: #8a6416;
	--footer-hover: #1a1d23;
	--footer-link: #6d4c09;
}

html.theme-light body.page-dark main,
html.theme-light body.page-dark .header {
	background: #f4f6f8;
	color: #1a1d23;
}

html.theme-light body.page-dark .header .menu,
html.theme-light body.page-dark .header .menu a,
html.theme-light body.page-dark .header .menu > ul > li > a,
html.theme-light body.page-dark .header .menu > ul > li .menu-subs a,
html.theme-light body.page-dark .header .menu > ul > li .menu-subs > ul > li > a,
html.theme-light body.page-dark .header-item-right a,
html.theme-light body.page-dark .header-item-right .menu-icon,
html.theme-light body.page-dark .menu-mobile-title,
html.theme-light body.page-dark .menu-mobile-close,
html.theme-light body.page-dark .menu-mobile-arrow,
html.theme-light body.page-dark .header-search__toggle,
html.theme-light body.page-dark .theme-toggle,
html.theme-light body.page-dark .header-search__input,
html.theme-light body.page-dark .header-search__input:focus,
html.theme-light body.page-dark .header-search__input:focus-visible,
html.theme-light body.page-dark .search-page h1,
html.theme-light body.page-dark .search-page h2,
html.theme-light body.page-dark .user-dropdown-menu,
html.theme-light body.page-dark .user-menu-list a,
html.theme-light body.page-dark .user-menu-list a i,
html.theme-light body.page-dark .user-name-display,
html.theme-light body.page-dark .user-email {
	color: #1a1d23 !important;
}

html.theme-light body.page-dark .header .menu > ul > li:hover > a,
html.theme-light body.page-dark .header .menu > ul > li .menu-subs a:hover,
html.theme-light body.page-dark .header-item-right a:hover,
html.theme-light body.page-dark .header-search__toggle:hover,
html.theme-light body.page-dark .theme-toggle:hover,
html.theme-light body.page-dark .user-menu-list a:hover,
html.theme-light body.page-dark .user-menu-list a:hover i,
html.theme-light body.page-dark .search-page a {
	color: #6d4c09 !important;
}

html.theme-light body.page-dark .theme-toggle:focus-visible {
	outline-color: #6d4c09;
}

html.theme-light body.page-dark .header .menu .title,
html.theme-light body.page-dark .header .menu-subs .title,
html.theme-light body.page-dark .header .menu > ul > li .menu-subs a.active,
html.theme-light body.page-dark .search-page > p,
html.theme-light body.page-dark .header-search__input::placeholder {
	color: #3c4452 !important;
}

html.theme-light body.page-dark .header .menu-mobile-trigger span,
html.theme-light body.page-dark .header .menu-mobile-close::before,
html.theme-light body.page-dark .header .menu-mobile-close::after {
	background: #1a1d23;
}

@media (max-width: 992px) {
	html.theme-light body.page-dark .header .menu.active,
	html.theme-light body.page-dark .header .menu.active .menu-mobile-header,
	html.theme-light body.page-dark .header .menu.active .menu-section,
	html.theme-light body.page-dark .header .menu.active .menu-subs {
		background: #ffffff !important;
		color: #1a1d23 !important;
	}
}

html.theme-light body.page-dark .header .menu-subs.menu-mega svg,
html.theme-light body.page-dark .header .menu-subs.menu-mega svg path {
	fill: #6d4c09;
}

html.theme-light body.page-dark .header-search__panel {
	background: #ffffff;
	border-color: #6d4c09;
}

html.theme-light body.page-dark .modern-footer {
	background: #f4f6f8;
}

html.theme-light body.page-dark .floating-btn.go-to-top,
html.theme-light body.page-dark .floating-btn.go-to-top:hover,
html.theme-light body.page-dark .floating-btn.go-to-top:active,
html.theme-light body.page-dark .floating-btn.go-to-top:focus {
	background: #ffffff !important;
	color: #1a1d23 !important;
	border-color: #1a1d23 !important;
}

html.theme-light body.page-dark .contact-list li,
html.theme-light body.page-dark .cert-item,
html.theme-light body.page-dark .department-item {
	background: rgba(26, 29, 35, 0.05);
	border-color: rgba(26, 29, 35, 0.14);
}

html.theme-light body.page-dark .contact-list li:hover,
html.theme-light body.page-dark .cert-item:hover,
html.theme-light body.page-dark .department-item:hover {
	background: rgba(26, 29, 35, 0.08);
}

html.theme-light body.page-dark .footer-powered {
	border-top-color: rgba(26, 29, 35, 0.14);
}

@media (max-width: 768px) {
	html.theme-light body.page-dark .footer-links,
	html.theme-light body.page-dark .footer-services,
	html.theme-light body.page-dark .footer-menu a {
		background: rgba(26, 29, 35, 0.04);
		border-color: rgba(26, 29, 35, 0.14);
	}

	html.theme-light body.page-dark .footer-menu a:hover {
		background: rgba(26, 29, 35, 0.08);
	}
}

/* Non-home pages follow the active theme. ISI, the university page,
   and research forms (.rt-page) paint their own surfaces; other landings
   are recolored below. Surfaces and their text use the same tokens, so a
   light panel cannot keep light type (or the reverse) after the toggle. */
body.page-dark:not(.page-home-fa) {
	--secondary-link: #f3d78a;
	--button: #e6c36a;
	--button-hover: #f3d78a;
	--background-light: var(--stone);
	--landing-card: #1c2026;
}

body.page-dark:not(.page-home-fa) main {
	background: var(--ink);
	color: var(--text);
	color-scheme: dark;
}

html.theme-light body.page-dark:not(.page-home-fa) {
	--secondary-link: #0b4f8a;
	--button: #0b4f8a;
	--button-hover: #083864;
	--background-light: #f4f6f8;
	--landing-card: #ffffff;
}

html.theme-light body.page-dark:not(.page-home-fa) main {
	background: #f4f6f8;
	color: #1a1d23;
	color-scheme: light;
}

body.page-dark:not(.page-home-fa):not(:has(.isi-guide)):not(:has(.uni)):not(:has(.search-page)):not(:has(.cp-wrap)):not(:has(.rt-page)):not(:has(.gallery-container)) main :is(
	section,
	article,
	.bg-white,
	.bg-light,
	.contact-form-wrapper,
	.form-container,
	.table,
	.alert,
	.faq-item,
	.special-offer
):not([class*="hero"]):not([class*="slide"]) {
	background-color: var(--stone) !important;
	color: var(--text) !important;
	border-color: var(--line) !important;
}

body.page-dark:not(.page-home-fa):not(:has(.isi-guide)):not(:has(.uni)):not(:has(.search-page)):not(:has(.cp-wrap)):not(:has(.rt-page)):not(:has(.gallery-container)) main :is(
	.card,
	[class*="-card"],
	[class*="-fact"],
	[class*="-item"]:not([class*="hero"] *):not([class*="slide"] *),
	[class*="-box"]:not([class*="hero"] *):not([class*="slide"] *),
	.contact-form-container,
	.service-checkbox,
	.list-group-item,
	.accordion-item,
	.accordion-button,
	.modal-content,
	.faq-item p,
	.special-offer-card
) {
	background-color: var(--landing-card) !important;
	color: var(--text) !important;
	border-color: var(--line) !important;
}

body.page-dark:not(.page-home-fa):not(:has(.isi-guide)):not(:has(.uni)):not(:has(.search-page)):not(:has(.cp-wrap)):not(:has(.rt-page)):not(:has(.gallery-container)) main :is(
	section,
	article,
	.bg-white,
	.bg-light,
	.card,
	[class*="-card"],
	[class*="-fact"],
	[class*="-item"]:not([class*="hero"] *):not([class*="slide"] *),
	[class*="-box"]:not([class*="hero"] *):not([class*="slide"] *),
	.contact-form-container,
	.contact-form-wrapper,
	.service-checkbox,
	.form-container,
	.table,
	.list-group-item,
	.accordion-item,
	.accordion-button,
	.alert,
	.modal-content,
	.faq-item,
	.special-offer
):not([class*="hero"]):not([class*="slide"]) :is(h1, h2, h3, h4, h5, h6, p, li, td, th, label, span, small, strong, div, figcaption, dt, dd, legend):not(
	:is(a, button, [class*="btn"], [class*="cta"], [class*="button"], [class*="-icon"], [class*="badge"]) *
):not(a):not(button):not([class*="btn"]):not([class*="cta"]):not([class*="button"]):not([class*="-icon"]):not([class*="badge"]) {
	color: var(--text) !important;
}

body.page-dark:not(.page-home-fa):not(:has(.isi-guide)):not(:has(.uni)):not(:has(.search-page)):not(:has(.cp-wrap)):not(:has(.rt-page)):not(:has(.gallery-container)) main a:not([class*="btn"]):not([class*="cta"]):not([class*="button"]):not(.nav a):not(.suggestion-card a):not(.special-offer-card a):not([class*="hero"] *):not([class*="slide"] *) {
	color: var(--footer-link) !important;
}

body.page-dark:not(.page-home-fa):not(:has(.isi-guide)):not(:has(.uni)):not(:has(.rt-page)) main :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]):not([type="hidden"]):not([type="file"]) {
	background: var(--ink) !important;
	color: var(--text) !important;
	border-color: var(--line) !important;
}

body.page-dark:not(.page-home-fa) main .breadcrumb {
	background: var(--stone) !important;
	color: var(--text) !important;
}

body.page-dark:not(.page-home-fa) main .breadcrumb a {
	color: var(--footer-link) !important;
}

body.page-dark:not(.page-home-fa):not(:has(.isi-guide)):not(:has(.uni)):not(:has(.rt-page)) main :is(input, select, textarea)::placeholder {
	color: var(--muted);
	opacity: 1;
}

body.page-dark .header-phone,
body.page-dark .menu-phone > a {
	color: var(--menu);
	text-decoration: none;
}

body.page-dark .header-phone:hover,
body.page-dark .menu-phone > a:hover {
	color: #f3d78a;
}

html.theme-light body.page-dark .header-phone:hover,
html.theme-light body.page-dark .menu-phone > a:hover {
	color: #6d4c09;
}

/* Search results follow the active theme instead of the light landing canvas. */
body.page-dark:not(.page-home-fa):has(.search-page) main {
	background: var(--ink);
	color: var(--text);
	color-scheme: dark;
}

html.theme-light body.page-dark:has(.search-page) main {
	background: #f4f6f8;
	color: #1a1d23;
	color-scheme: light;
}

html.theme-light body.page-dark .search-page h1,
html.theme-light body.page-dark .search-page h2 {
	color: #1a1d23;
}

html.theme-light body.page-dark .search-page > p,
html.theme-light body.page-dark .search-results p {
	color: #3c4452;
}

html.theme-light body.page-dark .search-page a {
	color: #6d4c09;
}

html.theme-light body.page-dark .search-page a:hover {
	color: #1a1d23;
}

html.theme-light body.page-dark .search-results li {
	border-bottom-color: rgba(26, 29, 35, 0.16);
}

/* Blog list + article surfaces: keep card/chip backgrounds on the same
   tokens as text so dark mode never yields light type on light panels. */
body.page-dark:not(.page-home-fa) main .posts .post {
	background-color: var(--landing-card) !important;
	color: var(--text) !important;
	border: 1px solid var(--line);
	box-shadow: none;
}

body.page-dark:not(.page-home-fa) main .posts .post .date,
body.page-dark:not(.page-home-fa) main .posts .post .summary-text,
body.page-dark:not(.page-home-fa) main .posts .post p {
	color: var(--muted) !important;
}

body.page-dark:not(.page-home-fa) main .posts .post h2 a,
body.page-dark:not(.page-home-fa) main .posts .post h3 a {
	color: var(--footer-link) !important;
}

body.page-dark:not(.page-home-fa) main .posts .post h2 a:hover,
body.page-dark:not(.page-home-fa) main .posts .post h3 a:hover {
	color: var(--text) !important;
}

body.page-dark:not(.page-home-fa) main .posts .post a[href*="post_detail"] {
	color: #fff !important;
	background: var(--primary-color, #667eea);
}

body.page-dark:not(.page-home-fa) main .post-layout .post-meta div,
body.page-dark:not(.page-home-fa) main .post-layout .post-sidebar {
	background-color: var(--landing-card) !important;
	color: var(--text) !important;
	border-color: var(--line) !important;
}

body.page-dark:not(.page-home-fa) main .post-layout .post-excerpt,
body.page-dark:not(.page-home-fa) main .post-layout .article-navigation,
body.page-dark:not(.page-home-fa) main .post-layout .article-navigation a {
	color: var(--muted) !important;
	border-color: var(--line) !important;
}

body.page-dark:not(.page-home-fa) main .post-layout .article-navigation a:hover,
body.page-dark:not(.page-home-fa) main .post-layout .post-title {
	color: var(--text) !important;
}

body.page-dark:not(.page-home-fa) main .post-layout .sidebar-service-cards h2,
body.page-dark:not(.page-home-fa) main .post-layout .article-navigation h3 {
	color: var(--text) !important;
}

body.page-dark:not(.page-home-fa) main .post-layout .service-card {
	background-color: var(--landing-card) !important;
	border-color: var(--line) !important;
	box-shadow: none;
}

body.page-dark:not(.page-home-fa) main .post-layout .service-card h3,
body.page-dark:not(.page-home-fa) main .post-layout .service-card p {
	color: var(--text) !important;
}

body.page-dark:not(.page-home-fa) main .post-layout .service-card p {
	color: var(--muted) !important;
}

body.page-dark:not(.page-home-fa) main .pagination .btn:not(.active) {
	background: var(--landing-card);
	color: var(--text);
	border: 1px solid var(--line);
}

html.theme-light body.page-dark:not(.page-home-fa) main .posts .post {
	box-shadow: var(--shadow-md, 0 4px 6px rgba(0, 0, 0, 0.1));
}

html.theme-light body.page-dark:not(.page-home-fa) main .post-layout .service-card {
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

@media (max-width: 992px) {
	body.page-dark .header-phone {
		position: static;
		left: auto;
		top: auto;
		transform: none;
		grid-area: search;
		justify-self: center;
		z-index: 1;
		max-width: 100%;
	}
}
