/**
 * Careers: Employment-page teaser card, job page, application form.
 *
 * Loaded after main.css, so plain selectors of equal specificity win.
 * Colours and type come from the theme: #ba0017 brand red, Merriweather for
 * headings, Open Sans for body.
 */

:root {
	--msi-red: #ba0017;
	--msi-ink: #1d1f22;
	--msi-line: #dcdcdc;
	--msi-muted: #6d7176;
	--msi-shell: #f4f4f4;
}

/* ---------------------------------------------------------------- teaser -- */

/* One set of rules; the light/dark switch on the job only swaps these tokens. */
.msi-career-card {
	--card-bg: #fff;
	--card-border: 1px solid var(--msi-line);
	--card-title: var(--msi-ink);
	--card-text: #3a3d41;
	--card-muted: var(--msi-muted);
	--card-rule: var(--msi-line);
	--card-title-hover: var(--msi-red);
	--card-glow: none;
	--card-edge: linear-gradient(to right, rgba(255, 255, 255, 0), #fff);
	--card-edge-v: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
	--card-shadow: 0 2px 4px rgba(29, 31, 34, .06);
	--card-shadow-hover: 0 18px 38px rgba(29, 31, 34, .14);
}

.msi-career-card--dark {
	--card-bg: var(--msi-ink);
	--card-border: 0;
	--card-title: #fff;
	--card-text: rgba(255, 255, 255, .82);
	--card-muted: rgba(255, 255, 255, .6);
	--card-rule: rgba(255, 255, 255, .28);
	--card-title-hover: #f0c9ce;
	--card-glow: radial-gradient(circle at 88% 6%, rgba(186, 0, 23, .22), transparent 58%);
	--card-edge: linear-gradient(to right, rgba(29, 31, 34, 0), var(--msi-ink));
	--card-edge-v: linear-gradient(to bottom, rgba(29, 31, 34, 0), var(--msi-ink));
	--card-shadow: 0 2px 4px rgba(29, 31, 34, .08);
	--card-shadow-hover: 0 18px 38px rgba(29, 31, 34, .18);
}

.msi-careers {
	margin: 40px 0 60px;
}

.msi-careers__empty {
	color: var(--msi-muted);
	font-style: italic;
}

.msi-career-card {
	display: flex;
	align-items: stretch;
	overflow: hidden;
	border: var(--card-border);
	border-radius: 3px;
	background: var(--card-bg);
	box-shadow: var(--card-shadow);
	transition: box-shadow .4s ease, transform .4s ease;
}

.msi-career-card + .msi-career-card {
	margin-top: 30px;
}

.msi-career-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--card-shadow-hover);
}

.msi-career-card__media {
	position: relative;
	flex: 0 0 50%;
	max-width: 50%;
	overflow: hidden;
	background: #0f1012;
}

.msi-career-card__media::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 90px;
	background: var(--card-edge);
	pointer-events: none;
}

.msi-career-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .7s cubic-bezier(.22, .61, .36, 1);
}

.msi-career-card:hover .msi-career-card__image {
	transform: scale(1.04);
}

.msi-career-card__body {
	flex: 1 1 50%;
	min-width: 0;
	padding: 46px 56px;
	background-image: var(--card-glow);
	align-self: center;
}

.msi-career-card__eyebrow {
	display: flex;
	align-items: center;
	margin: 0 0 18px;
	font-family: "Open Sans", sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--card-muted);
}

.msi-career-card__eyebrow::before {
	content: "";
	width: 26px;
	height: 2px;
	margin-right: 12px;
	background: var(--msi-red);
	flex: none;
}

.msi-career-card__title {
	margin: 0 0 16px;
	font-family: "Merriweather", serif;
	font-size: 34px;
	line-height: 1.24;
	font-weight: 400;
	color: var(--card-title);
}

.msi-career-card__title a {
	color: inherit;
	text-decoration: none;
	transition: color .25s ease;
}

.msi-career-card__title a:hover,
.msi-career-card__title a:focus {
	color: var(--card-title-hover);
}

.msi-career-card__subtitle {
	margin: 0 0 14px;
	font-family: "Open Sans", sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: var(--card-muted);
}

.msi-career-card__meta {
	display: flex;
	flex-wrap: wrap;
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
	font-family: "Open Sans", sans-serif;
	font-size: 12px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--card-muted);
}

.msi-career-card__meta li + li::before {
	content: "";
	display: inline-block;
	width: 1px;
	height: 11px;
	margin: 0 14px -1px;
	background: var(--card-rule);
}

.msi-career-card__text {
	margin: 0 0 28px;
	font-family: "Open Sans", sans-serif;
	font-size: 16px;
	line-height: 1.75;
	color: var(--card-text);
}

.msi-career-card__points {
	margin: 0 0 26px;
	padding: 0;
	list-style: none;
	font-family: "Open Sans", sans-serif;
	font-size: 14px;
	line-height: 1.6;
	color: var(--card-text);
}

.msi-career-card__points li {
	position: relative;
	padding-left: 20px;
	margin-bottom: 6px;
}

.msi-career-card__points li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 9px;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--msi-red);
}

.msi-career-card__cta {
	line-height: 46px;
	letter-spacing: 0;
	font-size: 15px;
}

.msi-career-card__footnote {
	margin: 16px 0 0;
	font-family: "Merriweather", serif;
	font-size: 13px;
	font-style: italic;
	line-height: 1.5;
	color: var(--card-muted);
}

@media (max-width: 1199px) {

	.msi-career-card__body {
		padding: 40px 36px;
	}

	.msi-career-card__title {
		font-size: 28px;
	}
}

@media (max-width: 767px) {

	.msi-career-card {
		display: block;
	}

	.msi-career-card__media {
		max-width: none;
		aspect-ratio: 16 / 9;
	}

	.msi-career-card__media::after {
		top: auto;
		left: 0;
		width: auto;
		height: 70px;
		background: var(--card-edge-v);
	}

	.msi-career-card__image {
		height: 100%;
	}

	.msi-career-card__body {
		padding: 32px 24px 36px;
	}

	.msi-career-card__title {
		font-size: 24px;
	}

	/* The "|" is a ::before inside the item, so a wrapped line would start with
	   it. Too narrow for separators anyway — space the facts instead. */
	.msi-career-card__meta {
		column-gap: 16px;
		row-gap: 4px;
	}

	.msi-career-card__meta li + li::before {
		display: none;
	}
}

/* --------------------------------------------------------- careers archive -- */

.msi-careers-intro {
	max-width: 780px;
	margin: 36px 0 10px;
}

.msi-careers-intro p {
	margin: 0;
	font-family: "Open Sans", sans-serif;
	font-size: 17px;
	line-height: 1.8;
	color: #3a3d41;
}

.msi-careers-heading {
	position: relative;
	margin: 34px 0 0;
	padding-top: 18px;
	font-family: "Merriweather", serif;
	font-size: 24px;
	line-height: 1.3;
	color: var(--msi-ink);
}

.msi-careers-heading::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 40px;
	height: 2px;
	background: var(--msi-red);
}

.msi-careers-heading + .msi-careers {
	margin-top: 26px;
}

.msi-careers-note {
	max-width: 780px;
	margin: 0 0 60px;
	font-family: "Merriweather", serif;
	font-size: 14px;
	font-style: italic;
	line-height: 1.7;
	color: var(--msi-muted);
}

@media (max-width: 767px) {

	.msi-careers-intro p {
		font-size: 16px;
	}
}

.msi-brand__initial {
	color: var(--msi-red);
}

/* -------------------------------------------------------------- job page -- */

/* A flex column so one Apply button can sit in two places: under the facts strip
   on phones, under the description on desktop. Two buttons would mean two #apply
   anchors. */
.msi-job {
	display: flex;
	flex-direction: column;
	margin-bottom: 30px;
}

.msi-job__facts  { order: 1; }
.msi-job__apply  { order: 2; }
.msi-job__content { order: 3; }
.msi-share       { order: 4; }

.msi-job__apply {
	margin: 0 0 34px;
}

.msi-job__apply .btn {
	display: inline-block;
	line-height: 48px;
	letter-spacing: 0;
	font-size: 16px;
	padding: 0 34px;
}

@media (min-width: 768px) {

	/* Desktop: the description first, the button under it. */
	.msi-job__content { order: 2; }
	.msi-job__apply {
		order: 3;
		margin: 6px 0 0;
	}
}

/* The 1px gap over a line-coloured background draws every separator, including
   the ones between wrapped rows, which border-left alone cannot do. */
.msi-job__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 1px;
	margin: 0 0 38px;
	padding: 0;
	list-style: none;
	overflow: hidden;
	border: 1px solid var(--msi-line);
	border-radius: 3px;
	background: var(--msi-line);
}

/* auto basis, not 0: a long value (a schedule sentence) gets the room it needs
   instead of being squeezed into an equal third. */
.msi-job__fact {
	flex: 1 1 auto;
	min-width: 170px;
	padding: 18px 24px;
	background: var(--msi-shell);
}

.msi-job__fact-label {
	display: block;
	margin-bottom: 6px;
	font-family: "Open Sans", sans-serif;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--msi-muted);
}

.msi-job__fact-value {
	display: block;
	font-family: "Merriweather", serif;
	font-size: 16px;
	line-height: 1.45;
	color: var(--msi-ink);
}

.msi-job__content {
	font-family: "Open Sans", sans-serif;
	font-size: 16px;
	line-height: 1.8;
	color: #3a3d41;
}

.msi-job__content h2,
.msi-job__content h3 {
	position: relative;
	margin: 38px 0 16px;
	padding-top: 18px;
	font-family: "Merriweather", serif;
	color: var(--msi-ink);
}

.msi-job__content h2 {
	font-size: 24px;
}

.msi-job__content h3 {
	font-size: 19px;
}

.msi-job__content h2::before,
.msi-job__content h3::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 40px;
	height: 2px;
	background: var(--msi-red);
}

.msi-job__content ul {
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
}

.msi-job__content ul li {
	position: relative;
	padding-left: 24px;
	margin-bottom: 9px;
}

.msi-job__content ul li::before {
	content: "";
	position: absolute;
	left: 3px;
	top: 11px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--msi-red);
}

.msi-job__aside {
	position: sticky;
	top: 110px;
}

@media (max-width: 991px) {

	.msi-job__aside {
		position: static;
		margin-top: 40px;
	}
}

@media (max-width: 767px) {

	.msi-job__fact {
		flex: 1 1 100%;
	}
}

/* ------------------------------------------------------- home: work with us -- */

/* A dark band before the footer: it separates the CTA from the light About
   section above it and makes the red button the last thing read on the page. */
.msi-work {
	padding: 58px 0;
	background: var(--msi-ink);
	background-image: radial-gradient(circle at 82% 0%, rgba(186, 0, 23, .28), transparent 60%);
}

.msi-work__inner {
	display: flex;
	align-items: center;
	gap: 48px;
}

.msi-work__copy {
	flex: 1 1 auto;
	min-width: 0;
}

.msi-work__eyebrow {
	display: flex;
	align-items: center;
	margin: 0 0 14px;
	font-family: "Open Sans", sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .6);
}

.msi-work__eyebrow::before {
	content: "";
	width: 26px;
	height: 2px;
	margin-right: 12px;
	background: var(--msi-red);
	flex: none;
}

.msi-work__title {
	margin: 0 0 14px;
	font-family: "Merriweather", serif;
	font-size: 32px;
	line-height: 1.25;
	font-weight: 400;
	color: #fff;
}

.msi-work__text {
	max-width: 680px;
	margin: 0;
	font-family: "Open Sans", sans-serif;
	font-size: 16px;
	line-height: 1.8;
	color: rgba(255, 255, 255, .8);
}

/* The red initials of the company name need to stay legible on charcoal. */
.msi-work__text .msi-brand__initial {
	color: #ff6b7a;
}

.msi-work__action {
	flex: 0 0 auto;
}

.msi-work__cta {
	line-height: 50px;
	letter-spacing: 0;
	font-size: 16px;
	padding: 0 32px;
}

@media (max-width: 991px) {

	.msi-work__inner {
		display: block;
	}

	.msi-work__action {
		margin-top: 28px;
	}
}

@media (max-width: 767px) {

	.msi-work {
		padding: 44px 0;
	}

	.msi-work__title {
		font-size: 26px;
	}
}

/* ----------------------------------------------------------------- share -- */

.msi-share {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 14px;
	margin: 34px 0 10px;
	padding-top: 24px;
	border-top: 1px solid var(--msi-line);
}

.msi-share__label {
	font-family: "Open Sans", sans-serif;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--msi-muted);
}

.msi-share__list {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.msi-share__list li {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
}

.msi-share__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid var(--msi-line);
	border-radius: 50%;
	background: #fff;
	color: var(--msi-muted);
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	text-decoration: none;
	transition: color .2s ease, border-color .2s ease, background-color .2s ease, transform .2s ease;
}

.msi-share__link:hover,
.msi-share__link:focus-visible {
	transform: translateY(-1px);
	border-color: var(--msi-red);
	background: var(--msi-red);
	color: #fff;
	text-decoration: none;
}

.msi-share__glyph {
	width: 15px;
	height: 15px;
}

.msi-share__copied {
	margin-left: 10px;
	font-family: "Open Sans", sans-serif;
	font-size: 12px;
	color: var(--msi-muted);
}

.msi-share__copied[hidden] {
	display: none;
}

/* ------------------------------------------------------------------ form -- */

.msi-apply {
	scroll-margin-top: 110px;
	padding: 32px 30px 36px;
	border: 1px solid var(--msi-line);
	border-top: 3px solid var(--msi-red);
	border-radius: 3px;
	background: #fff;
	box-shadow: 0 10px 30px rgba(29, 31, 34, .07);
}

.msi-apply__title {
	margin: 0 0 22px;
	font-family: "Merriweather", serif;
	font-size: 24px;
	line-height: 1.2;
	color: var(--msi-ink);
}

.msi-apply__notice {
	margin-bottom: 22px;
	padding: 16px 18px;
	border-radius: 3px;
	font-size: 14px;
	line-height: 1.6;
}

.msi-apply__notice p {
	margin: 0 0 6px;
}

.msi-apply__notice p:last-child {
	margin-bottom: 0;
}

.msi-apply__notice--success {
	border: 1px solid #b9d5bd;
	background: #f1f8f2;
	color: #2e5b35;
}

.msi-apply__notice--error {
	border: 1px solid #e3b6bb;
	background: #fdf3f4;
	color: #8b1220;
}

.msi-apply__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.msi-apply__field,
.msi-apply__actions,
.msi-apply__required {
	margin: 0 0 18px;
}

.msi-apply__field label,
.msi-apply__field legend {
	display: block;
	margin-bottom: 7px;
	padding: 0;
	font-family: "Open Sans", sans-serif;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.45;
	color: var(--msi-ink);
}

.msi-apply__field label em {
	font-weight: 400;
	font-style: normal;
	color: var(--msi-muted);
}

.msi-apply__field sup {
	color: var(--msi-red);
	font-size: 13px;
	top: 0;
}

.msi-apply__field input[type="text"],
.msi-apply__field input[type="email"],
.msi-apply__field input[type="tel"],
.msi-apply__field input[type="date"],
.msi-apply__field select,
.msi-apply__field textarea {
	width: 100%;
	max-width: 100%;
	/* main.css pins .site input/select to height:38px, which is less than
	   11+21+11 and clips the text. Same specificity, so auto wins from here. */
	height: auto;
	padding: 11px 13px;
	border: 1px solid var(--msi-line);
	border-radius: 2px;
	background: #fff;
	font-family: "Open Sans", sans-serif;
	font-size: 15px;
	line-height: 1.4;
	color: var(--msi-ink);
	transition: border-color .2s ease, box-shadow .2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.msi-apply__field select {
	padding-right: 38px;
	background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%236d7176' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
}

.msi-apply__field textarea {
	min-height: 104px;
	resize: vertical;
}

.msi-apply__field input:focus,
.msi-apply__field select:focus,
.msi-apply__field textarea:focus {
	outline: none;
	border-color: var(--msi-red);
	box-shadow: 0 0 0 3px rgba(186, 0, 23, .12);
}

.msi-apply__field input[aria-invalid="true"],
.msi-apply__field select[aria-invalid="true"],
.msi-apply__field textarea[aria-invalid="true"] {
	border-color: #c8434f;
	background: #fdf7f8;
}

.msi-apply__field--conditional {
	display: none;
}

.msi-apply__field--conditional[data-open="1"] {
	display: block;
}

.msi-apply__field--choice {
	margin-bottom: 20px;
	padding: 0;
	border: 0;
}

.msi-apply__field--choice legend em {
	font-weight: 400;
	font-style: normal;
	color: var(--msi-muted);
}

/* "Select all that apply" lists: one choice per row, the label text aligned
   under itself when it wraps rather than under the box. */
.msi-apply__field .msi-apply__check {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin: 0 0 9px;
	font-weight: 400;
	line-height: 1.45;
	cursor: pointer;
}

.msi-apply__field .msi-apply__check input {
	flex: none;
	margin: 3px 0 0;
	accent-color: var(--msi-red);
}

.msi-apply__field--choice[aria-invalid="true"] legend {
	color: #a3121f;
}

.msi-apply__field .msi-apply__radio {
	display: inline-flex;
	align-items: center;
	margin: 0 22px 0 0;
	font-weight: 400;
	cursor: pointer;
}

.msi-apply__field .msi-apply__radio input {
	margin: 0 8px 0 0;
	accent-color: var(--msi-red);
}

.msi-apply__field--file input[type="file"] {
	display: block;
	width: 100%;
	padding: 10px 12px;
	border: 1px dashed var(--msi-line);
	border-radius: 2px;
	background: #fafafa;
	font-family: "Open Sans", sans-serif;
	font-size: 13px;
	color: var(--msi-ink);
}

.msi-apply__hint {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	color: var(--msi-muted);
}

.msi-apply__error[hidden] {
	display: none;
}

.msi-apply__error {
	display: block;
	margin-top: 6px;
	font-family: "Open Sans", sans-serif;
	font-size: 13px;
	line-height: 1.5;
	color: #a3121f;
}

.msi-apply__submit {
	width: 100%;
	line-height: 48px;
	letter-spacing: 0;
	font-size: 16px;
	cursor: pointer;
}

.msi-apply__submit[disabled] {
	opacity: .45;
	cursor: not-allowed;
}

.msi-apply__required {
	margin-bottom: 0;
	font-size: 12px;
	color: var(--msi-muted);
}

@media (max-width: 767px) {

	.msi-apply {
		padding: 26px 20px 30px;
	}
}
