/* ==========================================================================
   Buying Guides — single guide + index
   Loaded ONLY by templates/cms/buying_guide.template.html (single guide)
   and templates/cms/buying_guides.template.html (index).
   Built from the Rider Guides mockup (kx-guide-mockup-css).

   All rules are scoped to .kx-guide so the file is inert anywhere else.
   ========================================================================== */

html {
	scroll-behavior: smooth;
}

.kx-guide {
	--kx-yellow: #ffe000;
	--kx-ink: #111;
	--kx-soft: #f4f4f2;
	--kx-line: #deded9;
	--kx-muted: #5a5a57;
}

.kx-guide *,
.kx-guide *:before,
.kx-guide *:after {
	box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.kx-guide-hero {
	background: linear-gradient(120deg, #111 0%, #2b2b2b 68%, #141414 100%);
	color: #fff;
	position: relative;
	overflow: hidden;
}

.kx-guide-hero:after {
	content: "";
	position: absolute;
	right: -100px;
	top: -150px;
	width: 430px;
	height: 430px;
	border: 65px solid rgba(255, 224, 0, .13);
	border-radius: 50%;
}

.kx-guide-hero__inner {
	max-width: 1160px;
	margin: 0 auto;
	padding: 64px 28px 58px;
	position: relative;
	z-index: 1;
}

.kx-guide .kx-eyebrow {
	display: inline-block;
	background: var(--kx-yellow);
	color: #111;
	padding: 7px 12px;
	font: 800 12px/1 Arial, sans-serif;
	letter-spacing: .13em;
	margin-bottom: 20px;
}

.kx-guide-hero h1 {
	max-width: 850px;
	color: #fff !important;
	font: 800 clamp(36px, 5vw, 64px)/1.02 Arial, sans-serif !important;
	letter-spacing: -.035em;
	margin: 0 0 18px !important;
	text-align: left !important;
}

.kx-guide-dek {
	font: 400 clamp(18px, 2vw, 23px)/1.45 Arial, sans-serif;
	max-width: 690px;
	margin: 0;
	color: #e7e7e7;
}

.kx-guide-meta {
	margin-top: 28px;
	font: 700 12px/1.2 Arial, sans-serif;
	letter-spacing: .11em;
	text-transform: uppercase;
	color: var(--kx-yellow);
}

/* --------------------------------------------------------------------------
   Layout + "On this page"
   -------------------------------------------------------------------------- */

.kx-guide-grid {
	max-width: 1160px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 270px minmax(0, 760px);
	gap: 64px;
	padding: 54px 28px 100px;
	justify-content: center;
}

/* No h2s in the body: the aside stays hidden, let the article sit centred */
.kx-guide-toc[hidden] {
	display: none;
}

.kx-guide-grid:has(.kx-guide-toc[hidden]) {
	grid-template-columns: minmax(0, 760px);
}

.kx-guide-toc {
	align-self: start;
	position: sticky;
	top: 24px;
	border-top: 5px solid var(--kx-yellow);
	background: var(--kx-soft);
	padding: 24px 22px;
	transition: top .4s ease-in-out;
}

/* The site header slides back in on scroll up (#main-content.up), so push the
   sticky list below it. --kx-header-h is set by js/buying-guide.js. */
#main-content.up .kx-guide-toc {
	top: calc(var(--kx-header-h, 0px) + 24px);
}

.kx-guide-toc__title {
	font: 800 13px/1 Arial, sans-serif;
	letter-spacing: .1em;
	text-transform: uppercase;
	margin: 0 0 15px;
}

.kx-guide-toc ol {
	list-style: none;
	padding: 0;
	margin: 0;
}

.kx-guide-toc li {
	border-top: 1px solid var(--kx-line);
	margin: 0;
	padding: 10px 0;
}

.kx-guide-toc a {
	font: 600 13px/1.3 Arial, sans-serif;
	color: #242424;
	text-decoration: none;
}

.kx-guide-toc a:hover {
	text-decoration: underline;
}

.kx-toc-mobile {
	display: none;
}

/* --------------------------------------------------------------------------
   Article
   -------------------------------------------------------------------------- */

.kx-article {
	font-size: 18px !important;
	line-height: 1.68 !important;
	color: #292929;
}

.kx-article > p:first-child {
	font-size: 22px;
	line-height: 1.52;
	color: #111;
	margin-top: 0;
}

.kx-article p {
	margin: 0 0 20px;
}

.kx-article h2 {
	font: 800 clamp(27px, 3vw, 36px)/1.15 Arial, sans-serif !important;
	letter-spacing: -.025em;
	color: #1e1e1e;
	margin: 62px 0 22px !important;
	padding-top: 12px;
	border-top: 5px solid var(--kx-yellow);
	scroll-margin-top: 24px;
}

.kx-article h3 {
	font: 800 23px/1.25 Arial, sans-serif !important;
	color: #2b2b2b;
	margin: 36px 0 16px !important;
}

.kx-article ul {
	padding-left: 0;
	margin: 10px 0 28px;
	list-style: none;
}

.kx-article li {
	position: relative;
	padding: 7px 0 7px 30px;
}

.kx-article li:before {
	content: "";
	position: absolute;
	left: 3px;
	top: 17px;
	width: 10px;
	height: 10px;
	background: var(--kx-yellow);
	box-shadow: 3px 3px 0 #111;
}

.kx-article .kx-quick-answer {
	background: #fff8bf;
	border-left: 7px solid var(--kx-yellow);
	padding: 22px 24px;
	margin: 28px 0 34px !important;
	font-size: 18px;
}

.kx-article .kx-quick-answer strong:first-child {
	display: block;
	font: 800 12px/1 Arial, sans-serif;
	letter-spacing: .1em;
	text-transform: uppercase;
	margin-bottom: 8px;
}

.kx-article a {
	color: #111;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-decoration-color: #d5b900;
	text-underline-offset: 3px;
}

.kx-article .table-responsive {
	margin: 24px 0 34px;
	border: 1px solid var(--kx-line);
	border-radius: 3px;
	overflow-x: auto;
}

.kx-article table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
}

.kx-article th {
	background: #1f1f1f;
	color: #fff;
	text-align: left;
}

.kx-article th,
.kx-article td {
	padding: 13px 15px !important;
	border-bottom: 1px solid var(--kx-line) !important;
	vertical-align: top;
}

.kx-article th p,
.kx-article td p {
	margin: 0;
}

/* --------------------------------------------------------------------------
   Index — card grid
   -------------------------------------------------------------------------- */

.kx-guide-index .kx-guide-hero__inner {
	max-width: 1320px;
}

.kx-guide-index__wrap {
	max-width: 1320px;
	margin: 0 auto;
	padding: 54px 28px 100px;
}

.kx-guide-index__intro {
	max-width: 760px;
	margin: 0 0 40px;
	font-size: 18px;
	line-height: 1.6;
	color: #292929;
}

.kx-guide-index__intro p {
	margin: 0 0 16px;
}

.kx-guide-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
}

.kx-guide-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--kx-line);
	border-top: 5px solid var(--kx-yellow);
	transition: box-shadow .2s, transform .2s;
}

.kx-guide-card:hover {
	box-shadow: 0 10px 26px rgba(0, 0, 0, .09);
	transform: translateY(-3px);
}

.kx-guide-card__media {
	display: block;
	text-decoration: none !important;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--kx-soft);
}

.kx-guide-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* No image uploaded: the hero treatment in miniature */
.kx-guide-card__placeholder {
	position: relative;
	display: flex;
	align-items: flex-end;
	height: 100%;
	padding: 18px 20px;
	overflow: hidden;
	background: linear-gradient(120deg, #111 0%, #2b2b2b 68%, #141414 100%);
}

.kx-guide-card__placeholder:after {
	content: "";
	position: absolute;
	right: -60px;
	top: -80px;
	width: 220px;
	height: 220px;
	border: 34px solid rgba(255, 224, 0, .13);
	border-radius: 50%;
	transition: transform .4s ease;
}

.kx-guide-card:hover .kx-guide-card__placeholder:after {
	transform: scale(1.08);
}

.kx-guide-card__placeholder .kx-eyebrow {
	position: relative;
	z-index: 1;
	margin: 0;
	font-size: 11px;
	color: #111;
}

.kx-guide-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 22px 22px 24px;
}

.kx-guide-card__title {
	font: 800 20px/1.2 Arial, sans-serif !important;
	letter-spacing: -.01em;
	margin: 0 0 10px !important;
	text-align: left !important;
}

.kx-guide-card__title a {
	color: #1e1e1e;
	text-decoration: none;
}

.kx-guide-card__title a:hover {
	text-decoration: underline;
	text-decoration-color: #d5b900;
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.kx-guide-card__excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
	font-size: 15px;
	line-height: 1.55;
	color: var(--kx-muted);
	margin: 0 0 18px;
}

.kx-guide-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	font: 700 11px/1.3 Arial, sans-serif;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--kx-muted);
	margin: 0 0 18px;
}

.kx-guide-card__btn {
	margin-top: auto;
	align-self: flex-start;
	background: var(--kx-yellow);
	color: #111 !important;
	padding: 11px 15px;
	font: 800 12px/1 Arial, sans-serif;
	letter-spacing: .08em;
	text-transform: uppercase;
	text-decoration: none !important;
}

.kx-guide-card__btn:after {
	content: "  \2192";
}

.kx-guide-card__btn:hover {
	background: #111;
	color: #fff !important;
}

.kx-guide-index__paging {
	margin-top: 44px;
}

.kx-guide-index__paging .pagination {
	justify-content: center;
}

@media (max-width: 900px) {
	.kx-guide-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px;
	}
}

@media (max-width: 560px) {
	.kx-guide-cards {
		grid-template-columns: 1fr;
	}
}

/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */

@media (max-width: 800px) {
	.kx-guide-hero__inner {
		padding: 42px 20px 38px;
	}

	.kx-guide-hero h1 {
		font-size: 37px !important;
	}

	.kx-guide-dek {
		font-size: 18px;
	}

	.kx-guide-grid {
		display: block;
		padding: 28px 20px 70px;
	}

	.kx-guide-index__wrap {
		padding: 32px 20px 70px;
	}

	.kx-guide-toc {
		position: static;
		margin-bottom: 30px;
		padding: 18px;
	}

	.kx-guide-toc > .kx-guide-toc__title,
	.kx-guide-toc > ol {
		display: none;
	}

	.kx-toc-mobile {
		display: block;
	}

	.kx-toc-mobile summary {
		cursor: pointer;
		background: #111;
		color: #fff;
		padding: 13px 14px;
		font: 700 14px/1.2 Arial, sans-serif;
	}

	.kx-toc-mobile ol {
		display: block;
		margin-top: 10px;
	}

	.kx-article {
		font-size: 17px !important;
		line-height: 1.62 !important;
	}

	.kx-article > p:first-child {
		font-size: 20px;
	}

	.kx-article h2 {
		margin-top: 48px !important;
		font-size: 28px !important;
	}

	.kx-article h3 {
		font-size: 21px !important;
	}

	.kx-article .kx-quick-answer {
		padding: 18px;
		margin: 22px 0 28px !important;
	}
}
