/* ==========================================================================
   Grow, Leaf Doctor, Glossary, articles and the plain reference pages

   Same type as the rest of the site: League Gothic for page headings, Archivo
   for everything else. Hooked after base.css and library.css, which it overrides.
   ========================================================================== */

/* Page headings ------------------------------------------------------------ */

.bud-reference-header,
.bud-archive-header {
	margin: clamp(1rem, 2vw, 1.5rem) 0 1.5rem;
	padding: 0;
	border: 0;
}

.bud-reference-header::after,
.bud-archive-header::after {
	display: none;
}

.bud-title,
.bud-archive-header h1 {
	margin: 0 0 0.5rem;
	font-family: var(--bud-face);
	font-size: clamp(2.5rem, 5vw, 3.75rem);
	font-weight: 400;
	line-height: 1;
	letter-spacing: 0;
	text-transform: uppercase;
	color: #fff;
}

.bud-standfirst,
.bud-definition {
	max-width: 46rem;
	font-family: var(--bud-sans);
	font-size: 1.1rem;
	line-height: 1.5;
	color: #dfe4df;
}

.bud-reference-header .bud-eyebrow {
	display: flex;
	flex-wrap: wrap;
	gap: 0.2rem 0.9rem;
	margin: 0 0 0.35rem;
	padding: 0;
	font-size: 0.84rem;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
}

.bud-reference-header .bud-eyebrow a {
	color: var(--bud-lime);
	text-decoration: none;
}

.bud-read-date {
	margin: 0.6rem 0 0;
	font-size: 0.88rem;
	color: #aeb7af;
}

/* Reading layout: the article, a rail beside it ----------------------------- */

.bud-read {
	padding-bottom: clamp(2rem, 4vw, 3.5rem);
}

.bud-read-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: clamp(2rem, 4vw, 3.5rem);
	align-items: start;
}

.bud-read-layout .bud-body {
	max-width: 44rem;
	font-size: 1rem;
	line-height: 1.7;
}

.bud-body h2 {
	margin-top: 2rem;
	padding-bottom: 0;
	border-bottom: 0;
	font-size: 1.4rem;
}

.bud-body img,
.bud-body iframe,
.bud-body video {
	max-width: 100%;
	height: auto;
}

/* A wide table scrolls inside itself rather than pushing the page sideways. */
.bud-body table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
}

.bud-rail {
	display: grid;
	gap: 1.75rem;
	min-width: 0;
}

.bud-rail h2 {
	margin: 0 0 0.5rem;
	padding: 0;
	border: 0;
	font-family: var(--bud-face);
	font-size: 1.5rem;
	font-weight: 400;
	line-height: 1;
	text-transform: uppercase;
	color: #fff;
}

.bud-rail ol,
.bud-rail ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bud-rail li {
	border-top: 1px solid var(--bud-line);
}

.bud-rail li a {
	display: block;
	padding: 0.5rem 0;
	font-size: 0.92rem;
	line-height: 1.3;
	color: #dfe4df;
	text-decoration: none;
}

.bud-rail li a:hover,
.bud-rail-all:hover {
	color: var(--bud-lime);
}

.bud-rail-all {
	display: inline-block;
	margin-top: 0.5rem;
	font-size: 0.88rem;
	font-weight: 600;
	color: #fff;
	text-decoration: none;
}

.bud-rail-follow {
	position: sticky;
	top: 96px;
}

.bud-toc-phone {
	display: none;
}

.bud-triage-card {
	padding: 1rem 1.1rem;
	border: 0;
	border-radius: 14px;
	background: var(--bud-surface);
	font-size: 0.92rem;
	line-height: 1.45;
}

.bud-triage-card ol {
	counter-reset: none;
}

.bud-triage-card ol li {
	padding: 0.5rem 0;
}

.bud-triage-card ol li a,
.bud-triage-card p a {
	display: inline;
	padding: 0;
	color: var(--bud-lime);
}

.bud-triage-card p {
	margin: 0.5rem 0 0;
}

.bud-article-tail .bud-triage-card {
	margin-bottom: 1.5rem;
}

.bud-reassure {
	max-width: 44rem;
	border-radius: 12px;
}

.bud-sources-list {
	max-width: 44rem;
	margin-top: 2rem;
	font-size: 0.9rem;
	line-height: 1.45;
	overflow-wrap: anywhere;
}

.bud-sources-list h2 {
	margin: 0 0 0.5rem;
	font-size: 1.1rem;
}

.bud-sources-list ul {
	margin: 0;
	padding-left: 1.1rem;
}

/* Tiles for guides ---------------------------------------------------------- */

.bud-guide-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 0.625rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bud-guide-grid .bud-index-item {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}

.bud-guide-grid .bud-index-item[hidden] {
	display: none;
}

.bud-guide {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border-radius: 14px;
	background: var(--bud-surface);
	text-decoration: none;
	transition: background 0.15s ease;
}

.bud-guide:hover {
	background: var(--bud-surface-elevated);
}

.bud-guide-art {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.bud-guide-art img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.25s ease;
}

.bud-guide:hover .bud-guide-art img {
	transform: scale(1.03);
}

.bud-guide-art.is-blank {
	display: grid;
	place-items: center;
	background: var(--bud-surface-elevated);
}

.bud-guide-art.is-blank img {
	width: 20%;
	height: auto;
	opacity: 0.35;
}

.bud-guide-copy {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	padding: 0.9rem 1rem 1.05rem;
}

.bud-guide em {
	font-size: 0.8rem;
	font-style: normal;
	font-weight: 700;
	color: var(--bud-lime);
}

.bud-guide strong {
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.25;
	color: #fff;
}

.bud-guide:hover strong {
	color: var(--bud-lime);
}

.bud-guide-copy > span {
	font-size: 0.9rem;
	line-height: 1.4;
	color: #aeb7af;
}

/* A guide or article with a featured image */
.bud-article-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	margin: clamp(0.75rem, 2vw, 1.25rem) 0 clamp(1.5rem, 3vw, 2.25rem);
	overflow: hidden;
	border-radius: 18px;
	background: var(--bud-surface);
}

.bud-article-hero .bud-reference-header {
	align-self: center;
	margin: 0;
	padding: clamp(1.5rem, 4vw, 3.5rem);
}

.bud-article-hero-picture {
	min-height: 320px;
}

.bud-article-hero-picture img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bud-rail a.has-thumb {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr);
	gap: 0.7rem;
	align-items: center;
}

.bud-rail a.has-thumb img {
	display: block;
	width: 56px;
	height: 56px;
	border-radius: 8px;
	object-fit: cover;
}

.bud-learn-section {
	margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.bud-learn-section h2 {
	margin: 0 0 0.75rem;
	padding: 0;
	border: 0;
	font-family: var(--bud-face);
	font-size: clamp(1.6rem, 2.4vw, 2rem);
	font-weight: 400;
	line-height: 1;
	text-transform: uppercase;
	color: #fff;
}

/* Topic links, plain text along a rule */
.bud-link-row {
	display: flex;
	gap: 1.25rem;
	margin: 0 0 1.5rem;
	border-bottom: 1px solid var(--bud-line-strong);
	overflow-x: auto;
	scrollbar-width: none;
}

.bud-link-row a {
	flex: none;
	padding: 0.5rem 0;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	font-size: 0.92rem;
	font-weight: 600;
	color: #c9d0ca;
	text-decoration: none;
}

.bud-link-row a:hover {
	color: #fff;
}

.bud-link-row a[aria-current] {
	border-bottom-color: var(--bud-lime);
	color: #fff;
}

/* Grow's way into Leaf Doctor */
.bud-leaf-banner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 112px;
	margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
	padding: 1.1rem 1.25rem;
	overflow: hidden;
	border-radius: 14px;
	background: var(--bud-surface);
	color: #fff;
	text-decoration: none;
}

.bud-leaf-banner img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.3;
}

.bud-leaf-banner div,
.bud-leaf-banner > span {
	position: relative;
}

.bud-leaf-banner strong {
	display: block;
	font-family: var(--bud-face);
	font-size: clamp(1.6rem, 2.4vw, 2.1rem);
	font-weight: 400;
	line-height: 1.05;
	text-transform: uppercase;
}

.bud-leaf-banner p {
	margin: 0.2rem 0 0;
	font-size: 0.92rem;
	color: #dfe4df;
}

.bud-leaf-banner > span {
	flex: none;
	font-weight: 700;
	color: var(--bud-lime);
}

/* Search --------------------------------------------------------------------- */

.bud-archive-header .bud-search-form {
	max-width: 36rem;
}

.bud-search-form input[type="search"] {
	min-width: 0;
}

/* Wide screens: contents on the left, the article in the middle, more on the right,
   so the page fills the container without stretching the lines of text. */
@media (min-width: 1280px) {
	.bud-read-layout:has(.bud-rail > .bud-toc:not([hidden])) {
		grid-template-columns: 240px minmax(0, 1fr) 300px;
		grid-template-rows: repeat(3, auto) 1fr;
	}

	.bud-read-layout:has(.bud-rail > .bud-toc:not([hidden])) .bud-read-main {
		grid-column: 2;
		grid-row: 1 / span 4;
		justify-self: center;
		width: 100%;
		max-width: 44rem;
	}

	.bud-read-layout:has(.bud-rail > .bud-toc:not([hidden])) .bud-rail {
		display: contents;
	}

	.bud-rail > .bud-toc:not([hidden]) {
		position: sticky;
		top: 96px;
		grid-column: 1;
		grid-row: 1 / span 4;
		align-self: start;
	}

	.bud-read-layout:has(.bud-rail > .bud-toc:not([hidden])) .bud-rail > :not(.bud-toc) {
		grid-column: 3;
		align-self: start;
		margin-bottom: 1.75rem;
	}
}

/* Phones and tablets ---------------------------------------------------------- */

@media (max-width: 980px) {
	.bud-read-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.bud-rail .bud-toc {
		display: none;
	}

	.bud-rail-follow {
		position: static;
	}

	.bud-toc-phone:not([hidden]) {
		display: block;
		max-width: 44rem;
		margin-bottom: 1.25rem;
		padding: 0.7rem 1rem;
		border-radius: 12px;
		background: var(--bud-surface);
	}

	.bud-toc-phone summary {
		font-weight: 700;
		color: #fff;
		cursor: pointer;
	}

	.bud-toc-phone ol {
		margin: 0.5rem 0 0;
		padding: 0;
		list-style: none;
	}

	.bud-toc-phone a {
		display: block;
		padding: 0.45rem 0;
		color: #dfe4df;
		text-decoration: none;
	}

}

@media (max-width: 760px) {
	.bud-article-hero {
		grid-template-columns: minmax(0, 1fr);
	}

	.bud-article-hero-picture {
		order: -1;
		min-height: 0;
		aspect-ratio: 16 / 10;
	}

	.bud-leaf-banner {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.4rem;
	}

}
