.ucsd-hypophos-guide {
	/*
	 * Brand tokens — same values as tmpgfr-calculator.css and theme/style.css
	 * (UC San Diego Health Brand Guidelines, pulse.ucsd.edu/brand). Scoped
	 * locally so the guide looks correct on any theme.
	 */
	--ucsd-navy: #13294b; /* PMS 2767 */
	--ucsd-blue: #007dba; /* PMS 7461 */
	--ucsd-yellow: #ffcb00; /* PMS 116 */
	--ucsd-cool-gray-8: #8a8a8d; /* PMS Cool Gray 8 */
	--ucsd-cool-gray-4: #bcbbba; /* PMS Cool Gray 4 */

	width: 100%;
	margin: 0 auto;
	font-family: inherit;
	color: var(--ucsd-navy);
}

.ucsd-hypophos-guide,
.ucsd-hypophos-guide *,
.ucsd-hypophos-guide *::before,
.ucsd-hypophos-guide *::after {
	box-sizing: border-box;
}

.ucsd-hypophos-guide a {
	color: var(--ucsd-blue);
}

.ucsd-hypophos-guide a:hover,
.ucsd-hypophos-guide a:focus {
	color: var(--ucsd-navy);
}

.ucsd-hypophos-guide__calc-back {
	margin: 0 0 1em;
	font-weight: 600;
}

.ucsd-hypophos-guide__header h2 {
	margin: 0 0 0.35em;
}

.ucsd-hypophos-guide__subtitle {
	margin: 0 0 1.25em;
	font-size: 1.1em;
}

/* Sticky step navigation: numbered stepper joined by a line */
.ucsd-hypophos-guide__nav {
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	align-items: flex-start;
	gap: 0.75em;
	margin: 0 0 2em;
	padding: 0.75em 0.75em 0.6em;
	overflow-x: auto;
	background: #fff;
	border-bottom: 3px solid var(--ucsd-yellow);
	box-shadow: 0 2px 6px rgba(19, 41, 75, 0.12);
	-webkit-overflow-scrolling: touch;
}

body.admin-bar .ucsd-hypophos-guide__nav {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar .ucsd-hypophos-guide__nav {
		top: 46px;
	}
}

/* Phones: fit all five steps without sideways scrolling. The calculator link
   is hidden here because "Back to the calculator" sits right above the bar. */
@media (max-width: 600px) {
	.ucsd-hypophos-guide__nav {
		padding: 0.6em 0.25em 0.5em;
	}

	.ucsd-hypophos-guide__nav li {
		min-width: 0;
	}

	.ucsd-hypophos-guide__nav ol a {
		padding: 0 0.1em;
		font-size: 0.72em;
		overflow-wrap: anywhere;
	}

	.ucsd-hypophos-guide__nav-num {
		width: 2.4em;
		height: 2.4em;
	}

	.ucsd-hypophos-guide__nav li + li::before {
		top: 1.2em;
	}

	.ucsd-hypophos-guide__nav .ucsd-hypophos-guide__nav-calc {
		display: none;
	}
}

/* Below 601px WordPress scrolls the admin bar away, so stick to the top. */
@media (max-width: 600px) {
	body.admin-bar .ucsd-hypophos-guide__nav {
		top: 0;
	}
}

.ucsd-hypophos-guide__nav ol {
	display: flex;
	flex: 1 0 auto;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ucsd-hypophos-guide__nav li {
	position: relative;
	flex: 1 1 0;
	min-width: 6.5em;
	margin: 0;
	text-align: center;
}

/* Line from the previous circle to this one, behind the circles. */
.ucsd-hypophos-guide__nav li + li::before {
	content: "";
	position: absolute;
	top: 1.1em;
	right: 50%;
	width: 100%;
	height: 2px;
	background: var(--ucsd-cool-gray-4);
}

.ucsd-hypophos-guide__nav ol a {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35em;
	padding: 0 0.25em;
	color: var(--ucsd-navy);
	font-weight: 600;
	font-size: 0.9em;
	line-height: 1.25;
	text-decoration: none;
}

.ucsd-hypophos-guide__nav-num {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.2em;
	height: 2.2em;
	border: 2px solid var(--ucsd-blue);
	border-radius: 50%;
	background: #fff;
	color: var(--ucsd-blue);
	font-weight: 700;
}

.ucsd-hypophos-guide__nav ol a:hover,
.ucsd-hypophos-guide__nav ol a:focus {
	color: var(--ucsd-blue);
}

.ucsd-hypophos-guide__nav ol a:hover .ucsd-hypophos-guide__nav-num,
.ucsd-hypophos-guide__nav ol a:focus .ucsd-hypophos-guide__nav-num {
	background: var(--ucsd-blue);
	color: #fff;
}

.ucsd-hypophos-guide__nav ol a[aria-current="true"] .ucsd-hypophos-guide__nav-num {
	background: var(--ucsd-navy);
	border-color: var(--ucsd-navy);
	color: #fff;
}

.ucsd-hypophos-guide__nav ol a[aria-current="true"] .ucsd-hypophos-guide__nav-label {
	text-decoration: underline;
	text-decoration-color: var(--ucsd-yellow);
	text-decoration-thickness: 3px;
	text-underline-offset: 3px;
}

.ucsd-hypophos-guide__nav .ucsd-hypophos-guide__nav-calc {
	flex: 0 0 auto;
	padding: 0.4em 0.8em;
	border-radius: 6px;
	background: #eeeff1;
	color: var(--ucsd-navy);
	font-weight: 600;
	font-size: 0.9em;
	text-decoration: none;
	white-space: nowrap;
}

.ucsd-hypophos-guide__nav .ucsd-hypophos-guide__nav-calc:hover,
.ucsd-hypophos-guide__nav .ucsd-hypophos-guide__nav-calc:focus {
	background: var(--ucsd-navy);
	color: #fff;
}

/* Steps */
.ucsd-hypophos-guide__step {
	margin: 0 0 3em;
	scroll-margin-top: 7.5em;
}

.ucsd-hypophos-guide__step > h3 {
	display: flex;
	align-items: center;
	gap: 0.6em;
	margin: 0 0 0.5em;
}

.ucsd-hypophos-guide__step-num {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.8em;
	height: 1.8em;
	border-radius: 50%;
	background: var(--ucsd-navy);
	color: var(--ucsd-yellow);
	font-size: 0.9em;
}

.ucsd-hypophos-guide__card,
.ucsd-hypophos-guide__panel,
.ucsd-hypophos-guide__footnote {
	margin: 0 0 1.25em;
	padding: 1em 1.1em;
	border: 1px solid var(--ucsd-cool-gray-4);
	border-radius: 4px;
}

.ucsd-hypophos-guide__card h4,
.ucsd-hypophos-guide__footnote h4 {
	margin: 0 0 0.5em;
}

.ucsd-hypophos-guide__card > :last-child,
.ucsd-hypophos-guide__panel > :last-child,
.ucsd-hypophos-guide__footnote > :last-child {
	margin-bottom: 0;
}

.ucsd-hypophos-guide__callout {
	margin: 0 0 1.25em;
	padding: 0.75em 1em;
	border-left: 4px solid var(--ucsd-yellow);
	border-bottom: 1px solid var(--ucsd-cool-gray-4);
}

.ucsd-hypophos-guide__callout p {
	margin: 0;
}

/* Buttons */
.ucsd-hypophos-guide a.ucsd-hypophos-guide__button {
	display: inline-block;
	margin: 0 0.5em 0.5em 0;
	padding: 0.6em 1.2em;
	border: 1px solid var(--ucsd-blue);
	border-radius: 4px;
	background: var(--ucsd-blue);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}

.ucsd-hypophos-guide a.ucsd-hypophos-guide__button:hover,
.ucsd-hypophos-guide a.ucsd-hypophos-guide__button:focus {
	background: var(--ucsd-navy);
	border-color: var(--ucsd-navy);
	color: #fff;
}

.ucsd-hypophos-guide__buttons {
	margin: 0 0 1em;
}


/* Pattern tiles */
.ucsd-hypophos-guide__tiles {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1em;
	margin: 0 0 1.5em;
}

@media (max-width: 600px) {
	.ucsd-hypophos-guide__tiles {
		grid-template-columns: 1fr;
	}
}

.ucsd-hypophos-guide a.ucsd-hypophos-guide__tile {
	display: flex;
	flex-direction: column;
	gap: 0.5em;
	padding: 1em;
	border: 1px solid var(--ucsd-cool-gray-4);
	border-top: 4px solid var(--ucsd-blue);
	border-radius: 4px;
	color: var(--ucsd-navy);
	text-decoration: none;
}

.ucsd-hypophos-guide a.ucsd-hypophos-guide__tile:hover,
.ucsd-hypophos-guide a.ucsd-hypophos-guide__tile:focus {
	border-color: var(--ucsd-navy);
	border-top-color: var(--ucsd-yellow);
}

.ucsd-hypophos-guide__tile-letter {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2em;
	height: 2em;
	border-radius: 50%;
	background: var(--ucsd-navy);
	color: var(--ucsd-yellow);
	font-weight: 700;
}

.ucsd-hypophos-guide__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35em;
}

.ucsd-hypophos-guide__chip {
	padding: 0.1em 0.5em;
	border: 1px solid var(--ucsd-cool-gray-4);
	border-radius: 1em;
	font-size: 0.8em;
}

.ucsd-hypophos-guide__tile-pattern {
	flex: 1 1 auto;
}

.ucsd-hypophos-guide__tile-link {
	color: var(--ucsd-blue);
	font-weight: 600;
}

/* Detail panels */
.ucsd-hypophos-guide__panel {
	scroll-margin-top: 7.5em;
}

.ucsd-hypophos-guide__panel h4 {
	margin: 0 0 0.5em;
}

.ucsd-hypophos-guide__back {
	margin: 1em 0 0;
	font-size: 0.9em;
}

.ucsd-hypophos-guide__citation {
	font-size: 0.85em;
}

/* Tables */
.ucsd-hypophos-guide__table-wrap {
	margin: 0 0 1em;
	overflow-x: auto;
}

.ucsd-hypophos-guide__table {
	width: 100%;
	border-collapse: collapse;
}

.ucsd-hypophos-guide__table th,
.ucsd-hypophos-guide__table td {
	padding: 0.45em 0.6em;
	border-bottom: 1px solid var(--ucsd-cool-gray-4);
	text-align: left;
	vertical-align: top;
}

.ucsd-hypophos-guide__table thead th {
	border-bottom: 2px solid var(--ucsd-navy);
}

.ucsd-hypophos-guide__table tbody th {
	min-width: 10em;
}

.ucsd-hypophos-guide__footer {
	padding-top: 1em;
	border-top: 1px solid var(--ucsd-cool-gray-4);
	font-size: 0.85em;
	color: var(--ucsd-cool-gray-8);
}
