/* ==========================================================================
   Teapotheca — Guide template (How to Use Teapotheca)
   ========================================================================== */

.tp-guide { padding-block: clamp(2rem, 5vw, 4rem); }

.tp-guide__header { max-width: 46rem; }

.tp-guide__layout {
	display: grid;
	grid-template-columns: 13rem minmax(0, 1fr);
	gap: clamp(2.5rem, 5vw, 4.5rem);
	align-items: start;
}

/* The guide body sets its own measure per block, not the global 70ch */
.tp-guide__body.tp-prose { max-width: none; }

/* ---------- On this page ---------- */

.tp-guide-toc {
	position: sticky;
	top: calc(var(--tp-header-h) + 2rem);
	font-size: 0.9375rem;
}
.admin-bar .tp-guide-toc { top: calc(var(--tp-header-h) + 32px + 2rem); }

.tp-guide-toc summary {
	margin-bottom: 0.75rem;
	font-weight: 600;
	color: var(--tp-ink);
	list-style: none;
	cursor: default;
}
.tp-guide-toc summary::-webkit-details-marker { display: none; }

.tp-guide-toc ol {
	margin: 0;
	padding: 0;
	list-style: none;
	border-left: 1px solid var(--tp-rule);
}
.tp-guide-toc li { margin: 0; }
.tp-guide-toc a {
	display: block;
	margin-left: -1px;
	padding: 0.4rem 0 0.4rem 1rem;
	border-left: 2px solid transparent;
	line-height: 1.35;
	text-decoration: none;
	color: rgba(43, 38, 32, 0.72);
}
.tp-guide-toc a:hover { color: var(--tp-ink); }
.tp-guide-toc a.is-current {
	border-left-color: var(--tp-ink);
	color: var(--tp-ink);
	font-weight: 600;
}

/* ---------- Sections ---------- */

.tp-guide__body > .tp-lede { max-width: 42rem; margin: 0 0 1rem; }

.tp-guide-section {
	padding-top: clamp(2.5rem, 5vw, 3.5rem);
	margin-top: clamp(2.5rem, 5vw, 3.5rem);
	border-top: 1px solid var(--tp-rule);
}
.tp-guide-section > h2 { margin: 0 0 1.25rem; font-size: clamp(1.6rem, 3vw, 2.1rem); }

/* Text beside screenshots */
.tp-guide-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 19rem;
	gap: clamp(1.5rem, 3.5vw, 3rem);
	align-items: start;
}
.tp-guide-row + .tp-guide-row { margin-top: 2.25rem; }
.tp-guide-row > div { max-width: 40rem; }
.tp-guide-row h3 { margin: 0 0 0.5rem; font-size: 1.25rem; }
.tp-guide-row > div > :last-child { margin-bottom: 0; }

.tp-guide-shots { display: grid; gap: 1rem; }

/* Screenshots sit in a parchment mount, like a pressed specimen */
.tp-shot {
	margin: 0;
	padding: 0.6rem;
	background: var(--tp-parchment);
	border: 1px solid var(--tp-rule);
	box-shadow: 0 12px 24px -18px rgba(31, 48, 36, 0.55);
}
.tp-shot img {
	display: block;
	width: 100%;
	height: auto;
	background: var(--tp-paper);
}
.tp-shot--narrow img { width: auto; max-width: 100%; max-height: 22rem; margin-inline: auto; }

/* Key list on the herb-entry section */
.tp-guide-keys { padding-left: 0; list-style: none; }
.tp-guide-keys li {
	padding: 0.6rem 0 0.6rem 1rem;
	border-left: 2px solid var(--tp-rule);
}
.tp-guide-keys li + li { margin-top: 0.35rem; }
.tp-guide-keys .is-key { border-left-color: var(--tp-oxblood); }

/* Membership callout */
.tp-guide-callout {
	margin-top: clamp(2.5rem, 5vw, 3.5rem);
	padding: clamp(1.5rem, 4vw, 2.25rem);
	background: var(--tp-parchment);
	border-left: 3px solid var(--tp-bottle);
}
.tp-guide-callout h2 { margin: 0 0 0.75rem; font-size: clamp(1.5rem, 2.8vw, 1.9rem); }
.tp-guide-callout p { max-width: 42rem; }
.tp-guide-callout .tp-cta { margin: 1.5rem 0 0; }

/* Closing note */
.tp-guide-note { max-width: 42rem; }
.tp-guide-note p { font-size: 1rem; color: rgba(43, 38, 32, 0.85); }

/* ---------- Small screens ---------- */

@media (max-width: 999px) {
	.tp-guide__layout { grid-template-columns: 1fr; gap: 1.5rem; }

	.tp-guide-toc {
		position: static;
		padding: 0.9rem 1rem;
		border: 1px solid var(--tp-rule);
		background: var(--tp-paper);
	}
	.tp-guide-toc summary { margin: 0; cursor: pointer; }
	.tp-guide-toc summary::after { content: " +"; color: var(--tp-bottle); }
	.tp-guide-toc[open] summary { margin-bottom: 0.75rem; }
	.tp-guide-toc[open] summary::after { content: " –"; }
}

@media (max-width: 760px) {
	.tp-guide-row { grid-template-columns: 1fr; }
	.tp-guide-shots { max-width: 26rem; }
}
