/*
 * Guide page — owner's requests 03.10:
 * - the byline and the author box link to the author's profile;
 * - "Next guide" is a real card with a picture;
 * - "Related guides" fill the row from left to right (five guides are rendered; as many as fit one row are shown);
 * - a wider reading layout: text column ≈ 796 px, 18 px body type, the cover no wider than TOC + column (16:9),
 *   "On this page" a sticky card widget with an active item (end of this file).
 * The page's generated CSS (assets/css/p/learn-guide.css) sits in @layer el: these unlayered rules win over it.
 */

/* author links keep the design's look; the name underlines on hover */
a.wc-author-link { color: inherit; text-decoration: none; }
a.wc-author-link:hover .cmCydfB,
.cbqtaVy a.wc-author-link:hover { text-decoration: underline; text-underline-offset: 3px; }
a.wc-author-link:focus-visible { outline: 2px solid var(--tAWe4DZ); outline-offset: 4px; border-radius: 12px; }

/* next guide card */
.cdLTj6B.wc-next {
	display: grid;
	grid-template-columns: 168px minmax(0, 1fr);
	align-items: center;
	gap: 18px;
	padding: 14px;
	text-align: left;
}
.wc-next__img {
	display: block;
	width: 168px;
	height: 94px;
	border-radius: 14px;
	object-fit: cover;
	transition: transform .45s cubic-bezier(.25, .1, .25, 1);
}
.cdLTj6B.wc-next:hover .wc-next__img { transform: scale(1.03); }
.wc-next__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	padding-right: 8px;
}
.wc-next .ctml90p { font-weight: 600; letter-spacing: .02em; color: var(--tAWe4DZ); }
.wc-next .cPfHPgo { font-size: 17px; line-height: 1.3; }
.wc-next__meta { font-size: 13px; color: var(--tT6XaDa); }
@media (max-width: 520px) {
	.cdLTj6B.wc-next { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 12px; }
	.wc-next__img { width: 112px; height: 72px; border-radius: 12px; }
	.wc-next .cPfHPgo { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
	.wc-next__img { transition: none; }
	.cdLTj6B.wc-next:hover .wc-next__img { transform: none; }
}

/* related guides: full rows only — 1 / 2 / 3 / 4 / 5 columns by width, extra cards hidden */
.cSVNEFe { grid-template-columns: minmax(0, 1fr); }
.cSVNEFe > :nth-child(n+4) { display: none; }
@media (min-width: 640px) {
	.cSVNEFe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cSVNEFe > :nth-child(n+4) { display: flex; }
	.cSVNEFe > :nth-child(n+5) { display: none; }
}
@media (min-width: 1000px) {
	.cSVNEFe { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.cSVNEFe > :nth-child(n+4) { display: none; }
}
@media (min-width: 1360px) {
	.cSVNEFe { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.cSVNEFe > :nth-child(4) { display: flex; }
}
@media (min-width: 1700px) {
	.cSVNEFe { grid-template-columns: repeat(5, minmax(0, 1fr)); }
	.cSVNEFe > :nth-child(5) { display: flex; }
}

/* ---- reading layout (owner 03.10): the column is wider, the cover is no wider than the layout ----
 * --lg-w is the layout's width: TOC + gap + column on wide screens (1100 px at 1440, the cover's own width),
 * the column alone below 1100 px (the TOC turns into the <details> list inside the column there). */
.cvGdoQD {
	--lg-col: 796px;
	--lg-toc: clamp(220px, 18vw, 256px);
	--lg-gap: clamp(32px, 3.4vw, 48px);
	--lg-w: var(--lg-col);
}
@media (width >= 1100px) {
	.cvGdoQD { --lg-w: calc(var(--lg-toc) + var(--lg-gap) + var(--lg-col)); }
	.c8OOiWO { grid-template-columns: var(--lg-toc) minmax(0, var(--lg-col)); column-gap: var(--lg-gap); }
}
@media (width < 1100px) {
	.c8OOiWO { grid-template-columns: minmax(0, var(--lg-col)); }
}
.clkeYX3 { max-width: var(--lg-col); }
.cGd0XgO { max-width: var(--lg-w); margin-inline: auto; } /* breadcrumbs start where the cover and the text start */
.cNKZYsp { max-width: var(--lg-w); }
.cV4l5jK { aspect-ratio: 16 / 9; } /* the covers are 16:9 (1280×720): nothing of them is cut; corners stay 28 px */

/* body type: 18 px (17 px on phones), line-height 1.65; headings and blocks scaled to match */
.cYshfdw,
.chYkD3e { font-size: 18px; line-height: 1.65; }
.cu9nKvY { margin-top: calc(0.825em - 3.5px); } /* list dot on the first line's middle */
.caEbXf9,
.cNIO4nF { font-size: clamp(26px, 2.35vw, 36px); line-height: 1.18; }
.cgx4CRo { font-size: 17px; line-height: 1.55; }
.cZbI9Hn { font-size: 17px; line-height: 1.6; }
.csMm011 { font-size: 17px; }
.ctSftiH { font-size: 15px; line-height: 1.5; }
.cUanZ1i,
.cQZfJRn { font-size: 16px; line-height: 1.5; }
.cknzcCb { font-size: 18px; }
.ceIgKpb { font-size: 17px; line-height: 1.65; }
.c1HNssW { font-size: 15px; }
.clkeYX3 .wc-callout__head,
.clkeYX3 .wc-callout__text,
.clkeYX3 .wc-checklist li,
.clkeYX3 .wc-proscons li { font-size: 17px; }
.clkeYX3 .wc-callout__text,
.clkeYX3 .wc-checklist li,
.clkeYX3 .wc-proscons li { line-height: 1.6; }
.clkeYX3 .wc-glance dd { font-size: 17px; }
@media (width >= 641px) {
	.clkeYX3 .wc-table { font-size: 16px; }
	.clkeYX3 .wc-table thead th { font-size: 14px; }
}
@media (width < 600px) {
	.cYshfdw,
	.chYkD3e { font-size: 17px; }
	.cgx4CRo,
	.ceIgKpb { font-size: 16.5px; }
}

/* ---- "On this page" widget (wide screens): a sticky card under the header, its own scroll when taller than the
 * window; the item of the section in view is marked by assets/js/p/learn-guide.js (aria-current="location") ---- */
@media (width >= 1100px) {
	.cz4pXXd {
		top: 96px; /* header 72 px + 24 px */
		max-height: calc(100vh - 120px);
		overflow-y: auto;
		overscroll-behavior: contain;
		gap: 2px;
		padding: 16px 10px 10px;
		border-radius: 20px;
		background: var(--t1P7HTr);
		scrollbar-width: thin;
		scrollbar-color: var(--tzwqNZT) transparent;
	}
}
.cz4pXXd > .cxQyDkV {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0 2px 6px;
	padding: 0 10px 12px;
	border-bottom: var(--tchjps9);
	font-size: 12px;
	line-height: 1.2;
	color: var(--tT6XaDa);
}
.cz4pXXd > .cxQyDkV::before { /* a small list mark: three accent lines */
	content: "";
	flex: none;
	width: 13px;
	height: 2px;
	border-radius: 2px;
	background: var(--tRVw0a9);
	box-shadow: 0 4px 0 var(--tRVw0a9), 0 8px 0 var(--tRVw0a9);
	transform: translateY(-4px);
}
.cz4pXXd > a {
	position: relative;
	display: block;
	padding: 8px 12px 8px 20px;
	border-radius: 12px;
	background: transparent;
	color: var(--tLgByEz);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	text-wrap: pretty;
	transition: none;
}
.cz4pXXd > a::before { /* the active item's accent bar: appears with opacity and transform only */
	content: "";
	position: absolute;
	left: 9px;
	top: 9px;
	bottom: 9px;
	width: 3px;
	border-radius: 3px;
	background: var(--tRVw0a9);
	opacity: 0;
	transform: scaleY(0.3);
	transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.cz4pXXd > a:hover { background: var(--tyeS3s6); color: var(--tZYQMwj); }
.cz4pXXd > a[aria-current="location"] { background: var(--t5ViFMQ); color: var(--tZYQMwj); font-weight: 600; }
.cz4pXXd > a[aria-current="location"]::before { opacity: 1; transform: none; }
.cz4pXXd > a:focus-visible { outline: 2px solid var(--tAWe4DZ); outline-offset: -2px; }
/* the <details> list (tablets, phones) shows the same item as current */
.ckxGjrx > a[aria-current="location"] { color: var(--tZYQMwj); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.cz4pXXd > a::before { transition: none; }
}
