/* Guides & inspiration (inc/guides.php). Loaded only on /guides/ pages, so the
   200 KB shop stylesheet stays as it is. Colours are the shop's tokens from
   style.css (:root --jm-*). */

/* main.site-main.* = 0,2,1: style.css zeroes the .site-main gutter on phones
   with body:not([class*="elementor-page-"]) .site-main (also 0,2,1), and this
   file loads after it, so the same weight is enough to take the gutter back. */
main.site-main.jm-guide,
main.site-main.jm-guides {
	--jm-g-wrap: 1180px;
	--jm-g-text: 720px;
	max-width: var(--jm-g-wrap);
	margin: 0 auto;
	padding: 24px 16px 56px;
	padding-inline-start: 16px;
	padding-inline-end: 16px;
	color: var(--jm-ink);
	font-family: "Inter", sans-serif;
}

.jm-guide-crumbs {
	font-size: 13px;
	color: var(--jm-ink-3);
	margin-bottom: 18px;
}

.jm-guide-crumbs a {
	color: var(--jm-ink-3);
	text-decoration: none;
}

.jm-guide-crumbs a:hover {
	color: var(--jm-water);
	text-decoration: underline;
}

.jm-guide-preview-note {
	background: #fff4e5;
	border: 1px solid var(--jm-ember);
	color: var(--jm-ink);
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 14px;
	margin: 0 0 18px;
}

/* ---------- one guide: head ---------- */

.jm-guide-head {
	max-width: 860px;
}

.jm-guide-cat,
.jm-gcard-cat {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--jm-ember);
	text-decoration: none;
	margin-bottom: 10px;
}

.jm-guide-title,
.jm-guides-title {
	font-size: clamp(28px, 4.2vw, 44px);
	line-height: 1.15;
	font-weight: 700;
	color: var(--jm-forest);
	margin: 0 0 14px;
	letter-spacing: -.01em;
}

.jm-guide-lead,
.jm-guides-lead {
	font-size: clamp(17px, 1.6vw, 20px);
	line-height: 1.55;
	color: var(--jm-ink-2);
	margin: 0 0 16px;
	max-width: var(--jm-g-text);
}

.jm-guide-byline {
	font-size: 14px;
	color: var(--jm-ink-3);
	margin: 0 0 24px;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 8px;
}

.jm-guide-hero {
	margin: 0 0 32px;
}

.jm-guide-hero img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 12px;
	background: var(--jm-sand);
}

.jm-guide-hero figcaption {
	font-size: 13px;
	color: var(--jm-ink-3);
	margin-top: 8px;
}

/* ---------- one guide: body ---------- */

.jm-guide-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
}

@media (min-width: 1024px) {
	.jm-guide-layout {
		grid-template-columns: 240px minmax(0, var(--jm-g-text));
		gap: 56px;
	}

	.jm-guide-toc {
		position: sticky;
		top: 120px;
		align-self: start;
	}
}

.jm-guide-toc {
	background: var(--jm-sand);
	border-radius: 10px;
	padding: 16px 18px;
	font-size: 14px;
}

.jm-guide-toc-title {
	font-weight: 700;
	margin: 0 0 8px;
	color: var(--jm-forest);
}

.jm-guide-toc ol {
	margin: 0;
	padding-left: 18px;
}

.jm-guide-toc li {
	margin: 6px 0;
	line-height: 1.4;
}

.jm-guide-toc a {
	color: var(--jm-ink-2);
	text-decoration: none;
}

.jm-guide-toc a:hover {
	color: var(--jm-water);
	text-decoration: underline;
}

.jm-guide-content {
	font-size: 17px;
	line-height: 1.7;
}

.jm-guide-content > * + * {
	margin-top: 1em;
}

.jm-guide-content h2,
.jm-guide-faq h2,
.jm-guide-sources h2 {
	font-size: clamp(22px, 2.4vw, 28px);
	line-height: 1.25;
	color: var(--jm-forest);
	margin: 1.8em 0 .6em;
	scroll-margin-top: 110px;
}

.jm-guide-content h3 {
	font-size: 20px;
	line-height: 1.3;
	color: var(--jm-forest);
	margin: 1.5em 0 .4em;
}

.jm-guide-content p,
.jm-guide-content li {
	color: var(--jm-ink);
}

.jm-guide-content ul,
.jm-guide-content ol {
	padding-left: 1.3em;
}

.jm-guide-content li + li {
	margin-top: .4em;
}

.jm-guide-content a {
	color: var(--jm-water);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.jm-guide-content img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
}

.jm-guide-content figure {
	margin: 1.6em 0;
}

.jm-guide-content figcaption {
	font-size: 13px;
	color: var(--jm-ink-3);
	margin-top: 6px;
}

/* the short answer box at the top of a guide */
.jm-guide-content .jm-answer {
	background: var(--jm-sand);
	border-left: 4px solid var(--jm-water);
	border-radius: 0 10px 10px 0;
	padding: 16px 20px;
}

.jm-guide-content .jm-answer p:first-child {
	margin-top: 0;
}

.jm-guide-content .jm-note {
	border: 1px solid var(--jm-line);
	border-radius: 10px;
	padding: 14px 18px;
	font-size: 15px;
}

/* tables scroll sideways on a phone instead of widening the page */
.jm-guide-content .jm-table {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.jm-guide-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 1.45;
	min-width: 520px;
}

.jm-guide-content th,
.jm-guide-content td {
	text-align: left;
	vertical-align: top;
	padding: 10px 12px;
	border-bottom: 1px solid var(--jm-line);
}

.jm-guide-content th {
	background: var(--jm-sand);
	color: var(--jm-forest);
	font-weight: 600;
}

/* ---------- FAQ, sources ---------- */

.jm-guide-faq details {
	border-bottom: 1px solid var(--jm-line);
	padding: 14px 0;
}

.jm-guide-faq summary {
	cursor: pointer;
	font-weight: 600;
	font-size: 17px;
	color: var(--jm-forest);
	list-style: none;
	position: relative;
	padding-right: 28px;
}

.jm-guide-faq summary::-webkit-details-marker {
	display: none;
}

.jm-guide-faq summary::after {
	content: "+";
	position: absolute;
	right: 4px;
	top: -2px;
	font-size: 22px;
	font-weight: 400;
	color: var(--jm-ink-3);
}

.jm-guide-faq details[open] summary::after {
	content: "\2212";
}

.jm-guide-faq details p {
	margin: 10px 0 0;
	line-height: 1.65;
	font-size: 16px;
}

.jm-guide-sources ol {
	padding-left: 1.3em;
	font-size: 15px;
	line-height: 1.55;
	color: var(--jm-ink-2);
}

.jm-guide-sources li + li {
	margin-top: 6px;
}

.jm-guide-sources a {
	color: var(--jm-water);
	word-break: break-word;
}

/* ---------- call to action ---------- */

.jm-guide-cta {
	margin: 40px 0 0;
	background: var(--jm-forest);
	color: var(--jm-cream);
	border-radius: 12px;
	padding: 24px;
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	align-items: center;
	justify-content: space-between;
}

.jm-guide-cta p {
	margin: 0;
	color: var(--jm-cream);
	line-height: 1.5;
}

.jm-guide-cta-title {
	font-size: 20px;
	font-weight: 700;
	margin-bottom: 4px !important;
	color: #fff !important;
}

.jm-guide-cta-btns {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.jm-guide-btn {
	display: inline-block;
	background: #fff;
	color: var(--jm-forest);
	font-weight: 600;
	font-size: 15px;
	padding: 12px 20px;
	border-radius: 8px;
	text-decoration: none;
	border: 1px solid #fff;
}

.jm-guide-btn:hover,
.jm-guide-btn:focus {
	background: var(--jm-cream);
	color: var(--jm-forest);
}

.jm-guide-btn-ghost {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, .6);
}

.jm-guide-btn-ghost:hover,
.jm-guide-btn-ghost:focus {
	background: var(--jm-forest-soft);
	color: #fff;
}

/* ---------- products, about, related ---------- */

.jm-guide-products,
.jm-guide-related {
	margin-top: 56px;
}

.jm-guide-products h2,
.jm-guide-related h2 {
	font-size: 24px;
	color: var(--jm-forest);
	margin: 0 0 18px;
}

.jm-gprod-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

@media (min-width: 768px) {
	.jm-gprod-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 20px;
	}
}

.jm-gprod {
	display: flex;
	flex-direction: column;
	gap: 4px;
	text-decoration: none;
	color: var(--jm-ink);
}

.jm-gprod-img img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 10px;
	background: var(--jm-sand);
	margin-bottom: 6px;
}

.jm-gprod-name {
	font-weight: 600;
	font-size: 15px;
	line-height: 1.35;
	color: var(--jm-forest);
}

.jm-gprod-price {
	font-size: 14px;
	color: var(--jm-ink-2);
}

.jm-gprod-go {
	font-size: 14px;
	color: var(--jm-water);
	font-weight: 600;
}

.jm-guide-about {
	margin-top: 48px;
	border-top: 1px solid var(--jm-line);
	padding-top: 20px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--jm-ink-2);
	max-width: 860px;
}

.jm-guide-all {
	margin-top: 18px;
	font-weight: 600;
}

/* ---------- cards (list, category, related) ---------- */

.jm-ggrid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 28px;
}

@media (min-width: 640px) {
	.jm-ggrid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.jm-ggrid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.jm-gcard {
	display: flex;
	flex-direction: column;
}

.jm-gcard-img {
	display: block;
	border-radius: 12px;
	overflow: hidden;
	background: var(--jm-sand);
	aspect-ratio: 3 / 2;
	margin-bottom: 14px;
}

.jm-gcard-img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s ease;
}

.jm-gcard:hover .jm-gcard-img img {
	transform: scale(1.03);
}

.jm-gcard-title {
	font-size: 20px;
	line-height: 1.3;
	margin: 0 0 8px;
	font-weight: 700;
}

.jm-gcard-title a {
	color: var(--jm-forest);
	text-decoration: none;
}

.jm-gcard-title a:hover {
	color: var(--jm-water);
	text-decoration: underline;
}

.jm-gcard-excerpt {
	font-size: 15px;
	line-height: 1.55;
	color: var(--jm-ink-2);
	margin: 0 0 8px;
}

.jm-gcard-meta {
	font-size: 13px;
	color: var(--jm-ink-3);
	margin: 0;
}

/* ---------- list page ---------- */

.jm-guides-head {
	margin-bottom: 32px;
}

.jm-guides-terms {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

.jm-guides-terms a {
	font-size: 14px;
	padding: 7px 14px;
	border: 1px solid var(--jm-line-strong);
	border-radius: 999px;
	color: var(--jm-ink-2);
	text-decoration: none;
}

.jm-guides-terms a[aria-current="page"],
.jm-guides-terms a:hover {
	background: var(--jm-forest);
	border-color: var(--jm-forest);
	color: #fff;
}

.jm-guides-empty {
	font-size: 17px;
	color: var(--jm-ink-2);
}

.jm-guides .pagination,
.jm-guides .nav-links {
	display: flex;
	gap: 10px;
	justify-content: center;
	margin-top: 36px;
}

@media (min-width: 768px) {
	main.site-main.jm-guide,
	main.site-main.jm-guides {
		padding: 32px 24px 72px;
		padding-inline-start: 24px;
		padding-inline-end: 24px;
	}
}
