/*
 * Canadensys layout classes and rendering fixes (Divi limitations only; widened for the pixel plan, 2026-11-13).
 *
 * A layout fix used three or more times becomes a documented class here,
 * applied through the module's Advanced -> CSS Class field. One-off fixes stay
 * in that module's own Custom CSS. Never use this file for page layout, and
 * keep sizes, spacing and colours in Divi settings, presets and variables.
 * Every class is listed in docs/design-system.md.
 */

/*
 * Text rendering (pixel plan RC-8). Divi limitation: Divi's theme stylesheet sets
 * body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale }
 * and has no setting for it. On macOS that drops Core Text's stem darkening, so IBM
 * Plex Sans rendered visibly thinner than the design (same paragraph: mean ink 136
 * against the prototype's 162). The prototype leaves smoothing at the browser
 * default. Higher specificity than Divi's body rule.
 */
html body {
	-webkit-font-smoothing: auto;
	-moz-osx-font-smoothing: auto;
}

/*
 * .cds-img-cover (Image module)
 * Divi limitation: the Image module's height setting sizes the module box but
 * not the picture, which keeps its natural proportions, so object-fit has
 * nothing to crop to. The picture fills the box and is cover-cropped. The
 * height itself stays in the module's Divi sizing settings.
 */
.et_pb_image.cds-img-cover .et_pb_image_wrap,
.et_pb_image.cds-img-cover .et_pb_image_wrap img {
	width: 100%;
	height: 100%;
}

.et_pb_image.cds-img-cover .et_pb_image_wrap img {
	object-fit: cover;
	object-position: center;
}

/*
 * .cds-card-link (Group module used as a card, for example Card Feature)
 * Divi limitation: a card can only be made clickable with Divi's own link
 * setting on the group, which wraps the whole card in one link and leaves the
 * "Explore" link inside it (a link inside a link), or with row and column
 * links, which aren't real links. Instead, the card's one "Explore" link
 * stretches over the whole card: the link stays the only focusable element
 * and keeps its aria-label. The card is the positioning box; every element
 * between the card and the link is taken out of positioning so the stretched
 * area is the full card. Use it only on cards with exactly one link.
 * Focus ring for the card: a11y.css.
 */
.cds-card-link {
	position: relative;
}

.cds-card-link :has(a[href]) {
	position: static;
}

.cds-card-link a[href]::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

/*
 * .cds-card-link hover (pixel plan RC-5, 2026-11-13; reverses site motion §1's lift):
 * the v6.5 prototype changes a clickable card's border to the accent instantly, with
 * no movement. Divi limitation: Divi gives every module with a hover state a 300ms
 * transition, and the stretched link (a[href]::after over the card) makes the card's
 * "Explore →" link take its own hover colour whenever the card is hovered, which the
 * prototype doesn't do. Instant timing here; the link keeps its resting accent.
 */
html body .cds-card-link {
	transition-duration: 0s;
}

html body .cds-card-link .et_pb_text_inner a[href]:hover {
	color: var(--gcid-cds-accent);
}

/*
 * .cds-accent-underline (Image module)
 * The design's thin accent line along the bottom edge of a photo, drawn inside
 * the picture's rounded corners.
 * Divi limitation: the Image module's border setting draws outside the picture
 * and bends around rounded corners, so it can't draw a straight line clipped to
 * the inside of the image. A 2px overlay at the bottom of the image wrap does.
 * The wrap's position uses :where() so a module's own Custom CSS (the Defence
 * card positions its wrap absolutely) still wins.
 * Colour (pixel plan RC-15): the prototype's fixed rgba(91,110,214,0.75), the same in both themes, so it reads as a mid-blue over every photo. A literal value on purpose: a theme variable would turn navy in light mode, and Divi only prints the colour variables a page uses.
 */
.et_pb_image.cds-accent-underline :where(.et_pb_image_wrap) {
	position: relative;
}

.et_pb_image.cds-accent-underline .et_pb_image_wrap {
	overflow: hidden;
}

.et_pb_image.cds-accent-underline .et_pb_image_wrap::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 2px;
	background-color: rgba(91, 110, 214, 0.75);
	pointer-events: none;
}

/*
 * In-page anchor targets (menu links such as /about/#leadership). The prototype lands every target 90px from the top (28px under the 62px header). Divi's smooth scroll is off for in-page links (body class, functions.php, pixel plan RC-9), so the browser's jump uses this margin. Also keeps a focused target clear of the sticky header (WCAG 2.4.7).
 */
#main-content [id] {
	scroll-margin-top: 90px;
}

/*
 * Heading module titles: no extra bottom padding
 * Divi limitation: Divi's theme stylesheet gives every h1 to h6 a 10px bottom
 * padding, and the Heading module has no spacing setting for its title, so
 * every heading sat 10px further from the next block than the cds-gap-*
 * token in its column says (cards: 26px instead of cds-gap-xs, 16px; visual
 * audit P2-2, P2-5, P3-2, P3-11). Spacing between blocks comes only from the
 * column and group gaps set in Divi.
 */
.et_pb_heading .et_pb_module_header {
	padding-bottom: 0;
}

/*
 * Heading module titles: balanced line breaks below desktop only
 * Divi limitation: the Heading module has no line-wrapping setting, so a
 * phone-width title can leave one word alone on its last line (decision D6 in
 * docs/remaining-work.md). At desktop widths the v6.5 prototype wraps headings
 * greedily (pixel plan RC-16), except the About H1, which it balances; tablet and
 * phone have no prototype reference and keep D6.
 */
@media (max-width: 980px) {
	.et_pb_heading .et_pb_module_header {
		text-wrap: balance;
	}
}

.page-id-259 .et_pb_section_0 .et_pb_heading h1.et_pb_module_header {
	text-wrap: balance;
}

/*
 * Body copy: last-line wrapping as the prototype (pixel plan RC-16). Divi
 * limitation: the Text module has no wrapping setting. The prototype sets
 * text-wrap: pretty on its body copy, which avoids one-word last lines; short
 * labels are unaffected. Browsers without support keep normal wrapping.
 */
.et_pb_text_inner :is(p, li) {
	text-wrap: pretty;
}

/*
 * Card descriptions wrap greedily, as the prototype (pixel plan chunk 09 task 1B, visible completeness).
 * The prototype sets text-wrap: pretty only on page section bodies, never on card text, so the blanket
 * rule above re-broke card descriptions into different lines (Avionics, Engineering Infrastructure,
 * the Science and Robotics cards). Divi limitation: the Text module has no wrapping setting; the Card
 * Body group presets (Card Body, Small, Detail, Overview, Compact) mark the card text blocks.
 */
:is([class*="preset--module--divi-group--bece6497"], [class*="preset--module--divi-group--08737b67"], [class*="preset--module--divi-group--b178f324"], [class*="preset--module--divi-group--7bdd29fb"], [class*="preset--module--divi-group--9b065f66"]) .et_pb_text_inner :is(p, li) {
	text-wrap: wrap;
}

/*
 * .cds-img-cover in a flex Group: the picture fills the module's set height (pixel plan chunk 09 task 1B).
 * Divi limitation: the wrap is inline-block and its percentage height never resolved against the flex
 * module, so a picture whose file is wider or narrower than its tile kept its natural proportions (NISA
 * gallery tile 10, a 304x166 file, 154px tall in a 190px tile). Letting the link and wrap grow to the module's height makes 100% resolve.
 */
.et_pb_image.cds-img-cover > .et_pb_image_wrap,
.et_pb_image.cds-img-cover > a {
	display: block;
	flex: 1 1 auto;
	min-height: 0;
	width: 100%;
}

/*
 * About body copy wraps normally (pixel plan chunk 08, ABOUT-N06, ABOUT-41, ABOUT-N12). The
 * prototype sets no text-wrap on any About paragraph (its Our Story, Giving Back and Clean
 * Water texts are plain divs), so the blanket pretty rule above re-broke them (a 1000kg
 * rover "for / long"). Divi limitation: the Text module has no wrapping setting.
 */
.page-id-259 .et_pb_text_inner :is(p, li) {
	text-wrap: wrap;
}

/*
 * .cds-hide-empty (Text module holding one Loop custom field, or a Group of
 * label + field)
 * Divi limitation: a Text module whose dynamic field is empty still prints its
 * (empty) module box, which keeps its flex gap, and a label beside it would
 * still show. Divi 5's display conditions read the page's own custom fields,
 * not the Loop item's. So an empty field block isn't shown (decision 10: never
 * show an empty field). Used on the Mission Log cards (subtitle, description,
 * related line, hardware, customer and outcome rows).
 * The related line is a link built from two fields (its text and the related
 * mission's card ID), so when both are empty the module still holds an empty
 * <a>; that counts as empty too (2026-11-13).
 */
.et_pb_text.cds-hide-empty:empty,
.et_pb_text.cds-hide-empty:has(a:empty),
.et_pb_group.cds-hide-empty:has(> .et_pb_text:empty) {
	display: none;
}

/*
 * .cds-inset-8 / -10 / -12 (Image module inside a card; pixel plan RC-7, 2026-11-13)
 * The v6.5 prototype insets a card's picture 8-12px from the card edge, with its own
 * radius. Divi limitation: on an Image module that is a direct child of a flex Group
 * or Column Divi unsets margin-left and margin-right (.et_flex_group > .et_pb_image,
 * specificity 0,2,0) and computes margin-bottom as 0, so the module's margin setting
 * only reaches the top. The class sets --cds-inset, and one rule restates the side
 * margins from it with higher specificity; the top margin and radius come from the
 * module settings. An absolutely positioned wrap (the Home Defence card) can't use
 * a bottom margin at all: its module CSS sets the wrap's bottom itself.
 */
html body .cds-inset-8 { --cds-inset: 8px; }
html body .cds-inset-10 { --cds-inset: 10px; }
html body .cds-inset-12 { --cds-inset: 12px; }

html body .et_flex_group > .et_pb_image[class*="cds-inset-"],
html body .et_flex_column > .et_pb_image[class*="cds-inset-"] {
	margin-left: var(--cds-inset);
	margin-right: var(--cds-inset);
}

/*
 * .cds-rule-soft (Divider; Home section labels; pixel plan RC-10). The prototype draws
 * these rules in the accent at 60% opacity in both themes. Divi limitation: a colour
 * opacity variant is baked to the dark hex, so it wouldn't follow light mode, and the
 * Divider's own opacity (filters) setting prints no CSS (checked 2026-11-14); module
 * opacity from this class keeps the theme's own accent.
 */
.et_pb_divider.cds-rule-soft {
	opacity: 0.6;
}

/*
 * Instant hovers (pixel plan RC-11, 2026-11-13; reverses the motion spec's 0.18s):
 * the v6.5 prototype changes link, button, menu, footer and theme-toggle colours at
 * once. Divi limitation: Divi prints a 300ms transition for every module and preset
 * with a hover setting (Text module links, buttons, the Menu module), with no
 * site-wide setting. :where() keeps this at zero specificity, so the theme
 * cross-fade (light.css, !important on html.cds-theme-fading *) still wins while it
 * runs. Side effect wanted: a button's focus ring no longer fades in (Divi's
 * "transition: all" included outline).
 */
:where(.et_pb_text_inner a, .et_pb_button, .et-menu a, .et_mobile_menu a, .et_pb_social_media_follow a, .cds-theme-toggle) {
	transition-duration: 0s !important;
}

/*
 * Pixel fixes, chunk 07 (MISSIONS-01): the Missions H1 wraps balanced at desktop.
 * Divi limitation: the Heading module has no wrapping setting, and RC-16 keeps
 * balance below 981px only. The prototype balances this H1 ("FLOWN. LANDED." /
 * "OPERATED.") with text-wrap: balance; the About H1 has the same exception (RC-16).
 */
.page-id-275 .et_pb_section_0 .et_pb_heading h1.et_pb_module_header {
	text-wrap: balance;
}

/*
 * Pixel fixes, chunk 03 (DEFENCE-30, -37, -59, -68, -N09): .cds-video-thumb, a Group holding a still
 * (Image module) and one Text module whose link goes to the video. As the v6.5 prototype: the still
 * at 82% on black, a 68px play circle in the middle, the link text as a "Watch the … video" pill at
 * the top left, and the link covering the whole thumbnail. Divi limitation: a Group has no overlay
 * icon, and a Text module can't be placed over an image. Literal colours as the prototype: the
 * thumbnail is a photograph, the same in both themes. The Group also carries cds-card-link, whose
 * focus ring (a11y.css) goes round the thumbnail.
 */
html body .cds-video-thumb {
	position: relative;
	display: block;
	height: 300px;
	border-radius: 14px;
	overflow: hidden;
	background-color: #000;
}

html body .cds-video-thumb .et_pb_image {
	opacity: 0.82;
}

/* Phone: the still keeps its 220px height (the Image module's phone setting). */
@media (max-width: 767px) {
	html body .cds-video-thumb {
		height: 220px;
	}
}

html body .cds-video-thumb::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	z-index: 1;
	width: 68px;
	height: 68px;
	box-sizing: border-box;
	transform: translate(-50%, -50%);
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 50%;
	background: rgba(5, 5, 5, 0.72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4 L20 12 L7 20 Z' fill='%23FFFFFF'/%3E%3C/svg%3E") center / 24px 24px no-repeat;
	pointer-events: none;
}

html body .cds-video-thumb .et_pb_text,
html body .cds-video-thumb .et_pb_text p {
	position: static;
	margin: 0;
	padding: 0;
}

html body .cds-video-thumb .et_pb_text a[href] {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: block;
	text-decoration: none;
}

html body .cds-video-thumb .cds-video-thumb__label {
	position: absolute;
	left: 12px;
	top: 12px;
	padding: 6px 12px;
	border-radius: 100px;
	background-color: rgba(5, 5, 5, 0.72);
	color: #F2F2F3;
	font-size: 14px;
	font-weight: 600;
	line-height: normal;
}

/*
 * Pixel fixes, chunk 03 (HOME-18): .cds-heading-link, a Heading module whose title is a link (the
 * Home section labels): text colour, the accent on hover at once, no underline (prototype).
 * Divi limitation: the Heading module has no colour or hover setting for a link in its title.
 */
html body .cds-heading-link a {
	color: inherit;
	text-decoration: none;
	transition: none;
}

html body .cds-heading-link a:hover {
	color: var(--gcid-cds-accent);
}

/*
 * Text selection colour (pixel plan chunk 02, GLOBAL-N07). The v6.5 prototype
 * tints selected text with its accent blue at 25% in both themes; Divi has no
 * setting, so the browser's default highlight showed. The selected text keeps
 * its own colour, so its contrast barely changes.
 */
::selection {
	background-color: rgba(91, 110, 214, 0.25);
}

/*
 * Pixel fixes, chunk 04 (HOME-20, CAPABILITIES-N04, DEFENCE-N12, DEFENCE-58, DEFENCE-N20,
 * HOME-23, DEFENCE-27, EXPLORATION-01, CAPABILITIES-01).
 */

/*
 * Arrows in IBM Plex Sans text. Divi limitation: the font variable's stack ends in
 * Helvetica, Arial, so the "→" and "←" that Plex doesn't have fall back to Arial's long,
 * thin arrow. The prototype's stack falls back to Lucida Grande's short, heavy arrow.
 * This face adds Lucida Grande Bold for those two characters only (macOS; elsewhere
 * local() finds nothing and the fallback stays as it was). Its weight and stretch ranges
 * (100 700, 75% 100%) must equal those of the Google IBM Plex Sans variable face Divi
 * loads: Chrome only merges faces of identical capabilities, so a face with another range
 * is never asked for the arrow (tested: seven exact-weight faces and one 500-900 face were
 * never used), and one with a different stretch range replaces Plex for the whole page.
 */
@font-face {
	font-family: "IBM Plex Sans";
	src: local("Lucida Grande Bold"), local("LucidaGrande-Bold");
	unicode-range: U+2190, U+2192;
	font-weight: 100 700;
	font-stretch: 75% 100%;
}

/*
 * Pill buttons on one line on wide desktops. Divi limitation: the Button module has no
 * white-space setting. The prototype's pills never wrap. Below 1280px (and on tablet and
 * phone) they keep normal wrapping: the long French labels (Defence brochure buttons)
 * overflow their columns otherwise (review of chunk 04 part 1).
 */
@media (min-width: 1280px) {
	html body .et_pb_button {
		white-space: nowrap;
	}
}

/*
 * Button Accent hover. Divi limitation: a button preset's hover can only swap
 * colours. The prototype brightens the button's own colour (filter: brightness(1.12)),
 * which lightens it in both themes. Instant, like every hover since RC-11.
 */
html body .et_pb_button.preset--group--divi-button--divi-button--h1c8vfa--1d2d9c93-4e66-4487-a8b3-179ba10d7021:hover {
	background-color: var(--gcid-cds-accent-btn) !important;
	filter: brightness(1.12);
}

/*
 * .cds-corner-tick (Image module; the Home feature cards). Divi limitation: the
 * Image module can't draw a mark inside the picture. The prototype puts a 32×2 tick
 * in the image's top-left corner in its photo-line blue. The wrap is positioned by
 * .cds-accent-underline (always used with it).
 */
.et_pb_image.cds-corner-tick .et_pb_image_wrap::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	z-index: 1;
	width: 32px;
	height: 2px;
	background-color: rgba(91, 110, 214, 0.75);
	pointer-events: none;
}

/*
 * .cds-dot-list (Text module with a bulleted list; Defence HAWC and RAPTOR).
 * Divi limitation: the Text module can't restyle list markers and fixes list
 * items at a 26px line height. The prototype's bullets are 6px accent dots, 14px
 * before the text, 10px between items, normal line height. The <ul> keeps
 * role="list" in the content so Safari still announces it as a list (WCAG 1.3.1).
 */
html body .et_pb_text.cds-dot-list ul {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

html body .et_pb_text.cds-dot-list li {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 0;
	line-height: normal;
}

html body .et_pb_text.cds-dot-list li::before {
	content: "";
	flex-shrink: 0;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background-color: var(--gcid-cds-accent);
}

/*
 * .cds-pill-lg (Home careers button). Divi limitation: a button preset prints its padding with
 * !important on `.preset…_wrapper .preset…`, so a module-level padding never renders. The
 * prototype's 16.5px pill uses 16px 32px padding (186×54). Desktop only: tablet and phone keep the
 * preset's 15px 30px.
 */
@media (min-width: 981px) {
	html body .et_pb_button_module_wrapper .et_pb_button.cds-pill-lg {
		padding: 16px 32px !important;
		white-space: nowrap;
	}
}

/*
 * The pill never shrinks in its flex row, at every width (Custom Solutions at 981 to 1279px wrapped
 * "Talk to / engineering"; the Home careers button at 768px wrapped to three lines, pixel plan chunk 09 task 1B).
 */
.et_pb_button_module_wrapper:has(> .cds-pill-lg) {
	flex-shrink: 0;
}

.et_pb_button.cds-pill-lg {
	white-space: nowrap;
}

/*
 * .cds-pill-sm (NISA "Download datasheet"): the prototype's small accent pill, 14px / 600 with
 * 11px 22px padding (178x40). The Button Accent preset prints 16px and 14px 30px with !important,
 * so the size lives here. All widths, as in the prototype.
 */
html body #page-container .et_pb_button_module_wrapper .et_pb_button.cds-pill-sm,
html body #page-container .et_pb_button_module_wrapper .et_pb_button.cds-pill-sm:hover {
	padding: 11px 22px !important;
	font-size: 14px !important;
	white-space: nowrap;
}

/*
 * "Have a ... requirement?" CTA buttons (Card Body CTA and CTA Large groups) keep "Contact us" on one line
 * at tablet width, where the text column squeezed the pill to two lines (pixel plan chunk 09 task 1B).
 * Divi limitation: the button's flex settings land on the link, not on its wrapper, which is the flex item.
 */
:is([class*="preset--module--divi-group--45257826"], [class*="preset--module--divi-group--67782cf3"]) .et_pb_button_module_wrapper {
	flex-shrink: 0;
}

:is([class*="preset--module--divi-group--45257826"], [class*="preset--module--divi-group--67782cf3"]) .et_pb_button {
	white-space: nowrap;
}

/*
 * Overview hero H1s (Exploration 136, Capabilities 210) balance their lines at every
 * width: the prototype's overview hero sets text-wrap: balance (RC-16 turned balance
 * off for desktop headings; this restores it where the prototype uses it).
 */
.page-id-136 .et_pb_section_0 .et_pb_heading h1.et_pb_module_header,
.page-id-210 .et_pb_section_0 .et_pb_heading h1.et_pb_module_header {
	text-wrap: balance;
}

/*
 * .cds-news-band (News "01 Latest" section; pixel plan chunk 07, NEWS-01, -07, -09, -12)
 * Divi limitations: the section sizing field can't follow the window height, a Row
 * can't stretch to its section's height, and a flex child can't take a 1.2fr / 1fr
 * share. The prototype's band is one window tall (minus the 62px header), keeps the
 * heading at the top, centres the featured card in the space left, and splits the
 * card's image and text columns 1.2 : 1 (54.5454% = 1.2 / 2.2; border-box because
 * the groups carry padding). The image fills the card's height when a long release
 * title makes the card taller than 402px (it stays at least 380px). Desktop only:
 * tablet and phone keep their layout.
 */
@media (min-width: 981px) {
	.et_pb_section.cds-news-band {
		min-height: calc(100vh - 62px);
		display: flex;
		flex-direction: column;
	}

	.et_pb_section.cds-news-band > .et_pb_row {
		flex: 1 1 auto;
		display: flex;
		flex-direction: column;
	}

	.et_pb_section.cds-news-band > .et_pb_row > .et_pb_column {
		flex: 1 1 auto;
	}

	.et_pb_section.cds-news-band .et_pb_column > .cds-card-link {
		margin-top: auto !important;
		margin-bottom: auto !important;
	}

	.et_pb_section.cds-news-band .cds-card-link > .et_pb_group {
		box-sizing: border-box !important;
	}

	.et_pb_section.cds-news-band .cds-card-link > .et_pb_group:first-child {
		flex: 0 0 54.5454% !important;
		width: auto !important;
		max-width: none !important;
		display: flex !important;
		flex-direction: column !important;
	}

	.et_pb_section.cds-news-band .cds-card-link > .et_pb_group:last-child {
		flex: 1 1 0% !important;
		width: auto !important;
		max-width: none !important;
	}

	.et_pb_section.cds-news-band .cds-card-link > .et_pb_group:first-child .et_pb_image {
		position: relative !important;
		flex: 1 1 auto !important;
		height: auto !important;
		min-height: 380px !important;
	}

	.et_pb_section.cds-news-band .cds-card-link > .et_pb_group:first-child .et_pb_image .et_pb_image_wrap {
		position: absolute !important;
		inset: 0 !important;
		width: auto !important;
		height: auto !important;
	}

	.et_pb_section.cds-news-band .cds-card-link > .et_pb_group:first-child .et_pb_image img {
		width: 100% !important;
		height: 100% !important;
		object-fit: cover !important;
	}
}

/*
 * .cds-fit-contain (img inside a .cds-img-cover Image module; pixel plan chunk 07, NEWS-N03)
 * Added by functions.php to pictures whose attachment has cds_thumb_fit=contain. Divi
 * limitation: a Loop can't set a crop per post, and a centred cover crop cut words off
 * logos and banners and most of two portraits. Shown whole on the card colour instead.
 */
.et_pb_image.cds-img-cover .et_pb_image_wrap img.cds-fit-contain {
	object-fit: contain !important;
	background-color: var(--gcid-cds-card);
}

/* Pixel fixes, chunk 07 (MISSIONS-37, -44, -86): Mission Log badge and related line. Divi limitations: a Loop can't style a module by a field value; the CSS Class field carries the status. Moved here from moon-map.css, which the Visual Builder doesn't load. */
/*
 * .cds-status (Mission Log status badge, Text module; MISSIONS-37, -86)
 * Divi limitation: a Loop can't style a module by a field value. The badge's CSS Class
 * field carries cds-status--<STATUS> from the mission_status field, and these rules give
 * each status the prototype's text colour and 5px dot. Literal colours on purpose: the
 * badge stays dark in both themes (cds-always-dark), as in the prototype; every text
 * colour is at least 5.8:1 on the badge fill over the brightest photo (WCAG 1.4.3).
 */
html body .et_pb_text.cds-status .et_pb_text_inner p {
	display: flex;
	align-items: center;
	gap: 5px;
	margin: 0;
	padding: 0;
}

html body .et_pb_text.cds-status .et_pb_text_inner p::before {
	content: "";
	flex-shrink: 0;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background-color: #B0B0B4;
}

html body .et_pb_text.cds-status--ONGOING .et_pb_text_inner,
html body .et_pb_text.cds-status--ONGOING .et_pb_text_inner p {
	color: #D6D6D8;
}

html body .et_pb_text.cds-status--COMPLETE .et_pb_text_inner,
html body .et_pb_text.cds-status--COMPLETE .et_pb_text_inner p {
	color: #FDFCF9;
}

html body .et_pb_text.cds-status--COMPLETE .et_pb_text_inner p::before {
	background-color: #9AA7F2;
}

html body .et_pb_text.cds-status--UPCOMING .et_pb_text_inner,
html body .et_pb_text.cds-status--UPCOMING .et_pb_text_inner p {
	color: #EFCB88;
}

html body .et_pb_text.cds-status--UPCOMING .et_pb_text_inner p::before {
	background-color: #D8A03A;
}

/*
 * .cds-related (Mission Log related line, Text module; MISSIONS-44)
 * The prototype prints "↳ " before the related mission. Divi limitation: typed into the
 * module, the arrow would stop an empty line from hiding (.cds-hide-empty), so it is
 * generated here, with empty alternative text so screen readers don't announce an
 * arrow (WCAG 1.1.1). Light mode: the prototype's #C9A24B is 2.3:1 on the light card,
 * so the link takes the light cds-gold (#7E6110, at least 4.5:1; WCAG 1.4.3).
 */
.cds-related a::before {
	content: "↳ ";
	content: "↳ " / "";
}

html[data-theme="light"] .cds-related a {
	color: var(--gcid-cds-gold);
}

html[data-theme="light"] .cds-related a:hover {
	color: var(--gcid-cds-accent);
}

/* Mixed case: the Text module's capitalization "none" doesn't undo the Tag Mono preset's uppercase. */
html body .et_pb_text.cds-related .et_pb_text_inner,
html body .et_pb_text.cds-related .et_pb_text_inner p,
html body .et_pb_text.cds-related .et_pb_text_inner a {
	text-transform: none;
}

/*
 * Pixel fixes, chunk 06 (CAP-ENGINEERING-N02, -N07; NISA-57): what the Divi settings can't
 * express on the capability detail pages and NISA. (Button no-wrap, the Button Accent
 * brightness hover and the arrow face for IBM Plex Sans arrows come from chunk 04 above.)
 */

/*
 * Arrows in back links and pagers. Divi limitation: the font variables print the stack
 * "IBM Plex …", Helvetica, Arial, Lucida, sans-serif. Plex has no "←" / "→", so Arial draws a
 * long thin arrow. The prototype's stacks end in the generic family, so macOS draws Menlo
 * (mono back links) and Lucida Grande (sans pagers; chunk 04's @font-face supplies the same
 * glyph). Applies to every cds-tap-target link whose text preset is Tag Mono or Strong.
 */
.et_pb_text.cds-tap-target[class*="5b7b015e-425b-4abb-98b6-e81603631923"] a > span[aria-hidden="true"] {
	font-family: "IBM Plex Mono", monospace;
}

.et_pb_text.cds-tap-target[class*="c17b2d3e-5c9c-4121-b8c9-e9d7f68a5a2c"] a > span[aria-hidden="true"] {
	font-family: "IBM Plex Sans", sans-serif;
}

/*
 * .cds-sticky-media (Group, NISA flight unit card). Divi limitation: Divi's sticky option is
 * script-driven and inserts a duplicate placeholder (CLAUDE.md quirk). The prototype keeps the
 * product photo in view (top 92px: the 62px header plus 30px) while the taller spec card
 * scrolls. Desktop only: tablet and phone stack the cards.
 */
@media (min-width: 981px) {
	.et_pb_group.cds-sticky-media {
		position: sticky;
		top: 92px;
	}
}

/*
 * Pixel fixes, chunk 08 (ABOUT-18, ABOUT-N07, ABOUT-34): About-only details Divi can't draw.
 *
 * .cds-underline-solid (Image module, with .cds-accent-underline; About leader portraits)
 * The prototype draws the leader photo line as a solid #4A5CD0 border in both themes
 * (the photos elsewhere use the 75% accent of .cds-accent-underline). Divi limitation:
 * the Image module's border draws outside the rounded picture (see .cds-accent-underline).
 * A literal on purpose: the same colour in both themes, as the prototype.
 */
.et_pb_image.cds-accent-underline.cds-underline-solid .et_pb_image_wrap::after {
	background-color: #4A5CD0;
}

/*
 * Leader portraits keep the top of the photo (client, 17 Nov 2026: no heads cut off).
 * The files are 850x720 with every head 4-5% below the top edge. The card runs from
 * 0.63:1 (320px phones) to 1.73:1 (two columns at 680-1000px), so on the wide cards
 * the cover crop trims height; anchored to the top it trims the chest, never the head.
 */
body.page-id-259 .et_pb_image.cds-img-cover.cds-underline-solid .et_pb_image_wrap img {
	object-position: 50% 0%;
}

/*
 * .cds-pill-dot (Text module drawn as a pill; About compliance pills)
 * The prototype puts a 6px accent dot 12px before the label. Divi limitation: a Text
 * module has no icon or pseudo-element setting. The dot follows the theme accent
 * (cds-accent: #7D8DEB dark, #2E3B96 light, as the prototype's --accent).
 */
.et_pb_text.cds-pill-dot .et_pb_text_inner {
	display: flex;
	align-items: center;
	gap: 12px;
}

.et_pb_text.cds-pill-dot .et_pb_text_inner::before {
	content: "";
	flex-shrink: 0;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background-color: var(--gcid-cds-accent);
}

/*
 * Pixel fixes, chunk 05 (EXP-ROVERS-30, EXP-AGRICULTURE-21): .cds-para-gap-line (Text module)
 * Divi limitation: the Text module has no paragraph-spacing setting, and Divi gives every
 * paragraph a 1em bottom padding. The v6.5 prototype separates these paragraphs with one
 * blank line (white-space: pre-line with "\n\n"), a gap of exactly one line height.
 * Desktop only: tablet and phone have no prototype reference and keep Divi's spacing.
 * Used on Planetary Rovers "Large Rovers body" and the four Space Agriculture card texts.
 */
@media (min-width: 981px) {
	.et_pb_text.cds-para-gap-line .et_pb_text_inner p:not(:last-child) {
		padding-bottom: 0;
		margin-bottom: 1.85em;
		margin-bottom: 1lh;
	}
}

/*
 * Pixel fixes, chunk 05 (EXP-AGRICULTURE-19): .cds-br-desktop (a <br> in a Heading module title)
 * Divi limitation: a Heading title has no line-break setting. The v6.5 prototype breaks the
 * Space Agriculture card titles at fixed points (white-space: pre-line). The break shows at
 * desktop only; tablet and phone have no prototype reference and wrap naturally (a space
 * before each <br> keeps the words apart when it is hidden).
 */
@media (max-width: 980px) {
	.et_pb_heading br.cds-br-desktop {
		display: none;
	}
}

/*
 * Pixel fixes, chunk 05 (EXP-ROVERS-19, EXP-AGRICULTURE-28): .cds-case-none, .cds-case-none-lg (Text module)
 * Divi limitation: the font case setting has no "none" that overrides a preset's uppercase
 * (Tag Mono), so a module can't print its text as typed. The v6.5 prototype prints the rover
 * tile captions and the Space Agriculture partner chips as typed.
 * .cds-case-none: at every width (Planetary Rovers tile captions).
 * .cds-case-none-lg: desktop only (Space Agriculture partner chips keep uppercase on tablet and phone).
 */
.et_pb_text.cds-case-none .et_pb_text_inner {
	text-transform: none;
}

@media (min-width: 981px) {
	.et_pb_text.cds-case-none-lg .et_pb_text_inner {
		text-transform: none;
	}
}

/*
 * Pixel fixes, chunk 08 review: two shared hero classes.
 *
 * .cds-hero-layer (hero Section; About and Careers). Divi limitation: a Section takes one
 * background gradient and no image filter, so a hero that needs a second layer (the About
 * radial vignette, the Careers saturate/contrast filter) draws it on ::before. This class
 * gives that layer its box (covers the hero, behind the content, never catches clicks) and
 * lifts the row above it; the Section's own Custom CSS sets only the layer's look.
 */
.et_pb_section.cds-hero-layer::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

.et_pb_section.cds-hero-layer > .et_pb_row {
	position: relative;
	z-index: 1;
}

/*
 * .cds-text-backing (Text or Heading module on a hero photo; Contact hero). Divi limitation:
 * a module background would add a visible box and the module's own padding would move the
 * layout. A dark patch drawn as a pseudo-element just behind the text keeps the line
 * readable (WCAG 1.4.3) where the photo is bright. The strength is --cds-backing-alpha
 * (default 0.88), set in the module's Custom CSS. Always-dark heroes only: literal colour.
 */
.cds-text-backing {
	position: relative;
	isolation: isolate;
}

.cds-text-backing::before {
	content: "";
	position: absolute;
	inset: -3px -14px;
	z-index: -1;
	pointer-events: none;
	border-radius: 10px;
	background: rgba(5, 5, 5, var(--cds-backing-alpha, 0.88));
	filter: blur(4px);
}

/*
 * Pixel plan chunk 09 (reviewer finding): the prototype centres the content of its 838px split
 * sections vertically (title about 175px below the section top); Divi sections are block boxes
 * with a min-height, so the content sat at the 90px padding. Desktop only (the stacked tablet and
 * phone layouts are content-height). Rows keep their own width (measured: 1280px at x 80).
 * Sections (by page id and Divi section index): Space Systems 2-5, Mission Engineering 2-7,
 * Terrestrial Systems 2-4, Space Agriculture 3 (Extended Network), Defence 5 (Orbital).
 */
@media (min-width: 981px) {
	body.page-id-212 :is(.et_pb_section_2, .et_pb_section_3, .et_pb_section_4, .et_pb_section_5),
	body.page-id-216 :is(.et_pb_section_2, .et_pb_section_3, .et_pb_section_4, .et_pb_section_5, .et_pb_section_6, .et_pb_section_7),
	body.page-id-214 :is(.et_pb_section_2, .et_pb_section_3, .et_pb_section_4),
	body.page-id-139 .et_pb_section_3,
	body.page-id-220 .et_pb_section_5 {
		display: flex;
		flex-direction: column;
		justify-content: center;
	}
}

/* Chunk 09: Defence HAWC & RAPTOR section ends 53px under its last card in the prototype (site had 90px, pushing every later section down 37px). Desktop only. */
@media (min-width: 981px) {
	body.page-id-220 .et_pb_section_2 {
		padding-bottom: 53px !important;
	}
}

/* Chunk 09: Careers "We Hire extraordinary people" breaks "We Hire / extraordinary people" as in the prototype (greedy wrapping gave "We Hire extraordinary / people" in Orbitron). Balanced wrapping, desktop only; the French title balances too. */
@media (min-width: 981px) {
	body.page-id-279 #culture ~ .et_pb_heading .et_pb_module_header {
		text-wrap: balance;
	}
}

/*
 * Chunk 09 (WCAG 1.4.10 reflow at 320px): long uppercase heading words (ENVIRONNEMENTS, the Home
 * wordmark) pushed the page 3 to 52px wider than the viewport, and the nowrap pill labels
 * (cds-pill-lg) ran past their card's padding. Below 400px headings may break inside a word as a
 * last resort, and large pills may wrap again.
 */
@media (max-width: 399px) {
	.et_pb_heading .et_pb_module_header {
		overflow-wrap: anywhere;
	}

	.et_pb_button.cds-pill-lg {
		white-space: normal !important;
	}

	.et_pb_button_module_wrapper:has(> .cds-pill-lg) {
		flex-shrink: 1 !important;
	}
}

/* Chunk 09: on phone the Home Defence card picture (a 100%-wide module with side margins from .cds-inset-*) ran 11px past the card's right edge; cap its width by the insets. */
@media (max-width: 767px) {
	html body .et_flex_group > .et_pb_image[class*="cds-inset-"] {
		max-width: calc(100% - 2 * var(--cds-inset));
	}
}

/* Chunk 09: Home Mission Heritage card pictures kept a 30px bottom margin at tablet and phone (54px gap under the image against 18px at desktop). */
@media (max-width: 980px) {
	html body.page-id-77 .et_pb_group:not(.et_flex_group) > .et_pb_image[class*="cds-inset-"] {
		margin-bottom: 0;
	}
}

/*
 * Pixel plan chunk 09 (WCAG 1.4.3, worst pixel behind the text at 12 widths): text on a starfield
 * photo met 3:1 or 4.5:1 at 1440px but a bright star or a wireframe line behind a word at another
 * width broke it (News, About, Home hero tagline at 1920, Home Careers copy at 981-1180, the
 * Space Agriculture back link at 1024-1280; the Terrestrial Systems back link after the 16 Nov
 * hero focal point moved brighter cloud behind it). The same blurred dark patch as .cds-text-backing,
 * added from here so the pages need no class edit. Always-dark sections only (literal colour).
 */
body.page-id-77 .et_pb_section_0 :is(.et_pb_text_0, .et_pb_heading),
body.page-id-77 .et_pb_section_5 .et_pb_text_51,
body.page-id-271 .et_pb_section_0 :is(.et_pb_heading_0, .et_pb_text_1),
body.page-id-259 .et_pb_section_0 .et_pb_heading,
body.page-id-139 .et_pb_section_0 .et_pb_text_0.cds-tap-target,
body.page-id-214 .et_pb_section_0 .et_pb_text_0.cds-tap-target {
	position: relative;
	isolation: isolate;
}

body.page-id-77 .et_pb_section_0 :is(.et_pb_text_0, .et_pb_heading)::before,
body.page-id-77 .et_pb_section_5 .et_pb_text_51::before,
body.page-id-271 .et_pb_section_0 :is(.et_pb_heading_0, .et_pb_text_1)::before,
body.page-id-259 .et_pb_section_0 .et_pb_heading::before,
body.page-id-139 .et_pb_section_0 .et_pb_text_0.cds-tap-target::before,
body.page-id-214 .et_pb_section_0 .et_pb_text_0.cds-tap-target::before {
	content: "";
	position: absolute;
	inset: -18px -40px;
	z-index: -1;
	pointer-events: none;
	border-radius: 999px;
	background: rgba(5, 5, 5, var(--cds-backing-alpha, 0.6));
	filter: blur(22px);
}

body.page-id-271 .et_pb_section_0 .et_pb_heading_0,
body.page-id-259 .et_pb_section_0 .et_pb_heading {
	--cds-backing-alpha: 0.45;
}

body.page-id-271 .et_pb_section_0 .et_pb_text_1 {
	--cds-backing-alpha: 0.85;
}

/* Feathered patch: the 40px side reach must never widen the page (WCAG 1.4.10): clip the sections that carry one, and keep it inside the row padding at tablet and phone. */
body.page-id-77 .et_pb_section_0,
body.page-id-77 .et_pb_section_5,
body.page-id-271 .et_pb_section_0,
body.page-id-259 .et_pb_section_0,
body.page-id-139 .et_pb_section_0,
body.page-id-214 .et_pb_section_0 {
	overflow-x: clip;
}

@media (max-width: 980px) {
	body.page-id-77 .et_pb_section_0 :is(.et_pb_text_0, .et_pb_heading)::before,
	body.page-id-77 .et_pb_section_5 .et_pb_text_51::before,
	body.page-id-271 .et_pb_section_0 :is(.et_pb_heading_0, .et_pb_text_1)::before,
	body.page-id-259 .et_pb_section_0 .et_pb_heading::before,
	body.page-id-139 .et_pb_section_0 .et_pb_text_0.cds-tap-target::before,
	body.page-id-214 .et_pb_section_0 .et_pb_text_0.cds-tap-target::before {
		inset: -14px -10px;
		filter: blur(12px);
	}
}

@media (max-width: 430px) {
	html body.page-id-282 .et_pb_section_0 .et_pb_text_1.cds-text-backing {
		--cds-backing-alpha: 0.88 !important;
	}
}

/*
 * Hero focal points (client corrections 16 Nov 2026, E1; client-approved deviation from v6.5).
 * Divi limitation: a Section background image takes no custom position (only keywords).
 * Every photo hero is cover-cropped and was centred, so on wide, short windows (1920x830,
 * 3440x1440) the subject lost its top or bottom (the Planetary Rovers rover was cut at the
 * wheels) and on phones a subject beside the centre was cut. Each value below is the
 * position that keeps the subject (or its core) in frame at the 11 swept sizes, from
 * 1280x720 to 3440x1440 and 1024x768, 768x1024, 390x844 (scratchpad sweep, recorded in
 * docs/client-corrections-2026-11-16.md). One value covers every background layer (the
 * gradient layer fills the box, so its position is moot). Home keeps its "center bottom"
 * (already in frame everywhere). Mission Engineering keeps its phone crop (Divi setting).
 */
html body.page-id-136 .et_pb_section.cds-scroll-cue { background-position: 56% 39% !important; }
html body.page-id-137 .et_pb_section.cds-scroll-cue { background-position: 49% 86% !important; }
html body.page-id-138 .et_pb_section.cds-scroll-cue { background-position: 46% 47% !important; }
html body.page-id-139 .et_pb_section.cds-scroll-cue { background-position: 45% 56% !important; } /* 56%, not the sweep's 75%: the subject fits anywhere from 50% to 100%, and above 60% the 34px kicker fell under 3:1 at 1600-1920 */
html body.page-id-140 .et_pb_section.cds-scroll-cue { background-position: 78% 49% !important; }
html body.page-id-210 .et_pb_section.cds-scroll-cue { background-position: 80% 60% !important; }
html body.page-id-212 .et_pb_section.cds-scroll-cue { background-position: 50% 34% !important; }
html body.page-id-214 .et_pb_section.cds-scroll-cue { background-position: 80% 32% !important; }
html body.page-id-220 .et_pb_section.cds-scroll-cue { background-position: 33% 70% !important; }
html body.page-id-259 .et_pb_section.cds-scroll-cue { background-position: 50% 63% !important; }
html body.page-id-275 .et_pb_section.cds-scroll-cue { background-position: 50% 67% !important; }
html body.page-id-279 .et_pb_section.cds-scroll-cue { background-position: 79% 83% !important; }

@media (min-width: 768px) {
	html body.page-id-216 .et_pb_section.cds-scroll-cue { background-position: 50% 44% !important; }
}

/*
 * Readable measure after the content width went to 1440px (client corrections 16 Nov 2026, D2).
 * The wider rows widened every text that takes its column's width. Start-aligned body copy that
 * grew past about 75 characters a line is capped at 57ch (about 75 characters of IBM Plex Sans,
 * whose average character is 0.76ch), so only grids and media gain the width. Centred intros keep
 * their own fixed widths (unchanged). Measured with scratchpad grew.mjs at 1920px: Home "Who we
 * are" 106 -> 75, About Our Story 100 -> 75, Mission Log cards 83-86 -> 75 and the rest below.
 */
@media (min-width: 981px) {
	body.page-id-77 .et_pb_section_1 .et_pb_text_2 .et_pb_text_inner,
	body.page-id-136 .et_pb_section_1 :is(.et_pb_text_3, .et_pb_text_6) .et_pb_text_inner,
	body.page-id-139 .et_pb_section_2 :is(.et_pb_text_3, .et_pb_text_4, .et_pb_text_5, .et_pb_text_6) .et_pb_text_inner,
	body.page-id-220 .et_pb_section_2 :is(.et_pb_text_7, .et_pb_text_11) .et_pb_text_inner,
	body.page-id-275 .et_pb_section_2 .et_pb_text.cds-hide-empty[class*="65266cc3-1f0b-4a9e-9b47-f607dd67c7a8"] .et_pb_text_inner,
	body.page-id-259 .et_pb_section_1 .et_pb_text_1 .et_pb_text_inner,
	body.page-id-259 .et_pb_section_3 :is(.et_pb_text_19, .et_pb_text_22) .et_pb_text_inner,
	body.page-id-259 .et_pb_section_4 .et_pb_text_28 .et_pb_text_inner,
	body.page-id-259 .et_pb_section_5 :is(.et_pb_text_32, .et_pb_text_33) .et_pb_text_inner,
	body.page-id-279 .et_pb_section_1 .et_pb_text_3 .et_pb_text_inner,
	body.page-id-279 .et_pb_section_3 .et_pb_text_23 .et_pb_text_inner {
		max-width: 57ch;
	}
}

/*
 * About "Our Story" photo re-crop (client corrections 16 Nov 2026, D4). The tall slot (339x795 at
 * desktop) cover-crops the 4:5 photo to its middle 53%, which cut the camera's lens at the left
 * edge. 40% keeps the whole camera (x 0.20-0.74 of the photo) at desktop and more of the lens at
 * tablet. Home uses the same attachment and keeps its crop. The client's original
 * (v6.5 images, 01 Home/whoweare-camera.png) has the same framing, so no new file is needed:
 * the picture is never shown larger than its file.
 */
body.page-id-259 .et_pb_section_1 .et_pb_image_0 img {
	object-position: 40% 50% !important;
}

/*
 * Subtle background gradient (client corrections 16 Nov 2026, D5; approved deviation from v6.5,
 * which has it on the Moon map band only): the same top-centre glow, accent at 7%, on every plain
 * section. Never on photo or always-dark sections (cds-always-dark, cds-news-band) or on the
 * sections that already carry a gradient (cds-intro-band, the Moon band). Divi prints no
 * background-image for a plain section, so nothing else is overridden. Literal colour: the
 * accent (#5B6ED6) at 7%, as the band; light.css restates it for the light theme.
 */
html body #main-content .et_pb_section:not(.cds-always-dark):not(.cds-news-band):not(.cds-intro-band):not(.cds-moon-on):not(.et_pb_sticky_placeholder) {
	background-image: radial-gradient(ellipse 1000px 520px at 50% -10%, rgba(91, 110, 214, 0.07) 0%, rgba(91, 110, 214, 0) 62%);
}
