/* Small site-wide layer: Tools nav item, homepage route and article route. */
:root {
	--trj-ink: #050505;
	--trj-lime: #cfff00;
	--trj-paper: #f5f5f2;
	--trj-white: #ffffff;
	--trj-gutter: clamp(20px, 4vw, 72px);
	--trj-shell: 1480px;
}

.trj-article-tool-cta {
	box-sizing: border-box;
	color: var(--trj-ink);
	font-family: var(--wp--preset--font-family--geist, Geist, Arial, Helvetica, sans-serif);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

.trj-article-tool-cta *,
.trj-article-tool-cta *::before,
.trj-article-tool-cta *::after {
	box-sizing: inherit;
}

.trj-article-tool-cta a {
	color: inherit;
	text-decoration: none;
}

/* Compatibility styling for older cached toolkit navigation markup. */
.trj-unified-nav,
.trj-unified-nav * {
	box-sizing: border-box;
}

.trj-unified-nav {
	background: var(--trj-white);
	border-bottom: 1px solid #d9d9d2;
	color: var(--trj-ink);
	font-family: var(--wp--preset--font-family--geist, Geist, Arial, Helvetica, sans-serif);
	position: relative;
	width: 100%;
	z-index: 40;
}

.trj-unified-nav__inner {
	align-items: center;
	display: grid;
	gap: clamp(24px, 4vw, 64px);
	grid-template-columns: auto minmax(0, 1fr);
	margin-inline: auto;
	max-width: var(--trj-shell);
	min-height: 78px;
	padding-inline: var(--trj-gutter);
}

.trj-unified-nav a {
	color: var(--trj-ink) !important;
	text-decoration: none !important;
}

.trj-unified-nav__brand {
	display: inline-flex;
	white-space: nowrap;
}

.trj-unified-nav__brand strong {
	font-size: 0.7rem;
	font-weight: 650;
	letter-spacing: 0.095em;
	text-transform: uppercase;
}

.trj-unified-nav__links {
	align-items: center;
	display: flex;
	gap: clamp(14px, 1.8vw, 30px);
	justify-content: flex-end;
}

.trj-unified-nav__links a {
	font-size: 0.7rem;
	font-weight: 560;
	letter-spacing: 0.055em;
	padding-block: 0.55rem;
	position: relative;
	text-transform: uppercase;
}

.trj-unified-nav__links a::after {
	background: var(--trj-lime);
	bottom: 0;
	content: "";
	height: 3px;
	left: 0;
	position: absolute;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 180ms ease;
	width: 100%;
}

.trj-unified-nav__links a:hover::after,
.trj-unified-nav__links a:focus-visible::after,
.trj-unified-nav__links a[aria-current="page"]::after {
	transform: scaleX(1);
}

body.home .hero-shell > .trj-unified-nav {
	margin: 0;
}

.simple-nav .trj-tools-nav-link,
.mobile-topic-links .trj-tools-nav-link,
.inner-nav .trj-tools-nav-link,
.trj-global-nav__links .trj-tools-nav-link {
	position: relative;
}

.simple-nav .trj-tools-nav-link::before,
.mobile-topic-links .trj-tools-nav-link::before,
.inner-nav .trj-tools-nav-link::before,
.trj-global-nav__links .trj-tools-nav-link::before {
	content: none !important;
	display: none !important;
}

/* Keep the homepage discovery strip compact with four equal routes. */
body.home .trj-tools-strip__inner {
	width: min(calc(100% - 3rem), 1480px) !important;
}

body.home .trj-tools-strip__links {
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

body.home .trj-tools-strip__links a {
	min-height: 6.6rem !important;
}

body.home .trj-tools-strip__links a:hover,
body.home .trj-tools-strip__links a:focus-visible {
	background: #efffc1 !important;
	color: var(--trj-ink) !important;
}

body.home .trj-tools-strip__links a:hover .trj-tools-strip__number,
body.home .trj-tools-strip__links a:focus-visible .trj-tools-strip__number,
body.home .trj-tools-strip__links a:hover .trj-tools-strip__arrow,
body.home .trj-tools-strip__links a:focus-visible .trj-tools-strip__arrow {
	color: #526700 !important;
}

body.home .trj-tools-strip__links a:hover small,
body.home .trj-tools-strip__links a:focus-visible small {
	color: #54544f !important;
}

/* Give the journal grid and its final action room to breathe. */
body.home .journal > a.button,
body.home .journal > a.button-dark,
body.home .journal .article-grid + a.button {
	margin-top: clamp(2.75rem, 5vw, 5rem) !important;
}

/* Match every female-health chapter heading to the Cycle heading grid. */
body .trj-fh .trj-fh__chapter > .trj-fh__wrap > .trj-fh__chapter-head,
body .trj-fh #cycle .trj-fh__chapter-head,
body .trj-fh #fuel-blood-bones .trj-fh__chapter-head,
body .trj-fh #pelvic-pregnancy .trj-fh__chapter-head,
body .trj-fh #midlife-conditions .trj-fh__chapter-head {
	box-sizing: border-box !important;
	margin-inline: auto !important;
	max-width: 1180px !important;
	transform: none !important;
	width: min(calc(100% - 48px), 1180px) !important;
}

body .trj-fh .trj-fh__chapter-head > div,
body .trj-fh .trj-fh__chapter-head h2 {
	margin-left: 0 !important;
	max-width: 820px !important;
	transform: none !important;
	width: 100% !important;
}

.trj-article-tool-cta {
	background: var(--trj-paper);
	border: 1px solid var(--trj-ink);
	clear: both;
	margin: clamp(45px, 7vw, 90px) max(0px, calc((100% - min(100%, 980px)) / -2));
	max-width: 980px;
	padding: clamp(26px, 4vw, 52px);
}

.trj-article-tool-cta > p {
	font-size: 0.68rem;
	font-weight: 900;
	letter-spacing: 0.12em;
	margin: 0 0 1.2rem;
	text-transform: uppercase;
}

.trj-article-tool-cta h2 {
	font-size: clamp(2rem, 4vw, 4.3rem) !important;
	font-weight: 900;
	letter-spacing: -0.055em;
	line-height: 0.96;
	margin: 0 0 2rem;
	max-width: 13ch;
	text-align: left;
	text-wrap: balance;
}

.trj-article-tool-cta > div {
	align-items: end;
	border-top: 1px solid var(--trj-ink);
	display: grid;
	gap: 2rem;
	grid-template-columns: 1fr auto;
	padding-top: 1.2rem;
}

.trj-article-tool-cta > div > span {
	font-size: 0.9rem;
	max-width: 58ch;
}

.trj-article-tool-cta a {
	background: var(--trj-lime);
	display: inline-flex;
	font-size: 0.7rem;
	font-weight: 900;
	gap: 1rem;
	letter-spacing: 0.07em;
	padding: 0.9rem 1rem;
	text-transform: uppercase;
	white-space: nowrap;
}

.trj-article-tool-cta a:focus-visible,
.simple-nav .trj-tools-nav-link:focus-visible,
.mobile-topic-links .trj-tools-nav-link:focus-visible,
.inner-nav .trj-tools-nav-link:focus-visible,
.trj-global-nav__links .trj-tools-nav-link:focus-visible {
	outline: 3px solid #6f8c00;
	outline-offset: 3px;
}

@media (max-width: 900px) {
	.trj-unified-nav__inner {
		align-items: flex-start;
		display: flex;
		flex-wrap: wrap;
		gap: 12px;
		padding-block: 16px;
	}

	.trj-unified-nav__brand {
		width: 100%;
	}

	.trj-unified-nav__links {
		justify-content: flex-start;
		overflow-x: auto;
		padding-bottom: 0.2rem;
		scrollbar-width: none;
		width: 100%;
	}

	.trj-unified-nav__links::-webkit-scrollbar {
		display: none;
	}

	.trj-unified-nav__links a {
		flex: 0 0 auto;
	}

	body.home .trj-tools-strip__links {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}

	.trj-article-tool-cta {
		margin-inline: 0;
	}
}

@media (max-width: 680px) {
	:root {
		--trj-gutter: 18px;
	}

	.trj-unified-nav__brand strong {
		font-size: 0.64rem;
	}

	.trj-unified-nav__links {
		gap: 18px;
	}

	.trj-unified-nav__links a {
		font-size: 0.64rem;
	}

	.trj-article-tool-cta {
		padding: 24px 18px;
	}

	.trj-article-tool-cta h2 {
		font-size: clamp(2rem, 10vw, 3.2rem) !important;
		max-width: 100%;
	}

	.trj-article-tool-cta > div {
		align-items: stretch;
		grid-template-columns: 1fr;
	}

	.trj-article-tool-cta a {
		justify-content: space-between;
		white-space: normal;
	}

	body.home .trj-tools-strip__inner {
		width: calc(100% - 2rem) !important;
	}

	body.home .trj-tools-strip__links {
		display: flex !important;
		grid-template-columns: none !important;
	}

	body.home .trj-tools-strip__links a {
		flex: 0 0 min(19rem, 82vw) !important;
	}

	body .trj-fh .trj-fh__chapter > .trj-fh__wrap > .trj-fh__chapter-head,
	body .trj-fh #cycle .trj-fh__chapter-head,
	body .trj-fh #fuel-blood-bones .trj-fh__chapter-head,
	body .trj-fh #pelvic-pregnancy .trj-fh__chapter-head,
	body .trj-fh #midlife-conditions .trj-fh__chapter-head {
		max-width: none !important;
		width: calc(100% - 32px) !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.trj-article-tool-cta * {
		transition-duration: 0.01ms !important;
	}
}
