/**
 * AI Magzine — monochrome + Courier Prime typewriter stack (research / editorial).
 */

/* ── Hide theme featured image chrome (lists / widgets / sliders) ──────────── */
.cm-featured-image,
.cm-slider-featured-image,
.cm-featured-category-slider img,
.slider-featured-image,
.featured-widget-slider .featured-image {
	display: none !important;
}

/* ── Map ColorMag palette to monochrome (inherits site-wide) ─────────────── */
body.aim-news-site {
	--aim-ink: #0a0a0a;
	--aim-muted: #525252;
	--aim-border: #d4d4d4;
	--aim-subtle: #fafafa;
	/* Parent theme fallbacks — force neutrals */
	--cm-color-1: #0a0a0a;
	--cm-color-2: #404040;
	--cm-color-3: #e5e5e5;
	--cm-color-5: #171717;
	--cm-color-8: #e5e5e5;
	--cm-color-9: #d4d4d4;
	--color--primary: #0a0a0a;
	/* WordPress core block palette + gradients → grayscale (still used in saved HTML). */
	--wp--preset--color--black: #0a0a0a;
	--wp--preset--color--cyan-bluish-gray: #737373;
	--wp--preset--color--white: #ffffff;
	--wp--preset--color--pale-pink: #e5e5e5;
	--wp--preset--color--vivid-red: #404040;
	--wp--preset--color--luminous-vivid-orange: #525252;
	--wp--preset--color--luminous-vivid-amber: #666666;
	--wp--preset--color--light-green-cyan: #d4d4d4;
	--wp--preset--color--vivid-green-cyan: #a3a3a3;
	--wp--preset--color--pale-cyan-blue: #dcdcdc;
	--wp--preset--color--vivid-cyan-blue: #404040;
	--wp--preset--color--vivid-purple: #464646;
	--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple: linear-gradient(135deg, #eeeeee 0%, #cfcfcf 100%);
	--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan: linear-gradient(135deg, #f2f2f2 0%, #dadada 100%);
	--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange: linear-gradient(135deg, #eaeaea 0%, #d0d0d0 100%);
	--wp--preset--gradient--luminous-vivid-orange-to-vivid-red: linear-gradient(135deg, #e5e5e5 0%, #cccccc 100%);
	--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray: linear-gradient(135deg, #fafafa 0%, #dcdcdc 100%);
	--wp--preset--gradient--cool-to-warm-spectrum: linear-gradient(135deg, #e8e8e8 0%, #cacaca 100%);
	--wp--preset--gradient--blush-light-purple: linear-gradient(135deg, #f0f0f0 0%, #dadada 100%);
	--wp--preset--gradient--blush-bordeaux: linear-gradient(135deg, #ebebeb 0%, #cfcfcf 100%);
	--wp--preset--gradient--purple-to-yellow: linear-gradient(135deg, #e3e3e3 0%, #eaeaea 100%);
	--wp--style--color--link: var(--aim-ink);
	--aim-font-typewriter: "Courier Prime", "Courier New", Courier, monospace;
	line-height: 1.65;
	color: var(--aim-muted);
	background-color: #fff;
	font-family: var(--aim-font-typewriter);
	letter-spacing: 0.02em;
	word-spacing: -0.04em;
}

/* Override theme + Customizer typography (preserve Font Awesome via its own rules). */
body.aim-news-site #page,
body.aim-news-site .cm-layout-2,
body.aim-news-site .cm-primary,
body.aim-news-site .cm-secondary,
body.aim-news-site .cm-contained,
body.aim-news-site .cm-full-width-main-wrapper,
body.aim-news-site .cm-header,
body.aim-news-site .cm-footer,
body.aim-news-site .cm-footer-builder,
body.aim-news-site .cm-top-bar,
body.aim-news-site .cm-description,
body.aim-news-site .cm-entry-summary,
body.aim-news-site .cm-entry-content,
body.aim-news-site .cm-entry-meta,
body.aim-news-site .cm-widget-title,
body.aim-news-site .cm-entry-title,
body.aim-news-site .cm-site-description,
body.aim-news-site .cm-post-categories,
body.aim-news-site .cm-primary-nav,
body.aim-news-site #cm-primary-nav,
body.aim-news-site .cm-pagination,
body.aim-news-site #breadcrumb-wrap,
body.aim-news-site .breadcrumb-wrap,
body.aim-news-site .rank-math-breadcrumb,
body.aim-news-site .posted-on,
body.aim-news-site .byline,
body.aim-news-site .widget {
	font-family: var(--aim-font-typewriter) !important;
}

body.aim-news-site input,
body.aim-news-site select,
body.aim-news-site textarea,
body.aim-news-site button.cm-menu-toggle,
body.aim-news-site .cm-search-toggle {
	font-family: var(--aim-font-typewriter) !important;
}

body.aim-news-site pre,
body.aim-news-site code,
body.aim-news-site kbd,
body.aim-news-site samp {
	font-family: var(--aim-font-typewriter) !important;
}

body.aim-news-site .cm-entry-title a,
body.aim-news-site .cm-post-content .cm-entry-title,
body.aim-news-site .cm-post-content .entry-title {
	color: var(--aim-ink);
}

body.aim-news-site .cm-entry-title a:hover {
	color: #000;
	text-decoration-thickness: 2px;
}

/* Customizer inline colours — do not restyle primary-nav here (sits on dark chrome with white type). */
body.aim-news-site .cm-site-title a,
body.aim-news-site .cm-footer a,
body.aim-news-site .cm-footer-builder a,
body.aim-news-site .cm-entry-meta a {
	color: var(--aim-muted) !important;
}

/* ── Breadcrumbs — light strip + ink links/SVG so home glyph isn’t lost on dark areas ── */
body.aim-news-site #breadcrumb-wrap.breadcrumb-wrap {
	background-color: var(--aim-subtle);
	border-bottom: 1px solid var(--aim-border);
	color: var(--aim-muted);
	margin-bottom: 1.25rem;
	padding-bottom: 0.9rem;
	padding-top: 0.9rem;
}

body.aim-news-site #breadcrumb-wrap .breadcrumb-trail a,
body.aim-news-site #breadcrumb-wrap.breadcrumb-wrap a {
	color: var(--aim-ink) !important;
}

body.aim-news-site #breadcrumb-wrap #breadcrumb-last,
body.aim-news-site #breadcrumb-wrap .breadcrumb-trail ul li:last-child {
	color: var(--aim-muted) !important;
}

body.aim-news-site #breadcrumb-wrap svg path,
body.aim-news-site #breadcrumb-wrap svg,
body.aim-news-site .rank-math-breadcrumb svg path,
body.aim-news-site .rank-math-breadcrumb svg {
	fill: var(--aim-ink) !important;
}

body.aim-news-site .rank-math-breadcrumb {
	background-color: var(--aim-subtle);
	border-bottom: 1px solid var(--aim-border);
	color: var(--aim-muted);
	margin-bottom: 1.25rem;
	padding-bottom: 0.9rem;
	padding-top: 0.9rem;
}

body.aim-news-site .rank-math-breadcrumb a {
	color: var(--aim-ink) !important;
}

body.aim-news-site #breadcrumb-wrap .rank-math-breadcrumb {
	background: transparent;
	border: none;
	margin-bottom: 0;
	padding-bottom: 0;
	padding-top: 0;
}

body.aim-news-site .cm-site-title a:hover,
body.aim-news-site .cm-footer a:hover {
	color: var(--aim-ink) !important;
}

/* Icons (calendar, user…) — Theme often tints SVG with primary blue. */
body.aim-news-site .cm-post-date .cm-icon,
body.aim-news-site .cm-author .cm-icon,
body.aim-news-site .cm-below-entry-meta .cm-icon {
	color: var(--aim-muted);
}

body.aim-news-site .cm-icon path {
	fill: currentColor !important;
}

/* Editorial photos: grayscale (content + widgets; keeps layout colour-free) */
body.aim-news-site .cm-content img,
body.aim-news-site .cm-primary img,
body.aim-news-site .widget img {
	filter: grayscale(100%);
}

body.aim-news-site .custom-logo {
	filter: grayscale(100%);
}

/* ── Text logo — black / white only ───────────────────────────────────────── */
body.aim-news-site .cm-site-title {
	margin-bottom: 0;
	line-height: 1.15;
}

body.aim-news-site .cm-site-title a {
	font-family: var(--aim-font-typewriter);
	text-decoration: none;
	color: var(--aim-ink) !important;
	letter-spacing: 0.04em;
	transition: opacity 0.2s ease;
}

body.aim-news-site .cm-site-title a:hover {
	opacity: 0.75;
}

@media screen and (min-width: 48em) {
	body.aim-news-site .cm-site-title {
		font-size: clamp(1.75rem, 1.2rem + 1.5vw, 2.35rem);
	}
}

@media screen and (max-width: 47.99em) {
	body.aim-news-site .cm-site-title {
		font-size: 1.55rem;
	}
}

body.aim-news-site .aim-logo {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0;
}

body.aim-news-site .aim-logo-ai {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-right: 0.12em;
	padding: 0.1em 0.45em 0.14em;
	border-radius: 0.15em;
	font-weight: 700;
	font-size: 0.88em;
	letter-spacing: 0.12em;
	line-height: 1.1;
	text-transform: uppercase;
	color: #fff;
	background: #0a0a0a;
	border: 2px solid #0a0a0a;
	box-shadow: none;
}

body.aim-news-site .aim-logo-rest {
	font-weight: 700;
	color: var(--aim-ink);
	letter-spacing: -0.04em;
	margin-left: 0.02em;
}

body.aim-news-site .aim-logo-plain .aim-logo-word {
	font-weight: 700;
	color: var(--aim-ink);
}

/* ── Tagline ───────────────────────────────────────────────────────────────── */
body.aim-news-site .aim-site-tagline.cm-site-description,
body.aim-news-site #cm-site-info .aim-site-tagline {
	font-family: var(--aim-font-typewriter);
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.55;
	text-transform: uppercase;
	letter-spacing: 0.22em;
	color: var(--aim-muted);
	margin-top: 0.5rem;
	max-width: 28rem;
}

/* ── Header & masthead ───────────────────────────────────────────────────── */
body.aim-news-site #cm-header-1,
body.aim-news-site .cm-header-builder .cm-main-header {
	border-bottom: 1px solid var(--aim-border);
	background: #fff;
	box-shadow: none;
}

body.aim-news-site #cm-masthead {
	position: relative;
}

body.aim-news-site #cm-masthead::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: #0a0a0a;
	opacity: 1;
	pointer-events: none;
}

body.aim-news-site .cm-header {
	background-color: #fff;
}

/* ── Primary nav (classic + header builder / cm-layout-1 + cm-layout-2) ───── */
body.aim-news-site #cm-primary-nav {
	border-top-color: transparent;
	background: var(--aim-subtle);
	box-shadow: 0 1px 0 var(--aim-border);
}

/* Builder: `.cm-header-bottom-row` uses dark `--cm-color-5`; keep nav transparent there. */
body.aim-news-site header#cm-masthead.cm-header-builder #cm-primary-nav {
	background: transparent !important;
	box-shadow: none !important;
	border-top-width: 0 !important;
}

/*
 * Mobile hamburger drawer: ColorMag sets white type on charcoal rows (#27272A). On narrow
 * viewports our chrome can read as a light panel or clash with the monochrome skin — use
 * a light drawer + ink text everywhere in the masthead `#cm-mobile-nav` only (not footer).
 */
body.aim-news-site header#cm-masthead #cm-mobile-nav.cm-mobile-open-container {
	border: 1px solid var(--aim-border);
}

body.aim-news-site header#cm-masthead #cm-mobile-nav a {
	color: var(--aim-ink) !important;
}

body.aim-news-site header#cm-masthead #cm-mobile-nav li {
	background-color: #ffffff !important;
	border-top-color: var(--aim-border) !important;
}

body.aim-news-site header#cm-masthead #cm-mobile-nav ul ul li,
body.aim-news-site header#cm-masthead #cm-mobile-nav .sub-menu li {
	background-color: var(--aim-subtle) !important;
}

body.aim-news-site header#cm-masthead #cm-mobile-nav li a:hover {
	background-color: var(--aim-subtle) !important;
	color: #000000 !important;
}

body.aim-news-site header#cm-masthead #cm-mobile-nav li.current-page-ancestor > a,
body.aim-news-site header#cm-masthead #cm-mobile-nav li.current-menu-ancestor > a,
body.aim-news-site header#cm-masthead #cm-mobile-nav li.current-page-item > a,
body.aim-news-site header#cm-masthead #cm-mobile-nav li.current-menu-item > a,
body.aim-news-site header#cm-masthead #cm-mobile-nav .current_page_item > a,
body.aim-news-site header#cm-masthead #cm-mobile-nav .current-menu-item > a {
	background-color: #eaeaea !important;
	color: var(--aim-ink) !important;
}

body.aim-news-site header#cm-masthead #cm-mobile-nav .cm-submenu-toggle {
	border-left-color: var(--aim-border);
}

body.aim-news-site header#cm-masthead #cm-mobile-nav .cm-submenu-toggle svg path,
body.aim-news-site header#cm-masthead #cm-mobile-nav .cm-submenu-toggle svg {
	fill: var(--aim-ink) !important;
}

body.aim-news-site header#cm-masthead #cm-mobile-nav li:hover > .cm-sub-toggle i,
body.aim-news-site header#cm-masthead #cm-mobile-nav li.current-menu-item > .cm-sub-toggle i {
	color: var(--aim-ink) !important;
}

body.aim-news-site .cm-primary-nav ul > li > a {
	font-weight: 600;
	font-size: 0.9375rem;
	letter-spacing: 0.03em;
}

/* Header builder masthead nav: dark strip behind links — force light label text */
body.aim-news-site header#cm-masthead.cm-header-builder #cm-primary-nav a {
	color: #ffffff !important;
}

body.aim-news-site header#cm-masthead.cm-header-builder #cm-primary-nav ul li:hover > a,
body.aim-news-site header#cm-masthead.cm-header-builder #cm-primary-nav ul li.focus > a {
	color: #ffffff !important;
	opacity: 0.9;
}

body.aim-news-site header#cm-masthead.cm-header-builder #cm-primary-nav ul > li.current-menu-item > a,
body.aim-news-site header#cm-masthead.cm-header-builder #cm-primary-nav ul > li.current_page_item > a {
	color: #ffffff !important;
	border-bottom-color: rgba(255, 255, 255, 0.55) !important;
}

/* ── Posts & typography ───────────────────────────────────────────────────── */
body.aim-news-site .cm-entry-summary,
body.aim-news-site .cm-entry-content {
	font-size: 1.0625rem;
	line-height: 1.72;
	max-width: 68ch;
}

body.aim-news-site .cm-entry-title,
body.aim-news-site .cm-post-content .entry-title {
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1.35;
}

/* Parent uses background var(--cm-color-1); we remap that to near-black → black-on-black bug. */
body.aim-news-site .cm-post-categories a {
	display: inline-block;
	font-family: var(--aim-font-typewriter);
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--aim-ink) !important;
	background-color: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	text-decoration: none;
	border: 1px solid var(--aim-border);
	border-radius: 2px;
	margin-bottom: 0.35rem;
	padding: 4px 8px;
	line-height: 1.6;
}

body.aim-news-site .cm-post-categories a:hover {
	color: #000 !important;
	background-color: var(--aim-subtle) !important;
	border-color: var(--aim-ink);
}

body.aim-news-site .cm-post-categories + .cm-entry-title {
	margin-top: 0;
}

body.aim-news-site .cm-entry-meta,
body.aim-news-site .cm-entry-meta a {
	color: #737373 !important;
}

body.aim-news-site .cm-posts .post {
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
	border: 1px solid var(--aim-border);
	box-shadow: none;
}

@media (hover: hover) and (pointer: fine) {
	body.aim-news-site .cm-posts .post:hover {
		transform: none;
		box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
		border-color: #a3a3a3;
	}
}

/* ── Links in content & buttons (block / theme) ───────────────────────────── */
body.aim-news-site .cm-entry-content a {
	color: var(--aim-ink) !important;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
}

body.aim-news-site .cm-entry-content a:hover {
	color: #000 !important;
}

body.aim-news-site .widget a {
	color: var(--aim-muted) !important;
}

body.aim-news-site .widget a:hover {
	color: var(--aim-ink) !important;
}

body.aim-news-site a {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

body.aim-news-site .wp-block-button__link,
body.aim-news-site .colormag-button,
body.aim-news-site input[type="submit"],
body.aim-news-site button:not(.cm-menu-toggle):not(.cm-search-toggle) {
	background-color: #0a0a0a !important;
	color: #fff !important;
	border-color: #0a0a0a !important;
}

body.aim-news-site .wp-block-button__link:hover,
body.aim-news-site .colormag-button:hover,
body.aim-news-site input[type="submit"]:hover {
	background-color: #262626 !important;
	border-color: #262626 !important;
	color: #fff !important;
}

/*
 * ColorMag sets .cm-entry-button span:hover { background: rgba(0,0,0,0.1) } for a blue pill.
 * Our --cm-color-1 is black → hover becomes a pale wash under white text → label vanishes.
 */
body.aim-news-site .cm-entry-button span {
	background-color: #0a0a0a !important;
	color: #ffffff !important;
}

body.aim-news-site .cm-entry-button span:hover {
	background-color: #262626 !important;
	color: #ffffff !important;
}

body.aim-news-site .cm-footer,
body.aim-news-site .cm-footer-builder {
	border-top-color: var(--aim-border);
	background-color: var(--aim-subtle);
}

body.aim-news-site .cm-footer .cm-site-description,
body.aim-news-site .cm-footer-builder {
	color: var(--aim-muted);
}

/* ── Singular posts: body lives in `.cm-entry-summary`, not `.cm-entry-content` ──
	   + kill leftover block colours / inline hues from the editor ───────────── */
body.aim-news-site .cm-post-content .cm-entry-summary,
body.aim-news-site .cm-post-content .cm-entry-content {
	--wp--style--color--link: var(--aim-ink);
}

body.aim-news-site .cm-entry-summary .has-inline-color,
body.aim-news-site .cm-entry-content .has-inline-color {
	color: var(--aim-ink) !important;
}

@media (max-width: 768px) {
	body.aim-news-site header#cm-masthead.cm-header-builder .cm-mobile-row button.cm-menu-toggle,
	body.aim-news-site header#cm-masthead.cm-header-builder .cm-mobile-row button.cm-menu-toggle .cm-icon {
		color: #fff !important;
	}
}

body.aim-news-site .cm-entry-summary[class*="has-"],
body.aim-news-site .cm-entry-content[class*="has-"],
body.aim-news-site .cm-entry-summary [class*="has-"][class*="background"],
body.aim-news-site .cm-entry-content [class*="has-"][class*="background"],
body.aim-news-site .widget .wp-block-group[class*="background"],
body.aim-news-site .widget [class*="has-"][class*="background"] {
	background-color: var(--aim-subtle) !important;
	background-image: none !important;
	color: var(--aim-ink) !important;
}

body.aim-news-site .cm-entry-summary [class*="gradient"],
body.aim-news-site .cm-entry-content [class*="gradient"],
body.aim-news-site .widget [class*="gradient"] {
	background-image: linear-gradient(180deg, var(--aim-subtle) 0%, #e0e0e0 100%) !important;
	color: var(--aim-ink) !important;
}

body.aim-news-site .cm-entry-summary [class*="border-color"]:not(img),
body.aim-news-site .cm-entry-content [class*="border-color"]:not(img) {
	border-color: var(--aim-border) !important;
}

body.aim-news-site .cm-entry-summary [style*="linear-gradient"],
body.aim-news-site .cm-entry-content [style*="linear-gradient"],
body.aim-news-site .widget [style*="linear-gradient"] {
	background-image: linear-gradient(180deg, #f2f2f2 0%, #dcdcdc 100%) !important;
}

body.aim-news-site .cm-entry-summary [style*="background-color"]:not(pre):not(.wp-block-code),
body.aim-news-site .cm-entry-content [style*="background-color"]:not(pre):not(.wp-block-code) {
	background-image: none !important;
	background-color: var(--aim-subtle) !important;
	color: var(--aim-ink) !important;
}

body.aim-news-site .cm-entry-summary [style*="color:"]:not(pre):not(.wp-block-code),
body.aim-news-site .cm-entry-content [style*="color:"]:not(pre):not(.wp-block-code) {
	color: var(--aim-ink) !important;
}

body.aim-news-site .cm-entry-summary .wp-block-quote,
body.aim-news-site .cm-entry-content .wp-block-quote {
	border-left-color: var(--aim-ink) !important;
	color: inherit;
}

body.aim-news-site .cm-entry-summary .wp-block-quote cite,
body.aim-news-site .cm-entry-content .wp-block-quote cite {
	color: var(--aim-muted) !important;
}

body.aim-news-site .cm-entry-summary .wp-block-cover,
body.aim-news-site .cm-entry-content .wp-block-cover {
	min-height: 0 !important;
}

body.aim-news-site .cm-entry-summary .wp-block-cover > .wp-block-cover__background,
body.aim-news-site .cm-entry-summary .wp-block-cover .wp-block-cover__image-background,
body.aim-news-site .cm-entry-content .wp-block-cover > .wp-block-cover__background,
body.aim-news-site .cm-entry-content .wp-block-cover .wp-block-cover__image-background {
	filter: grayscale(100%) !important;
}

body.aim-news-site .cm-entry-summary mark,
body.aim-news-site .cm-entry-content mark {
	background-color: #d4d4d4 !important;
	color: var(--aim-ink) !important;
}

body.aim-news-site .cm-entry-summary .wp-block-pullquote blockquote {
	border-left-color: var(--aim-border) !important;
}
