/**
 * CarFaultIQ V9 inner-page shell.
 * Fully scoped and independently removable through the cfiq_site_shell_v9 filter.
 */

body.cfiq-shell9-on {
	--cfiq-shell9-navy: #06121f;
	--cfiq-shell9-navy-2: #0b1d30;
	--cfiq-shell9-line: rgba(120, 196, 246, .28);
	--cfiq-shell9-blue: #4aa8ff;
	--cfiq-shell9-cyan: #8fdcff;
}

/* Shared V9 header, compact inner-page mode. */
.cfiq-shell9-on .cfiq-site-header--inner {
	position: sticky;
	top: 0;
	z-index: 1000;
	height: 70px;
	border-bottom: 1px solid var(--cfiq-shell9-line);
	background:
		radial-gradient(circle at 78% -80%, rgba(45, 144, 230, .2), transparent 48%),
		linear-gradient(100deg, #04101d, var(--cfiq-shell9-navy-2) 58%, #071626);
	box-shadow: 0 16px 38px rgba(3, 10, 20, .18);
}

.admin-bar.cfiq-shell9-on .cfiq-site-header--inner { top: 32px; }

.cfiq-shell9-on .cfiq-site-header--inner .shell {
	width: min(1520px, calc(100% - 64px));
	margin-inline: auto;
}

.cfiq-shell9-on .cfiq-site-header--inner .header-inner {
	position: relative;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: clamp(1rem, 2vw, 2rem);
	height: 100%;
}

.cfiq-shell9-on .cfiq-site-header--inner .brand {
	justify-self: start;
	color: #f4f8fc;
	font-size: clamp(1.45rem, 2vw, 1.75rem);
	font-weight: 720;
	letter-spacing: -.03em;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}

.cfiq-shell9-on .cfiq-site-header--inner .brand span { color: var(--cfiq-shell9-blue); }

.cfiq-shell9-on .cfiq-site-header--inner .direct-nav {
	display: flex;
	justify-content: flex-end;
	gap: clamp(.9rem, 1.8vw, 1.8rem);
}

.cfiq-shell9-on .cfiq-site-header--inner .direct-nav a {
	padding: .7rem 0;
	color: #c2d2e0;
	font-size: .7rem;
	font-weight: 650;
	letter-spacing: .09em;
	text-decoration: none;
	text-transform: uppercase;
	transition: color .2s;
	white-space: nowrap;
}

.cfiq-shell9-on .cfiq-site-header--inner .direct-nav a:hover,
.cfiq-shell9-on .cfiq-site-header--inner .direct-nav a:focus-visible { color: #fff; }

.cfiq-shell9-on .cfiq-site-header--inner .menu-toggle {
	display: inline-flex;
	grid-column: 3;
	justify-self: end;
	align-items: center;
	gap: .6rem;
	min-height: 44px;
	padding: 0 1.15rem 0 1rem;
	border: 1px solid rgba(120, 205, 255, .5);
	border-radius: 999px;
	background: rgba(8, 26, 42, .72);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	color: #eef8ff;
	font: inherit;
	font-size: .8rem;
	font-weight: 720;
	letter-spacing: .04em;
	cursor: pointer;
	transition: border-color .2s, background .2s;
}

.cfiq-shell9-on .cfiq-site-header--inner .menu-toggle:hover,
.cfiq-shell9-on .cfiq-site-header--inner .menu-toggle[aria-expanded="true"] {
	border-color: rgba(150, 222, 255, .9);
	background: rgba(14, 40, 62, .9);
}

.cfiq-shell9-on .cfiq-site-header--inner .menu-toggle__bars { display: grid; gap: 4px; width: 18px; }
.cfiq-shell9-on .cfiq-site-header--inner .menu-toggle__bars i { display: block; height: 2px; border-radius: 2px; background: var(--cfiq-shell9-cyan); transition: transform .25s ease, opacity .2s; }
.cfiq-shell9-on .cfiq-site-header--inner .menu-toggle[aria-expanded="true"] .menu-toggle__bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.cfiq-shell9-on .cfiq-site-header--inner .menu-toggle[aria-expanded="true"] .menu-toggle__bars i:nth-child(2) { opacity: 0; }
.cfiq-shell9-on .cfiq-site-header--inner .menu-toggle[aria-expanded="true"] .menu-toggle__bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.cfiq-shell9-on .cfiq-site-header--inner .menu-panel {
	display: none;
	position: absolute;
	top: 62px;
	right: 0;
	z-index: 30;
	min-width: 270px;
	max-height: calc(100svh - 96px);
	overflow: auto;
	padding: .45rem 1.1rem;
	border: 1px solid var(--cfiq-shell9-line);
	border-radius: 14px;
	background: rgba(5, 16, 29, .98);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	box-shadow: 0 24px 60px rgba(0, 0, 0, .42);
}

.cfiq-shell9-on .cfiq-site-header--inner .menu-panel.is-open { display: block; }
html:not(.cfiq-js) .cfiq-shell9-on .cfiq-site-header--inner .menu-panel { display: block; position: static; margin-left: auto; box-shadow: none; }
.cfiq-shell9-on .cfiq-site-header--inner .menu-panel__list,
.cfiq-shell9-on .cfiq-site-header--inner .menu-panel ul { margin: 0; padding: 0; list-style: none; }
.cfiq-shell9-on .cfiq-site-header--inner .menu-panel a { display: block; padding: .76rem .1rem; border-bottom: 1px solid rgba(140, 190, 225, .12); color: #dbe8f3; font-size: .76rem; font-weight: 640; letter-spacing: .075em; text-decoration: none; text-transform: uppercase; }
.cfiq-shell9-on .cfiq-site-header--inner .menu-panel li:last-child > a { border-bottom: 0; }
.cfiq-shell9-on .cfiq-site-header--inner .menu-panel a:hover,
.cfiq-shell9-on .cfiq-site-header--inner .menu-panel a:focus-visible { color: #fff; }
.cfiq-shell9-on .cfiq-site-header--inner .menu-panel .current-menu-item > a,
.cfiq-shell9-on .cfiq-site-header--inner .menu-panel .cfiq-nav__item--diagnose > a { color: var(--cfiq-shell9-cyan); }

@media (min-width: 1100px) {
	.cfiq-shell9-on .cfiq-site-header--inner .menu-panel .cfiq-h9-dup { display: none; }
}

@media (max-width: 1099px) {
	.cfiq-shell9-on .cfiq-site-header--inner .direct-nav { display: none; }
	.cfiq-shell9-on .cfiq-site-header--inner .shell { width: min(1000px, calc(100% - 48px)); }
}

@media (max-width: 782px) {
	.admin-bar.cfiq-shell9-on .cfiq-site-header--inner { top: 46px; }
}

@media (max-width: 600px) {
	.admin-bar.cfiq-shell9-on .cfiq-site-header--inner { top: 0; }
	.cfiq-shell9-on .cfiq-site-header--inner { height: 66px; }
	.cfiq-shell9-on .cfiq-site-header--inner .shell { width: calc(100% - 32px); }
	.cfiq-shell9-on .cfiq-site-header--inner .brand { font-size: 1.4rem; }
	.cfiq-shell9-on .cfiq-site-header--inner .menu-toggle { min-height: 42px; padding-inline: .9rem 1rem; }
	.cfiq-shell9-on .cfiq-site-header--inner .menu-panel { top: 58px; right: 0; width: min(310px, calc(100vw - 32px)); min-width: 0; }
}

/* Concise V9 masthead treatment; all reading surfaces below stay light. */
.cfiq-shell9-on :is(.cfiq-intro, .cfiq-article__header, .cfiq-archive__header) {
	position: relative;
	overflow: hidden;
	padding: clamp(1.35rem, 3vw, 2.1rem);
	border: 1px solid rgba(79, 164, 230, .24);
	border-radius: 20px;
	background:
		radial-gradient(circle at 88% 4%, rgba(56, 158, 246, .19), transparent 34%),
		linear-gradient(120deg, #06121f, #0c2035 68%, #0a1929);
	box-shadow: 0 22px 56px rgba(6, 18, 31, .17);
	color: #f4f8fc;
}

.cfiq-shell9-on :is(.cfiq-intro, .cfiq-article__header, .cfiq-archive__header)::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 2px;
	background: linear-gradient(90deg, var(--cfiq-shell9-blue), var(--cfiq-shell9-cyan), transparent 72%);
}

.cfiq-shell9-on :is(.cfiq-intro, .cfiq-article__header, .cfiq-archive__header) :is(h1, .cfiq-h1) {
	color: #f4f8fc;
	font-weight: 700;
	letter-spacing: -.028em;
	text-shadow: 0 8px 30px rgba(0, 0, 0, .24);
}

.cfiq-shell9-on :is(.cfiq-intro, .cfiq-article__header, .cfiq-archive__header) :is(p, .cfiq-intro__lede, .cfiq-archive__desc, .cfiq-px__lede) { color: #b9cddd; }
.cfiq-shell9-on :is(.cfiq-intro, .cfiq-article__header, .cfiq-archive__header) a { color: #a8dcff; }
.cfiq-shell9-on :is(.cfiq-intro, .cfiq-article__header, .cfiq-archive__header) .cfiq-eyebrow { color: var(--cfiq-shell9-cyan); }
.cfiq-shell9-on .cfiq-article__header .cfiq-code-chip { border-color: rgba(143, 220, 255, .32); background: rgba(143, 220, 255, .1); color: #eaf7ff; }
.cfiq-shell9-on .cfiq-article__header .cfiq-code-chip__dot { background: var(--cfiq-shell9-cyan); }

/* Diagnostic pathways: V9 glass language, restrained within light pages. */
.cfiq-shell9-on .cfiq-discovery,
.cfiq-shell9-on .cfiq-next-actions {
	padding: clamp(1rem, 2.5vw, 1.35rem);
	border: 1px solid var(--cfiq-shell9-line);
	border-radius: 20px;
	background: linear-gradient(135deg, #071523, #102840);
	box-shadow: 0 22px 54px rgba(3, 10, 20, .18);
	color: #eef7ff;
}

.cfiq-shell9-on .cfiq-discovery :is(.cfiq-h2, .cfiq-discovery__head p),
.cfiq-shell9-on .cfiq-next-actions :is(.cfiq-h2, .cfiq-eyebrow) { color: inherit; }
.cfiq-shell9-on .cfiq-discovery__card,
.cfiq-shell9-on .cfiq-next-card { border-color: rgba(122, 196, 246, .2); background: rgba(255, 255, 255, .055); color: #eef7ff; box-shadow: none; }
.cfiq-shell9-on .cfiq-discovery__card:hover,
.cfiq-shell9-on .cfiq-discovery__card:focus-visible,
.cfiq-shell9-on .cfiq-next-card:hover,
.cfiq-shell9-on .cfiq-next-card:focus-visible { border-color: rgba(143, 220, 255, .5); background: rgba(65, 169, 246, .12); box-shadow: 0 14px 28px rgba(0, 0, 0, .18); }
.cfiq-shell9-on .cfiq-discovery__icon,
.cfiq-shell9-on .cfiq-next-card__icon { border-color: rgba(143, 220, 255, .25); background: rgba(143, 220, 255, .1); color: var(--cfiq-shell9-cyan); }
.cfiq-shell9-on .cfiq-discovery__body small,
.cfiq-shell9-on .cfiq-next-card__text { color: #aec4d6; }
.cfiq-shell9-on .cfiq-discovery__arrow,
.cfiq-shell9-on .cfiq-next-card__arrow { color: var(--cfiq-shell9-cyan); }

/* Triage remains light and calm, but now shares the V9 edge and chip vocabulary. */
.cfiq-shell9-on .cfiq-triage { border: 1px solid rgba(42, 132, 205, .22); border-left: 4px solid var(--cfiq-shell9-blue); background: linear-gradient(180deg, #f6fbff, #edf5fb); box-shadow: 0 16px 38px rgba(6, 18, 31, .09); }
.cfiq-shell9-on .cfiq-triage__cause,
.cfiq-shell9-on .cfiq-triage__tile { border-color: rgba(42, 132, 205, .18); box-shadow: 0 7px 18px rgba(6, 18, 31, .045); }
.cfiq-shell9-on .cfiq-triage__tag { border: 1px solid rgba(42, 132, 205, .12); }

/* Problem Explorer destination links and diagnostic code shortcuts. */
.cfiq-shell9-on .cfiq-px__next { border-color: rgba(42, 132, 205, .2); background: linear-gradient(180deg, #f7fbff, #eef6fc); }
.cfiq-shell9-on .cfiq-px__nextlist a,
.cfiq-shell9-on .cfiq-px__poplist a,
.cfiq-shell9-on .cfiq-px__code a { text-decoration-color: rgba(47, 143, 218, .42); text-underline-offset: .2em; }
.cfiq-shell9-on :is(.cfiq-code-chip, .cfiq-px__codeid) { border-radius: 999px; }

@media (max-width: 700px) {
	.cfiq-shell9-on :is(.cfiq-intro, .cfiq-article__header, .cfiq-archive__header) { padding: 1.2rem; border-radius: 16px; }
	.cfiq-shell9-on .cfiq-discovery,
	.cfiq-shell9-on .cfiq-next-actions { border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.cfiq-shell9-on .cfiq-site-header--inner *,
	.cfiq-shell9-on .cfiq-discovery__card,
	.cfiq-shell9-on .cfiq-next-card { scroll-behavior: auto !important; transition: none !important; }
}
