/* Main-site breadcrumb typography is shared across all theme selections.
 * The school section keeps its own typography and colour rules. */
:is(.ij-service-breadcrumbs, .ij-standard-breadcrumbs, .ij-news-breadcrumbs,
.ij-resource-breadcrumbs, .ij-op-product__breadcrumbs) {
	font-family: "DM Sans", sans-serif;
	font-size: 14px;
	font-style: normal;
	font-weight: 500;
	letter-spacing: 0;
	line-height: 1.5;
	text-transform: none;
}

:is(.ij-service-breadcrumbs, .ij-standard-breadcrumbs, .ij-news-breadcrumbs,
.ij-resource-breadcrumbs, .ij-op-product__breadcrumbs) > * {
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
}

/* Palette and layout previews apply to the colour previews. :where() preserves
 * specificity so the separate theme files can override these rules. */
html[data-ij-theme]:where(:not([data-ij-theme="original"])) {
	color-scheme: light;
	--ij-theme-font: "DM Sans", sans-serif;
	--ij-banner-header-offset: var(--ij-theme-header-height, 138px);
	--ij-banner-top-inset: 32px;
	--ij-home-ink: var(--ij-theme-ink);
	--ij-home-dark: var(--ij-theme-primary-dark);
	--ij-home-teal: var(--ij-theme-primary);
	--ij-home-mint: var(--ij-theme-soft);
	--ij-home-sand: var(--ij-theme-alt);
	--ij-home-line: var(--ij-theme-line);
	--ij-ink: var(--ij-theme-ink);
	--ij-muted: var(--ij-theme-muted);
	--ij-teal: var(--ij-theme-primary);
	--ij-teal-dark: var(--ij-theme-primary-dark);
	--ij-mint: var(--ij-theme-soft);
	--ij-sand: var(--ij-theme-alt);
	--ij-line: var(--ij-theme-line);
	--ij-radius: var(--ij-theme-radius);
	--ijl-ink: var(--ij-theme-ink);
	--ijl-muted: var(--ij-theme-muted);
	--ijl-dark: var(--ij-theme-primary-dark);
	--ijn-ink: var(--ij-theme-ink);
	--ijn-muted: var(--ij-theme-muted);
	--ijn-teal: var(--ij-theme-primary);
	--ijn-dark: var(--ij-theme-primary-dark);
	--ijn-mint: var(--ij-theme-soft);
	--ijn-sand: var(--ij-theme-alt);
	--ijn-line: var(--ij-theme-line);
	--ij-resource-ink: var(--ij-theme-ink);
	--ij-resource-green: var(--ij-theme-primary-dark);
	--ij-resource-mint: var(--ij-theme-soft);
	--ij-resource-cream: var(--ij-theme-alt);
	--ij-resource-gold: var(--ij-theme-accent);
	--ij-resource-line: var(--ij-theme-line);
	--ast-global-color-0: var(--ij-theme-primary);
	--ast-global-color-1: var(--ij-theme-primary-dark);
	--ast-global-color-2: var(--ij-theme-ink);
	--ast-global-color-3: var(--ij-theme-muted);
	--ast-global-color-4: var(--ij-theme-soft);
	--ast-global-color-5: #fff;
	--ast-global-color-6: var(--ij-theme-alt);
	--ast-global-color-7: var(--ij-theme-ink);
	--ast-global-color-8: var(--ij-theme-line);
}

/* School content has its own palette; shared site chrome uses the selected theme. */
html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-school {
	--ast-global-color-0: var(--school-plum);
	--ast-global-color-1: var(--school-plum-dark);
	--ast-global-color-2: var(--school-ink);
	--ast-global-color-3: var(--school-muted);
	--ast-global-color-4: var(--school-lilac);
	--ast-global-color-5: var(--school-white);
	--ast-global-color-6: var(--school-cream);
	--ast-global-color-7: var(--school-ink);
	--ast-global-color-8: var(--school-line);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) body {
	background: #fff;
	color: var(--ij-theme-ink);
	font-family: var(--ij-theme-font);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) #primary :is(h1, h2, h3, h4, h5, h6),
html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-super-footer :is(h2, h3),
html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(button, input, select, textarea) {
	font-family: var(--ij-theme-font);
}

/* English and Traditional Chinese trails follow Home, section, then page. */
html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(
	.ij-service-breadcrumbs, .ij-standard-breadcrumbs, .ij-news-breadcrumbs,
	.ij-resource-breadcrumbs, .ij-op-product__breadcrumbs
) {
	display: flex;
	direction: ltr;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 6px 10px;
	overflow: visible;
	color: var(--ij-theme-muted);
	text-align: start;
	white-space: normal;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(
	.ij-service-breadcrumbs, .ij-standard-breadcrumbs, .ij-news-breadcrumbs,
	.ij-resource-breadcrumbs, .ij-op-product__breadcrumbs
) > * {
	order: 0;
	max-inline-size: 100%;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(
	.ij-service-breadcrumbs, .ij-standard-breadcrumbs, .ij-news-breadcrumbs,
	.ij-resource-breadcrumbs, .ij-op-product__breadcrumbs
) > span:nth-child(even) {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	font-size: 0;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(
	.ij-service-breadcrumbs, .ij-standard-breadcrumbs, .ij-news-breadcrumbs,
	.ij-resource-breadcrumbs, .ij-op-product__breadcrumbs
) > span:nth-child(even)::before {
	content: "\203A";
	font-size: 17px;
	font-weight: 500;
	line-height: 1;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(
	.ij-service-breadcrumbs, .ij-standard-breadcrumbs, .ij-news-breadcrumbs,
	.ij-resource-breadcrumbs, .ij-op-product__breadcrumbs
) > span:last-child {
	overflow: visible;
	white-space: normal;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(
	.ij-service-breadcrumbs, .ij-standard-breadcrumbs, .ij-news-breadcrumbs,
	.ij-resource-breadcrumbs, .ij-op-product__breadcrumbs
) a {
	color: inherit;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(
	.ij-standard-hero.has-featured-image, .ij-services-index__hero.has-featured-image,
	.ij-news-hero.has-featured-image, .ij-service-hero--with-image
) :is(.ij-standard-breadcrumbs, .ij-service-breadcrumbs, .ij-news-breadcrumbs) {
	color: #e1edf4;
}

/* A solid header keeps the original blue/green artwork legible on every page. */
html[data-ij-theme]:where(:not([data-ij-theme="original"])) body #masthead {
	position: relative;
	inset: auto;
	width: 100%;
	border-block-start: 0;
	background: var(--ij-theme-header) !important;
	box-shadow: 0 1px 0 var(--ij-theme-line);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) #masthead :is(.ast-above-header-bar, .ast-primary-header-bar, .ast-mobile-header-content) {
	background: var(--ij-theme-header) !important;
	border-color: var(--ij-theme-line);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) #masthead .ast-primary-header-bar {
	margin-block-end: 0 !important;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) #masthead .ij-custom-logo {
	filter: none !important;
	-webkit-filter: none !important;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) #masthead .ij-custom-logo-link {
	width: clamp(88px, 8vw, 112px);
	padding: 6px;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) #masthead :is(.menu-link, .ast-icon, .ast-search-menu-icon, .main-header-menu-toggle) {
	color: var(--ij-theme-ink) !important;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) #masthead .main-header-menu-toggle {
	border: 1px solid var(--ij-theme-line);
	background: var(--ij-theme-soft);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) #masthead .ast-mobile-svg {
	fill: var(--ij-theme-ink) !important;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) #masthead .header-social-item svg {
	fill: var(--ij-theme-primary) !important;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) #mega-menu-wrap-primary,
html[data-ij-theme]:where(:not([data-ij-theme="original"])) #mega-menu-wrap-primary #mega-menu-primary {
	background: transparent;
}

@media (min-width: 922px) {
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) #mega-menu-wrap-primary,
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) #mega-menu-wrap-primary #mega-menu-primary,
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) #mega-menu-wrap-primary #mega-menu-primary > :is(.mega-ij-services-menu, .mega-ij-resources-menu) {
		position: static;
	}
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) #mega-menu-wrap-primary #mega-menu-primary :is(.mega-ij-services-menu, .mega-ij-resources-menu) > ul.mega-sub-menu {
		width: min(1192px, calc(100vw - 48px)) !important;
	}
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link {
	height: auto;
	min-height: 44px;
	color: var(--ij-theme-ink) !important;
	line-height: 1.4;
	padding-block: 12px;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) #mega-menu-wrap-primary #mega-menu-primary :is(.mega-ij-service-link, .mega-ij-resource-link) > a.mega-menu-link {
	color: var(--ij-theme-ink) !important;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) #mega-menu-wrap-primary #mega-menu-primary :is(.mega-ij-services-menu, .mega-ij-resources-menu) > ul.mega-sub-menu {
	border-color: var(--ij-theme-line);
	background: var(--ij-theme-wash);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) #mega-menu-wrap-primary #mega-menu-primary li.mega-ij-mega-group > a.mega-menu-link,
html[data-ij-theme]:where(:not([data-ij-theme="original"])) #mega-menu-wrap-primary #mega-menu-primary li.mega-ij-resource-link > a.mega-menu-link::before {
	color: var(--ij-theme-primary-dark) !important;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-language-switcher,
html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ast-header-search .astra-search-icon {
	border-color: var(--ij-theme-line);
	background: var(--ij-theme-soft);
	color: var(--ij-theme-ink);
	box-shadow: none;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-language-switcher__link {
	min-height: 34px;
	color: var(--ij-theme-primary-dark) !important;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-language-switcher__link.is-current {
	background: var(--ij-theme-primary);
	color: #fff !important;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-language-switcher__link:hover {
	background: var(--ij-theme-line);
	color: var(--ij-theme-primary-dark) !important;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ast-header-search .ast-search-menu-icon .search-submit {
	background: var(--ij-theme-primary) !important;
}

/* Match Original's total header/banner area. The previews' solid header is
 * in normal flow, so its measured height is reserved once, inside that area.
 * Content can still grow if a translated slide needs more room. */
html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-carousel {
	--ij-banner-min-height: max(660px, min(820px, 92vh));
	--ij-banner-padding-end: clamp(84px, 9vw, 118px);
	height: auto;
	min-height: max(0px, calc(var(--ij-banner-min-height) - var(--ij-banner-header-offset)));
	background: var(--ij-theme-primary-dark);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-carousel__slides {
	position: relative;
	display: grid;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-carousel__slide {
	position: relative;
	inset: auto;
	grid-area: 1 / 1;
	min-width: 0;
	min-height: max(0px, calc(var(--ij-banner-min-height) - var(--ij-banner-header-offset)));
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(.ij-home-carousel__shade, .ij-home-hero__shade) {
	background: var(--ij-theme-hero);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-carousel__content {
	align-self: flex-end;
	padding-block: var(--ij-banner-top-inset) var(--ij-banner-padding-end);
	padding-inline: max(24px, env(safe-area-inset-left)) max(100px, env(safe-area-inset-right));
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-hero {
	--ij-banner-min-height: min(820px, 92vh);
	--ij-banner-padding-end: clamp(70px, 9vw, 120px);
	min-height: max(0px, calc(var(--ij-banner-min-height) - var(--ij-banner-header-offset)));
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-hero__inner {
	padding-block: var(--ij-banner-top-inset) var(--ij-banner-padding-end);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-button {
	gap: 10px;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-carousel__summary {
	max-width: 690px;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-carousel .ij-home-eyebrow {
	color: #e1edf4;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-carousel__controls {
	inset-inline: auto max(24px, calc((100vw - 1192px) / 2));
	bottom: 42px;
	gap: 12px;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-carousel__arrow,
html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-carousel__dots {
	border-color: rgba(255, 255, 255, .6);
	background: rgba(16, 42, 59, .4);
	color: #fff;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-carousel__dots {
	gap: 0;
	padding: 0 4px;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-carousel__dots button {
	position: relative;
	width: 24px;
	height: 44px;
	border-radius: 0;
	background: transparent;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-carousel__dots button::before {
	content: "";
	position: absolute;
	inset: 18px 8px;
	border-radius: 8px;
	background: #fff;
	opacity: .5;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-carousel__dots button.is-active::before {
	inset-inline: 3px;
	opacity: 1;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-pathways {
	width: min(1192px, calc(100% - 48px));
	margin-inline: auto;
	border-color: var(--ij-theme-line);
	border-radius: var(--ij-theme-radius);
	background: var(--ij-theme-wash);
	box-shadow: var(--ij-theme-shadow);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-pathways > div {
	min-width: 0;
	border-color: var(--ij-theme-line);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-pathways > div::before {
	color: var(--ij-theme-accent);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(.ij-home-pathways span, .ij-home-service-card__summary, .ij-home-news-card p,
.ij-home-news-card__meta, .ij-home-mission__content > p:not(.ij-home-eyebrow), .ij-home-flexible p, .ij-home-flexible li) {
	color: var(--ij-theme-muted);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(.ij-home-service-card, .ij-home-news-card, .ij-feature-card, .ij-news-card,
.ij-blog-card, .ij-download-card, .ij-resource-paths a) {
	min-width: 0;
	border-color: var(--ij-theme-line);
	border-radius: var(--ij-theme-radius);
	box-shadow: var(--ij-theme-shadow);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-service-card__summary {
	display: block;
	overflow: visible;
	-webkit-line-clamp: unset;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-service-card__number {
	color: var(--ij-theme-accent);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(.ij-home-news-card__media, .ij-news-card__media, .ij-feature-card__media--empty) {
	background: var(--ij-theme-wash);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(.ij-home-cta, .ij-landing-cta, .ij-contact-action) {
	background: var(--ij-theme-cta);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(.ij-home-cta, .ij-landing-cta, .ij-contact-action) h2 {
	color: var(--ij-theme-ink);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(.ij-home-cta, .ij-landing-cta, .ij-contact-action) :is(.ij-home-eyebrow, .ij-standard-eyebrow) {
	color: var(--ij-theme-primary-dark) !important;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-contact-action > div > p:last-child {
	color: var(--ij-theme-muted);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(.ij-standard-hero, .ij-services-index__hero, .ij-service-hero,
.ij-news-hero, .ij-article-header, .ij-resources-hero) {
	background: var(--ij-theme-wash);
}

/* Original's responsive spacing and minimums, before its overlaid header.
 * Move the reserved header space after the breadcrumb so it stays near the
 * banner's leading edge without enlarging the whole header/banner area. */
html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(.ij-standard-hero, .ij-news-hero) {
	--ij-banner-min-height: 0px;
	--ij-banner-padding-start: clamp(150px, 14vw, 190px);
	--ij-banner-padding-end: clamp(72px, 8vw, 108px);
	--ij-banner-breadcrumb-gap: 48px;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-news-hero {
	--ij-banner-min-height: 590px;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-services-index__hero {
	--ij-banner-min-height: 590px;
	--ij-banner-padding-start: clamp(154px, 14vw, 190px);
	--ij-banner-padding-end: clamp(72px, 8vw, 112px);
	--ij-banner-breadcrumb-gap: 46px;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-service-hero {
	--ij-banner-min-height: 460px;
	--ij-banner-padding-start: clamp(154px, 14vw, 190px);
	--ij-banner-padding-end: clamp(70px, 8vw, 110px);
	--ij-banner-breadcrumb-gap: 46px;
	min-height: max(0px, calc(var(--ij-banner-min-height) - var(--ij-banner-header-offset)));
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-service-hero--with-image {
	--ij-banner-min-height: 720px;
	--ij-banner-padding-start: clamp(170px, 14vw, 210px);
	--ij-banner-padding-end: clamp(72px, 7vw, 96px);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-service-hero--detail {
	--ij-banner-min-height: 590px;
	--ij-banner-padding-end: clamp(64px, 7vw, 88px);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-article-header {
	--ij-banner-padding-start: clamp(205px, 17vw, 235px);
	--ij-banner-padding-end: clamp(58px, 7vw, 88px);
	--ij-banner-breadcrumb-gap: 48px;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-resources-hero {
	--ij-banner-padding-start: 190px;
	--ij-banner-padding-end: 84px;
	--ij-banner-breadcrumb-gap: 54px;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-resources-hero--compact {
	--ij-banner-padding-end: 64px;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-resource-article header {
	--ij-banner-padding-start: 190px;
	--ij-banner-padding-end: 75px;
	--ij-banner-breadcrumb-gap: 54px;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(.ij-standard-hero, .ij-services-index__hero, .ij-news-hero) {
	padding-block: 0;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(
	.ij-services-index__hero-inner, .ij-standard-hero .ij-standard-shell,
	.ij-news-hero .ij-news-shell
) {
	display: flex;
	min-height: max(0px, calc(var(--ij-banner-min-height) - var(--ij-banner-header-offset)));
	flex-direction: column;
	padding-block: var(--ij-banner-top-inset) var(--ij-banner-padding-end);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-service-hero .ij-service-hero__content {
	padding-block: var(--ij-banner-top-inset) var(--ij-banner-padding-end);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-service-hero--with-image .ij-service-hero__content {
	min-height: max(0px, calc(var(--ij-banner-min-height) - var(--ij-banner-header-offset)));
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(
	.ij-standard-hero, .ij-services-index__hero, .ij-news-hero, .ij-service-hero,
	.ij-article-header, .ij-resources-hero, .ij-resource-article header
) :is(.ij-standard-breadcrumbs, .ij-service-breadcrumbs, .ij-news-breadcrumbs, .ij-resource-breadcrumbs) {
	margin-block: 0 auto;
	padding-block: 0 max(12px, calc(var(--ij-banner-padding-start) - var(--ij-banner-header-offset) - var(--ij-banner-top-inset) + var(--ij-banner-breadcrumb-gap) - var(--ij-banner-breadcrumb-extra, 0px)));
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-service-breadcrumbs {
	gap: 8px;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-resource-breadcrumbs {
	gap: 10px;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(
	.ij-article-header, .ij-resources-hero, .ij-resource-article header
) {
	padding-block: var(--ij-banner-top-inset) var(--ij-banner-padding-end);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(.ij-standard-hero, .ij-services-index__hero, .ij-news-hero).has-featured-image {
	background-image: var(--ij-theme-hero), var(--ij-landing-image);
	background-position: center;
	background-size: cover;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-service-hero--with-image {
	align-items: stretch;
	background: var(--ij-theme-primary-dark);
}

/* Legacy service templates include fixed eucalyptus colours. A/B use their
 * selected palette throughout; Original, C and the school stay independent. */
html:is([data-ij-theme="a"], [data-ij-theme="b"], [data-ij-theme="authentic"], [data-ij-theme="authentic-blue-banner"], [data-ij-theme="authentic-no-banner"]) .ij-service-hero--with-image::after {
	background: var(--ij-theme-hero);
}

html:is([data-ij-theme="a"], [data-ij-theme="b"], [data-ij-theme="authentic"], [data-ij-theme="authentic-blue-banner"], [data-ij-theme="authentic-no-banner"]) :is(
	.ij-services-index__hero.has-featured-image .ij-services-index__eyebrow,
	.ij-service-hero--with-image .ij-service-hero__eyebrow,
	.ij-services-index__hero.has-featured-image .ij-service-breadcrumbs a,
	.ij-service-hero--with-image .ij-service-breadcrumbs a,
	.ij-op-shop__notice > div > p
) {
	color: var(--ij-theme-soft);
}

html:is([data-ij-theme="a"], [data-ij-theme="b"], [data-ij-theme="authentic"], [data-ij-theme="authentic-blue-banner"], [data-ij-theme="authentic-no-banner"]) .ij-services-index__contact {
	background: var(--ij-theme-cta);
}

html:is([data-ij-theme="a"], [data-ij-theme="b"], [data-ij-theme="authentic"], [data-ij-theme="authentic-blue-banner"], [data-ij-theme="authentic-no-banner"]) .ij-services-index__contact h2 {
	color: var(--ij-theme-ink);
}

html:is([data-ij-theme="a"], [data-ij-theme="b"], [data-ij-theme="authentic"], [data-ij-theme="authentic-blue-banner"], [data-ij-theme="authentic-no-banner"]) :is(
	.ij-services-index__contact > div > p,
	.ij-op-shop__catalogue-head > div > p:not(:last-child),
	.ij-feature-card__media--empty span
) {
	color: var(--ij-theme-primary-dark);
}

html:is([data-ij-theme="a"], [data-ij-theme="b"], [data-ij-theme="authentic"], [data-ij-theme="authentic-blue-banner"], [data-ij-theme="authentic-no-banner"]) .ij-service-content :is(p, li) {
	color: var(--ij-theme-muted);
}

html:is([data-ij-theme="a"], [data-ij-theme="b"], [data-ij-theme="authentic"], [data-ij-theme="authentic-blue-banner"], [data-ij-theme="authentic-no-banner"]) :is(
	.ij-service-contact dl > div, .ij-service-card
) {
	border-color: var(--ij-theme-line);
}

html:is([data-ij-theme="a"], [data-ij-theme="b"], [data-ij-theme="authentic"], [data-ij-theme="authentic-blue-banner"], [data-ij-theme="authentic-no-banner"]) :is(
	.ij-service-contact, .ij-service-card:hover, .ij-service-card:focus,
	.ij-feature-card:hover, .ij-feature-card:focus
) {
	box-shadow: var(--ij-theme-shadow);
}

html:is([data-ij-theme="a"], [data-ij-theme="b"], [data-ij-theme="authentic"], [data-ij-theme="authentic-blue-banner"], [data-ij-theme="authentic-no-banner"]) .ij-button--muted {
	background: var(--ij-theme-soft);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(.ij-about-principles, .ij-founder-profiles, .ij-contact-workspace) {
	background: var(--ij-theme-soft);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-school-brandbar {
	margin-top: 0;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-super-footer {
	background: var(--ij-theme-footer);
	color: var(--ij-theme-ink);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-super-footer :is(h2, .ij-super-footer__wordmark, .ij-super-footer__column a) {
	color: var(--ij-theme-ink);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-super-footer :is(.ij-super-footer__callout p, .ij-super-footer__column h3, .ij-super-footer__social) {
	color: var(--ij-theme-primary-dark);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-super-footer__brand > p {
	color: var(--ij-theme-muted);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-super-footer__wordmark span {
	color: var(--ij-theme-accent);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-super-footer__callout > a,
html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-super-footer__bottom {
	background: var(--ij-theme-primary-dark);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-super-footer__bottom {
	background: var(--ij-theme-ink);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-super-footer__callout {
	border-color: var(--ij-theme-line);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(a, button, input, summary):not(:where(.ij-school *)):focus-visible,
html[data-ij-theme]:where(:not([data-ij-theme="original"])) #masthead :is(a, button, input):focus-visible {
	outline: 3px solid var(--ij-theme-accent);
	outline-offset: 4px;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(.ij-home, .ij-super-footer, .ij-resources, .ij-standard-content) :is(h1, h2, h3, p, a) {
	overflow-wrap: anywhere;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(.ij-home-section-heading > a, .ij-home-cta > a, .ij-super-footer__callout > a) {
	flex-shrink: 1;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-super-footer__main {
	grid-template-columns: minmax(0, 1.35fr) minmax(0, .55fr) minmax(0, 1fr);
}

/* One action colour per palette, with white labels and a related hover shade. */
html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(
	.ij-home-button--primary, .ij-home-button--dark, .ij-home-button--light,
	.ij-button--primary, .ij-button--secondary,
	.ij-super-footer__callout > a, .ij-landing-cta > a, .ij-contact-action > a,
	.ij-contact-form button[type="submit"], .ij-download-card__file a,
	.ast-header-search .ast-search-menu-icon .search-submit,
	.ij-resource-filters a.is-active, .ij-language-switcher__link.is-current
):not(:where(.ij-school *)) {
	border-color: var(--ij-theme-action);
	background: var(--ij-theme-action) !important;
	color: var(--ij-theme-action-ink) !important;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(
	.ij-home-button--primary, .ij-home-button--dark, .ij-home-button--light,
	.ij-button--primary, .ij-button--secondary,
	.ij-super-footer__callout > a, .ij-landing-cta > a, .ij-contact-action > a,
	.ij-contact-form button[type="submit"], .ij-download-card__file a,
	.ast-header-search .ast-search-menu-icon .search-submit,
	.ij-resource-filters a, .ij-language-switcher__link.is-current
):not(:where(.ij-school *)):hover {
	border-color: var(--ij-theme-action-hover);
	background: var(--ij-theme-action-hover) !important;
	color: var(--ij-theme-action-ink) !important;
}

/* Inverse actions stay clear against photographic banners. */
html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home .ij-home-carousel .ij-home-button--primary,
html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home .ij-home-hero .ij-home-button--primary {
	border-color: #fff;
	background: #fff !important;
	color: var(--ij-theme-primary-dark) !important;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home .ij-home-carousel .ij-home-button--primary:hover,
html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home .ij-home-hero .ij-home-button--primary:hover {
	border-color: var(--ij-theme-soft);
	background: var(--ij-theme-soft) !important;
	color: var(--ij-theme-primary-dark) !important;
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-carousel__arrow:hover {
	background: #fff;
	color: var(--ij-theme-primary-dark);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(.ij-resources-lead, .ij-blog-card__meta, .ij-download-card__file, .ij-standard-content) {
	color: var(--ij-theme-muted);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-about-values li {
	border-color: var(--ij-theme-line);
	color: var(--ij-theme-ink);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]), textarea, select):not(:where(.ij-school *)) {
	border-color: var(--ij-theme-line) !important;
	background: #fff;
	color: var(--ij-theme-ink);
}

html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(input, textarea, select):not(:where(.ij-school *)):focus {
	border-color: var(--ij-theme-primary) !important;
}

/* On short desktop screens, use Original's smaller bottom inset so the
 * complete slide fits beside the controls without increasing banner height. */
@media (min-width: 601px) and (max-height: 750px) {
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-carousel__content {
		padding-block-end: 84px;
	}
}

@media (max-width: 960px) {
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-service-hero--with-image {
		--ij-banner-min-height: 680px;
	}
}

@media (max-width: 921px) {
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) {
		--ij-banner-header-offset: var(--ij-theme-header-height, 120px);
	}
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) #mega-menu-wrap-primary .mega-close {
		border: 1px solid var(--ij-theme-line);
		background: var(--ij-theme-header);
		color: var(--ij-theme-ink);
	}
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) #mega-menu-wrap-primary .mega-close::before {
		content: "×" !important;
		color: var(--ij-theme-ink) !important;
		font-family: sans-serif;
		font-size: 30px;
		line-height: 38px;
	}
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) #ast-mobile-header .ast-mobile-header-content.ij-mobile-menu-open,
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) #ast-mobile-header .ij-mobile-menu-open #mega-menu-primary {
		background: var(--ij-theme-header) !important;
	}
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) #mega-menu-wrap-primary #mega-menu-primary :is(.mega-ij-services-menu, .mega-ij-resources-menu) > ul.mega-sub-menu {
		background: transparent;
	}
}

@media (max-width: 800px) {
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-super-footer__main {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 700px) {
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) {
		--ij-banner-top-inset: 24px;
	}
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-section-heading,
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-cta {
		align-items: flex-start;
		flex-direction: column;
	}
}

@media (max-width: 640px) {
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-resources-hero {
		--ij-banner-padding-start: 135px;
		--ij-banner-padding-end: 65px;
		--ij-banner-breadcrumb-gap: 38px;
	}
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-resource-article header {
		--ij-banner-padding-start: 135px;
		--ij-banner-breadcrumb-gap: 38px;
	}
}

@media (max-width: 600px) {
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-carousel {
		--ij-banner-min-height: 760px;
		--ij-banner-padding-end: 126px;
	}
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-carousel__content {
		padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right));
	}
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-carousel__controls {
		inset-inline: 20px;
		bottom: 54px;
		justify-content: center;
	}
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-hero {
		--ij-banner-min-height: 760px;
		--ij-banner-padding-end: 76px;
	}
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) :is(.ij-standard-hero, .ij-news-hero) {
		--ij-banner-min-height: 0px;
		--ij-banner-breadcrumb-gap: 34px;
	}
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-services-index__hero {
		--ij-banner-min-height: 0px;
		--ij-banner-padding-start: 124px;
		--ij-banner-padding-end: 62px;
		--ij-banner-breadcrumb-gap: 34px;
	}
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-service-hero {
		--ij-banner-padding-start: 124px;
		--ij-banner-padding-end: 54px;
		--ij-banner-breadcrumb-gap: 34px;
	}
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-service-hero--with-image {
		--ij-banner-padding-start: 180px;
		--ij-banner-padding-end: 58px;
	}
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-service-hero--with-image .ij-service-hero__content {
		--ij-banner-min-height: 660px;
	}
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-article-header {
		--ij-banner-padding-start: 185px;
		--ij-banner-padding-end: 52px;
		--ij-banner-breadcrumb-gap: 34px;
	}
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-pathways {
		width: calc(100% - 40px);
	}
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-home-pathways > div {
		border-inline: 0;
	}
}

@media (max-width: 520px) {
	html[data-ij-theme]:where(:not([data-ij-theme="original"])) .ij-super-footer__main {
		grid-template-columns: minmax(0, 1fr);
	}
}
