/* ==========================================================================
   guides.css: /guides/ listing and guide detail pages.
   Loaded by templates/guides/list.html and detail.html via {% block styles %}.

   1. Live covers (.gcv): a small crypto-payment interface per guide
      (apps/guides/covers.py, templates/guides/includes/covers/<kind>.html).
      At rest a cover shows its finished state. It plays while its card is
      hovered or focused (.guide-card), once on load in the guide hero
      (.gcv-play), and on touch screens when scrolled into view (.is-live,
      set by assets/js/guides.js). Only transform/opacity/colour animate.
      Sized in em on a container whose font-size follows its width (cqw),
      so a card cover and the hero cover are the same picture at two sizes.
      prefers-reduced-motion: no movement, finished state only.
   2. Listing: dark hero island with the newest guide, then the card grid.
   3. Guide: dark hero, sticky contents, long-form typography (.guide-prose).
   ========================================================================== */

:root {
	--gg-ink: #0d0f1b;
	--gg-panel: #171a2b;
	--gg-text: #37394d;
	--gg-mist: #f3f4f9;
	--gg-rose: #ed1849;
	--gg-orchid: #e835ce;
	--gg-ok: #33b36b;
	--gg-brand: linear-gradient(114deg, var(--gg-rose) 18.92%, var(--gg-orchid) 81.08%);
}

/* ---------------------------------------------------------------- 1. covers */

.gcv {
	--gcv-cycle: 4.4s;
	--gcv-iter: infinite;
	--gcv-line: rgba(255, 255, 255, .1);
	--gcv-soft: rgba(255, 255, 255, .06);
	--gcv-muted: #8d91ab;
	position: relative;
	isolation: isolate;
	container-type: inline-size;
	display: grid;
	place-items: center;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	color: #e2e5f1;
	background-color: var(--gg-ink);
	background-image:
		radial-gradient(60% 70% at 100% 0%, rgba(232, 53, 206, .32), transparent 70%),
		radial-gradient(55% 60% at 0% 100%, rgba(237, 24, 73, .28), transparent 70%);
	font-family: var(--gc-font-sans-serif);
	font-weight: 400;
	line-height: 1.25;
	font-feature-settings: "tnum";
}
/* faint ledger grid behind the panel */
.gcv::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image:
		linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
	background-size: 8cqw 8cqw;
	mask-image: radial-gradient(80% 80% at 50% 50%, #000 40%, transparent 100%);
}
.gcv-panel {
	width: 78%;
	font-size: 3.6cqw; /* ~14.4px on a 400px cover */
	padding: 1.1em 1.2em 1.2em;
	border: 1px solid var(--gcv-line);
	border-radius: 1.1em;
	background: rgba(23, 26, 43, .86);
	box-shadow: 0 1.5em 3em rgba(0, 0, 0, .35);
	transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
@supports not (font-size: 1cqw) {
	.gcv-panel { font-size: .9rem; }
}
.gcv-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75em;
	margin-bottom: 1em;
}
.gcv-title { font-size: .92em; font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcv-mono { font-family: var(--gc-font-monospace); letter-spacing: -.02em; }
.gcv-pill {
	display: inline-flex;
	align-items: center;
	padding: .3em .75em;
	border-radius: 10em;
	font-size: .72em;
	font-weight: 500;
	white-space: nowrap;
	background: var(--gcv-soft);
	color: #e2e5f1;
}
.gcv-pill.is-ok { background: rgba(51, 179, 107, .16); color: #6fe0a1; }
.gcv-label { font-size: .82em; color: #c9ccdc; }

/* Play state. Animations are only attached while playing (hovered or focused
   card, .gcv-play, .is-live), so at rest every element shows its finished
   state: the base styles below. The hero cover runs one cycle on load. */
.gcv-play { --gcv-iter: 1; }
.gcv-play:hover { --gcv-iter: infinite; }
.guide-card:hover .gcv-play,
.guide-card:focus-within .gcv-play { --gcv-iter: infinite; }

.guide-card:hover .gcv-panel,
.guide-card:focus-within .gcv-panel { transform: translateY(-.25em) scale(1.02); }

/* shared keyframes */
@keyframes gcv-light { 0% { opacity: .25; } 8%, 88% { opacity: 1; } 100% { opacity: .25; } }
@keyframes gcv-glow {
	0% { background: var(--gcv-soft); color: var(--gcv-muted); box-shadow: none; }
	8%, 86% { background: var(--gg-brand); color: #fff; box-shadow: 0 0 1.2em rgba(237, 24, 73, .45); }
	100% { background: var(--gcv-soft); color: var(--gcv-muted); box-shadow: none; }
}
@keyframes gcv-pop { 0%, 70% { opacity: 0; transform: scale(.85); } 76%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; transform: scale(.85); } }
@keyframes gcv-in { 0% { opacity: 0; transform: translateY(.4em); } 8%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes gcv-out { 0% { opacity: 1; } 8%, 90% { opacity: 0; } 100% { opacity: 1; } }
@keyframes gcv-grow { 0% { transform: scaleX(0); } 30%, 88% { transform: scaleX(1); } 100% { transform: scaleX(0); } }

.guide-card:hover .gcv-status, .guide-card:focus-within .gcv-status,
.gcv-play .gcv-status, .gcv.is-live .gcv-status {
	animation: gcv-pop var(--gcv-cycle) ease both var(--gcv-iter);
}

/* --- flow: a payment travels node to node -------------------------------- */
.gcv-flow {
	position: relative;
	display: flex;
	justify-content: space-between;
	padding-top: .3em;
}
.gcv-track {
	position: absolute;
	top: 1.05em;
	left: .75em;
	right: .75em;
	height: 2px;
	background: var(--gcv-line);
	overflow: hidden;
}
.gcv-runner { position: absolute; inset: 0; transform: translateX(0); }
.gcv-packet {
	position: absolute;
	right: 0;
	top: 50%;
	width: 2.4em;
	height: 4px;
	margin-top: -2px;
	border-radius: 2px;
	background: var(--gg-brand);
	opacity: 0;
}
.gcv-node { position: relative; display: flex; flex-direction: column; align-items: center; gap: .55em; width: 0; flex: 1 1 0; }
.gcv-node:first-of-type { align-items: flex-start; }
.gcv-node:last-of-type { align-items: flex-end; }
.gcv-dot {
	width: 1.5em;
	height: 1.5em;
	border-radius: 50%;
	background: var(--gg-brand);
	box-shadow: 0 0 0 .3em rgba(237, 24, 73, .15);
}
.gcv-flow .gcv-label { white-space: nowrap; font-size: .76em; }

@keyframes gcv-run {
	0%, 8% { transform: translateX(-100%); }
	70%, 100% { transform: translateX(0); }
}
@keyframes gcv-packet { 0%, 6% { opacity: 0; } 10%, 68% { opacity: 1; } 76%, 100% { opacity: 0; } }
.guide-card:hover .gcv-runner, .guide-card:focus-within .gcv-runner, .gcv-play .gcv-runner, .gcv.is-live .gcv-runner {
	animation: gcv-run var(--gcv-cycle) cubic-bezier(.45, 0, .3, 1) both var(--gcv-iter);
}
.guide-card:hover .gcv-packet, .guide-card:focus-within .gcv-packet, .gcv-play .gcv-packet, .gcv.is-live .gcv-packet {
	animation: gcv-packet var(--gcv-cycle) linear both var(--gcv-iter);
}
.guide-card:hover .gcv-node .gcv-dot, .guide-card:focus-within .gcv-node .gcv-dot, .gcv-play .gcv-node .gcv-dot, .gcv.is-live .gcv-node .gcv-dot {
	animation: gcv-light var(--gcv-cycle) ease both var(--gcv-iter);
	animation-delay: calc(var(--gcv-cycle) * (.08 + .6 * var(--i) / (var(--n) - 1)));
}

/* --- blocks: confirmations stack up -------------------------------------- */
.gcv-amount { font-size: .85em; color: var(--gcv-muted); margin-bottom: .8em; }
.gcv-amount b { font-size: 1.9em; font-weight: 500; color: #fff; letter-spacing: -.02em; margin-right: .15em; }
.gcv-blocks { display: grid; grid-template-columns: repeat(6, 1fr); gap: .45em; }
.gcv-block {
	display: grid;
	place-items: center;
	aspect-ratio: 1;
	border-radius: .45em;
	font-size: .75em;
	font-weight: 500;
	background: var(--gg-brand);
	color: #fff;
}
.gcv-meter { margin-top: .8em; font-size: .8em; color: var(--gcv-muted); }
.gcv-meter .gcv-count { color: #fff; font-weight: 500; }
@property --gcv-count { syntax: "<integer>"; inherits: true; initial-value: 6; }
.gcv-count { counter-reset: gcv var(--gcv-count); }
.gcv-count::before { content: counter(gcv); }
@keyframes gcv-count { 0% { --gcv-count: 0; } 66%, 90% { --gcv-count: 6; } 100% { --gcv-count: 0; } }
.guide-card:hover .gcv-block, .guide-card:focus-within .gcv-block, .gcv-play .gcv-block, .gcv.is-live .gcv-block {
	animation: gcv-glow var(--gcv-cycle) ease both var(--gcv-iter);
	animation-delay: calc(var(--gcv-cycle) * (.04 + .1 * var(--i)));
}
.guide-card:hover .gcv-count, .guide-card:focus-within .gcv-count, .gcv-play .gcv-count, .gcv.is-live .gcv-count {
	animation: gcv-count var(--gcv-cycle) linear both var(--gcv-iter);
}

/* --- checks: each row turns green in turn -------------------------------- */
.gcv-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: .55em; }
.gcv-checks li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75em;
	padding: .6em .75em;
	border: 1px solid var(--gcv-line);
	border-radius: .65em;
	background: rgba(255, 255, 255, .025);
}
.gcv-checks .gcv-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcv-state { position: relative; width: 1.35em; height: 1.35em; flex: none; }
.gcv-wait, .gcv-tick { position: absolute; inset: 0; border-radius: 50%; }
.gcv-wait { border: 2px solid var(--gcv-line); border-top-color: var(--gcv-muted); opacity: 0; }
.gcv-tick { background: var(--gg-ok); }
.gcv-tick::after {
	content: "";
	position: absolute;
	left: 36%;
	top: 22%;
	width: 26%;
	height: 44%;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
@keyframes gcv-spin { to { rotate: 1turn; } }
.guide-card:hover .gcv-wait, .guide-card:focus-within .gcv-wait, .gcv-play .gcv-wait, .gcv.is-live .gcv-wait {
	animation: gcv-out var(--gcv-cycle) ease both var(--gcv-iter), gcv-spin .8s linear infinite;
	animation-delay: calc(var(--gcv-cycle) * (.1 + .16 * var(--i))), 0s;
}
.guide-card:hover .gcv-tick, .guide-card:focus-within .gcv-tick, .gcv-play .gcv-tick, .gcv.is-live .gcv-tick {
	animation: gcv-in var(--gcv-cycle) ease both var(--gcv-iter);
	animation-delay: calc(var(--gcv-cycle) * (.1 + .16 * var(--i)));
}

/* --- bars: scores fill in ------------------------------------------------- */
.gcv-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .75em; }
.gcv-bars li { display: grid; grid-template-columns: 6.6em 1fr 1.8em; align-items: center; gap: .7em; }
.gcv-bars .gcv-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcv-bar { position: relative; height: .55em; border-radius: 1em; background: var(--gcv-soft); overflow: hidden; }
.gcv-fill { position: absolute; inset: 0 auto 0 0; width: var(--v); border-radius: inherit; background: var(--gg-brand); transform-origin: left; }
.gcv-value { font-size: .78em; color: #fff; text-align: right; }
.guide-card:hover .gcv-fill, .guide-card:focus-within .gcv-fill, .gcv-play .gcv-fill, .gcv.is-live .gcv-fill {
	animation: gcv-grow var(--gcv-cycle) cubic-bezier(.3, .7, .2, 1) both var(--gcv-iter);
	animation-delay: calc(var(--gcv-cycle) * .08 * var(--i, 0));
}

/* --- convert: one asset becomes another ---------------------------------- */
.gcv-convert { display: grid; gap: .5em; }
.gcv-leg {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: .75em .9em;
	border: 1px solid var(--gcv-line);
	border-radius: .75em;
	background: rgba(255, 255, 255, .03);
}
.gcv-leg b { font-size: 1.3em; font-weight: 500; color: #fff; letter-spacing: -.01em; }
.gcv-code { font-size: .78em; font-weight: 500; padding: .25em .6em; border-radius: .4em; background: var(--gcv-soft); }
.gcv-leg--to { border-color: rgba(51, 179, 107, .35); }
.gcv-pipe { position: relative; height: 1.2em; margin: 0 auto; width: 2px; background: var(--gcv-line); overflow: hidden; }
.gcv-pipe-fill { position: absolute; inset: 0; background: var(--gg-brand); transform-origin: top; }
@keyframes gcv-drop { 0%, 10% { transform: scaleY(0); } 40%, 88% { transform: scaleY(1); } 100% { transform: scaleY(0); } }
@keyframes gcv-arrive { 0%, 38% { opacity: 0; transform: translateY(-.4em); } 46%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.guide-card:hover .gcv-pipe-fill, .guide-card:focus-within .gcv-pipe-fill, .gcv-play .gcv-pipe-fill, .gcv.is-live .gcv-pipe-fill {
	animation: gcv-drop var(--gcv-cycle) ease both var(--gcv-iter);
}
.guide-card:hover .gcv-leg--to, .guide-card:focus-within .gcv-leg--to, .gcv-play .gcv-leg--to, .gcv.is-live .gcv-leg--to {
	animation: gcv-arrive var(--gcv-cycle) ease both var(--gcv-iter);
}

/* --- code: a request is typed, the webhook arrives ----------------------- */
.gcv-code-block { font-size: .8em; line-height: 1.7; color: #c9ccdc; }
.gcv-indent { padding-left: 1.4em; }
.gcv-key { color: #f6a3e6; }
.gcv-event {
	display: flex;
	align-items: center;
	gap: .6em;
	margin-top: .7em;
	padding: .45em .7em;
	border-radius: .5em;
	background: rgba(51, 179, 107, .12);
	color: #6fe0a1;
}
.gcv-event .gcv-dot { width: .6em; height: .6em; background: var(--gg-ok); box-shadow: 0 0 0 .25em rgba(51, 179, 107, .2); }
.guide-card:hover .gcv-line, .guide-card:focus-within .gcv-line, .gcv-play .gcv-line, .gcv.is-live .gcv-line {
	animation: gcv-in var(--gcv-cycle) ease both var(--gcv-iter);
	animation-delay: calc(var(--gcv-cycle) * .09 * var(--i));
}

/* --- tiles: integrations light up one after another ---------------------- */
.gcv-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5em; }
.gcv-tile {
	display: grid;
	place-items: center;
	min-height: 3.6em;
	padding: .4em;
	border: 1px solid var(--gcv-line);
	border-radius: .65em;
	background: var(--gcv-soft);
	color: #c9ccdc;
	font-size: .76em;
	font-weight: 500;
	text-align: center;
	line-height: 1.2;
}
.gcv-tile:first-child { background: var(--gg-brand); color: #fff; border-color: transparent; }
@keyframes gcv-flash {
	0% { background: var(--gcv-soft); color: #c9ccdc; }
	6%, 22% { background: var(--gg-brand); color: #fff; }
	34%, 100% { background: var(--gcv-soft); color: #c9ccdc; }
}
.guide-card:hover .gcv-tile, .guide-card:focus-within .gcv-tile, .gcv-play .gcv-tile, .gcv.is-live .gcv-tile {
	animation: gcv-flash var(--gcv-cycle) ease both var(--gcv-iter);
	animation-delay: calc(var(--gcv-cycle) * .11 * var(--i));
}

/* --- goal: donations fill the bar --------------------------------------- */
.gcv-goal .gcv-bar { height: .75em; margin: .2em 0 1em; }
.gcv-coins { display: flex; flex-wrap: wrap; gap: .45em; }
.gcv-coin { padding: .3em .7em; border-radius: 10em; font-size: .74em; font-weight: 500; background: var(--gcv-soft); border: 1px solid var(--gcv-line); }
.guide-card:hover .gcv-coin, .guide-card:focus-within .gcv-coin, .gcv-play .gcv-coin, .gcv.is-live .gcv-coin {
	animation: gcv-in var(--gcv-cycle) ease both var(--gcv-iter);
	animation-delay: calc(var(--gcv-cycle) * (.3 + .08 * var(--i)));
}

/* A cover that plays once (guide hero) must come to rest on its finished
   state, not on the last keyframe of the loop. */
.gcv.gcv-play *, .gcv.gcv-play *::before { animation-fill-mode: backwards !important; }

@media (prefers-reduced-motion: reduce) {
	.gcv *, .gcv *::before, .gcv *::after { animation: none !important; transition: none !important; }
	.guide-card:hover .gcv-panel, .guide-card:focus-within .gcv-panel { transform: none; }
}

/* ---------------------------------------------------------------- 2. listing */

.guides-page { background: var(--gg-mist); }

.guides-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	color: #e2e5f1;
	background-color: var(--gg-ink);
	background-image:
		radial-gradient(45% 80% at 100% 0%, rgba(232, 53, 206, .22), transparent 70%),
		radial-gradient(40% 70% at 0% 100%, rgba(237, 24, 73, .2), transparent 70%);
}
.guides-hero h1 {
	color: #fff;
	font-weight: 500;
	letter-spacing: -.03em;
	line-height: 1.02;
	font-size: clamp(2.6rem, 2rem + 3.4vw, 5rem);
	max-width: 11ch;
}
.guides-hero__lead { font-size: clamp(1.125rem, 1rem + .4vw, 1.3125rem); line-height: 1.55; color: #c9ccdc; max-width: 34rem; }
.guides-crumb { color: #9396ad; text-decoration: none; font-size: .9375rem; }
.guides-crumb:hover, .guides-crumb:focus-visible { color: #fff; }

/* the newest guide, featured inside the hero */
.guide-feature {
	position: relative;
	display: grid;
	gap: 1.25rem;
	padding: .75rem;
	border: 1px solid rgba(255, 255, 255, .1);
	border-radius: 1.75rem;
	background: rgba(255, 255, 255, .03);
}
.guide-feature .gcv { border-radius: 1.25rem; }
.guide-feature__body { padding: 0 .75rem .75rem; }
.guide-feature__kicker { font-size: .9375rem; color: #9396ad; margin-bottom: .5rem; }
.guide-feature.guide-card { background: rgba(255, 255, 255, .03); box-shadow: none; }
.guide-feature.guide-card:hover { box-shadow: none; border-color: rgba(255, 255, 255, .22); }
.guide-feature.guide-card h2 { font-size: clamp(1.3rem, 1.1rem + .6vw, 1.6rem); font-weight: 500; line-height: 1.25; letter-spacing: -.01em; margin: 0; }
.guide-feature.guide-card h2 a { color: #fff; }

/* cards */
.guide-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: .625rem;
	border-radius: 1.5rem;
	background: #fff;
	box-shadow: 0 .75rem 2rem rgba(13, 15, 27, .06);
	transition: box-shadow .3s ease, transform .3s ease;
}
.guide-card:hover { box-shadow: 0 1.25rem 3rem rgba(13, 15, 27, .12); }
.guide-card:focus-within { outline: 2px solid var(--gg-rose); outline-offset: 3px; }
.guide-card:focus-within a:focus { outline: none; }
.guide-card .gcv { border-radius: 1.1rem; }
.guide-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.25rem .875rem .875rem; }
.guide-card__title {
	font-size: 1.25rem;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: -.01em;
	margin: 0 0 .75rem;
}
.guide-card__title a { color: var(--gg-ink); text-decoration: none; }
.guide-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* whole card is the link */
.guide-card p {
	font-size: 1rem;
	line-height: 1.55;
	color: #5a5d73;
	margin: 0 0 1.25rem;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.guide-card--dark { background: #1e202d; box-shadow: none; }
.guide-card--dark:hover { box-shadow: 0 1.25rem 3rem rgba(0, 0, 0, .35); }
.guide-card--dark .guide-card__title a { color: #fff; }
.guide-card--dark p { color: #a9acc2; }
.guide-card--dark .guide-meta { color: #8d91ab; }
.guide-meta { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: auto; font-size: .875rem; color: #7a7d93; }

/* ---------------------------------------------------------------- 3. guide */

.guide-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	color: #e2e5f1;
	background-color: var(--gg-ink);
	background-image:
		radial-gradient(45% 80% at 100% 0%, rgba(232, 53, 206, .22), transparent 70%),
		radial-gradient(40% 70% at 0% 100%, rgba(237, 24, 73, .2), transparent 70%);
}
.guide-hero h1 {
	color: #fff;
	font-weight: 500;
	letter-spacing: -.025em;
	line-height: 1.08;
	font-size: clamp(2.1rem, 1.6rem + 2.2vw, 3.6rem);
	max-width: 20ch;
}
.guide-hero .gcv { border-radius: 1.5rem; border: 1px solid rgba(255, 255, 255, .08); }
.guide-byline { display: flex; align-items: center; gap: .875rem; font-size: .9375rem; color: #9396ad; }
.guide-byline img { width: 2.75rem; height: 2.75rem; border-radius: 50%; object-fit: cover; }
.guide-byline b { display: block; color: #fff; font-weight: 500; }
.guide-byline span + span { margin-left: 1rem; }

/* contents */
/* sticky sidebar: contents scroll inside, the CTA stays visible below them */
.guide-aside { position: sticky; top: 6.5rem; display: flex; flex-direction: column; gap: 1.5rem; max-height: calc(100vh - 8rem); }
.guide-toc { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.guide-aside-cta {
	flex: none;
	padding: 1.25rem 1.25rem 1.3rem;
	border-radius: 1.25rem;
	color: #fff;
	background-color: var(--gg-ink);
	background-image:
		radial-gradient(80% 90% at 100% 0%, rgba(232, 53, 206, .45), transparent 70%),
		radial-gradient(70% 80% at 0% 100%, rgba(237, 24, 73, .4), transparent 70%);
}
.guide-aside-cta p { margin: 0 0 1rem; font-size: 1.0625rem; font-weight: 500; line-height: 1.35; letter-spacing: -.01em; }
.guide-toc__title { font-size: .9375rem; font-weight: 500; color: var(--gg-ink); margin-bottom: .75rem; }
.guide-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid #e5e7f0; }
.guide-toc a {
	display: block;
	margin-left: -2px;
	padding: .45rem 0 .45rem 1rem;
	border-left: 2px solid transparent;
	font-size: .9375rem;
	line-height: 1.4;
	color: #6a6d83;
	text-decoration: none;
	transition: color .2s, border-color .2s;
}
.guide-toc a:hover { color: var(--gg-ink); }
.guide-toc a.is-current { color: var(--gg-ink); border-left-color: var(--gg-rose); font-weight: 500; }
.guide-toc-mobile { border: 1px solid #e5e7f0; border-radius: 1rem; padding: .875rem 1.125rem; background: #fff; }
.guide-toc-mobile summary { font-weight: 500; color: var(--gg-ink); cursor: pointer; }
.guide-toc-mobile ol { margin: .75rem 0 0; padding-left: 1.25rem; }
.guide-toc-mobile a { color: var(--gg-text); }

/* long-form typography: 19px / 1.72, ~70 characters per line.
   Flow rules only touch the article's own paragraphs, lists and headings
   (direct children of the lead and of each section), so the content blocks
   below (cards, callouts, tables, accordions) keep their own type. */
.guide-prose {
	--gp-flow-gap: 1.35em;
	--gp-line: #e3e5ef;
	--gp-sub: #4a4d63;   /* secondary text: 8.6:1 on white */
	font-size: 1.1875rem;
	line-height: 1.72;
	color: var(--gg-text);
}
/* text keeps ~70 characters per line; grids, tables and code use the full column */
.guide-prose__lead > *, .guide-prose > section > :is(p, ul, ol, h2, h3, h4, blockquote, .alert) { max-width: 46rem; }
.guide-prose > :first-child { margin-top: 0; }
/* In-page anchors (#section from the contents, #faq) land below the sticky
   site header (82px) with breathing room. The id sits on the <section>, not
   on its h2, so the offset must be on the section. */
.guide-prose > section[id], #faq { scroll-margin-top: 7.5rem; }
.guide-prose__lead > p, .guide-prose > section > p { margin: 0 0 var(--gp-flow-gap); }
.guide-prose__lead > p:first-child, .guide-prose .lead { font-size: 1.3125rem; line-height: 1.6; font-weight: 400; color: var(--gg-ink); }
.guide-prose h2 {
	font-size: clamp(1.6rem, 1.35rem + .9vw, 2.125rem);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -.02em;
	color: var(--gg-ink);
	margin: 2.4em 0 .7em;
	scroll-margin-top: 6.5rem;
}
.guide-prose > section > h3 { font-size: 1.4375rem !important; font-weight: 500; line-height: 1.3; letter-spacing: -.01em; color: var(--gg-ink); margin: 1.9em 0 .6em !important; }
.guide-prose > section > h4 { font-size: 1.1875rem; font-weight: 500; color: var(--gg-ink); margin: 1.6em 0 .4em; }
.guide-prose strong, .guide-prose b { color: var(--gg-ink); font-weight: 500; }
.guide-prose a:not(.btn) { color: var(--gg-ink); text-decoration: underline; text-decoration-color: var(--gg-rose); text-decoration-thickness: 2px; text-underline-offset: .2em; }
.guide-prose a:not(.btn):hover { color: var(--gg-rose); }

/* flow lists: rose markers, numbered lists get gradient counters */
:is(.guide-prose__lead, .guide-prose > section) > ul:not(.list-unstyled) { margin: 0 0 var(--gp-flow-gap); padding-left: 1.3em; }
:is(.guide-prose__lead, .guide-prose > section) > ul:not(.list-unstyled) > li { margin-bottom: .5em; padding-left: .25em; }
:is(.guide-prose__lead, .guide-prose > section) > ul:not(.list-unstyled) > li::marker { color: var(--gg-rose); }
:is(.guide-prose__lead, .guide-prose > section) > ol { list-style: none; counter-reset: gp-ol; margin: 0 0 var(--gp-flow-gap); padding: 0; display: grid; gap: .75em; }
:is(.guide-prose__lead, .guide-prose > section) > ol > li { counter-increment: gp-ol; position: relative; padding-left: 2.6em; }
:is(.guide-prose__lead, .guide-prose > section) > ol > li::before {
	content: counter(gp-ol);
	position: absolute; left: 0; top: .12em;
	display: grid; place-items: center;
	width: 1.75em; height: 1.75em;
	border-radius: 50%;
	background: var(--gg-brand);
	color: #fff; font-size: .78em; font-weight: 500; line-height: 1;
}

.guide-prose blockquote { margin: 0 0 var(--gp-flow-gap); padding: .2em 0 .2em 1.25em; border-left: 3px solid; border-image: var(--gg-brand) 1; font-size: 1.25rem; color: var(--gg-ink); }
.guide-prose code { font-size: .86em; padding: .12em .4em; border-radius: .35em; background: #eef0f7; color: var(--gg-ink); }
.guide-prose img { max-width: 100%; height: auto; border-radius: 1rem; }

/* ---------------------------------------------------------------- 4. blocks
   In-article components from the guide HTML (apps/guides/data/guides/*.py).
   The markup carries Bootstrap utilities with !important (fs-sm, mb-2,
   bg-body-secondary, text-body-secondary...); inside .guide-prose they are
   re-tuned here so a block reads at article size, not caption size. */

.guide-prose section .row { --gc-gutter-y: 1rem; --gc-gutter-x: 1rem; margin-top: 1.75rem !important; margin-bottom: 2rem !important; }
.guide-prose section .fs-sm { font-size: 1.0625rem !important; line-height: 1.6; }
.guide-prose section .text-body-secondary { color: var(--gp-sub) !important; }
.guide-prose section .card p, .guide-prose section .card ul, .guide-prose section .alert p { margin-bottom: 0; }

/* cards: white panels with a hairline that warms up on hover */
.guide-prose section .card {
	position: relative;
	border: 1px solid var(--gp-line) !important;
	border-radius: 1.25rem !important;
	background: #fff !important;
	padding: 0 !important;
	box-shadow: 0 1px 0 rgba(13, 15, 27, .02);
	transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.guide-prose section .row .card:hover { border-color: rgba(237, 24, 73, .35) !important; box-shadow: 0 1rem 2.25rem rgba(13, 15, 27, .08); transform: translateY(-2px); }
.guide-prose section .card-body { padding: 1.5rem 1.5rem 1.6rem !important; }
.guide-prose section .card h4 { font-size: 1.1875rem !important; font-weight: 500; line-height: 1.3; letter-spacing: -.005em; color: var(--gg-ink); margin: 0 0 .55rem !important; }

/* stat cards: the figure is the headline */
.guide-prose section .card .fs-3 {
	font-size: clamp(2rem, 1.6rem + 1.4vw, 2.75rem) !important;
	font-weight: 500 !important;
	letter-spacing: -.03em;
	line-height: 1.05;
	margin: .1rem 0 .6rem !important;
	background: var(--gg-brand);
	-webkit-background-clip: text; background-clip: text;
	color: transparent !important;
	font-feature-settings: "tnum";
}
.guide-prose section .card:has(.fs-3) h4 { font-size: 1rem !important; color: var(--gp-sub); font-weight: 400; order: 2; }

/* arrow lists (inside cards and on their own) */
.guide-prose ul.list-unstyled { padding: 0; margin: 0; display: grid; gap: .6rem; }
.guide-prose > section > ul.list-unstyled { margin: 1.25rem 0 var(--gp-flow-gap) !important; }
.guide-prose ul.list-unstyled > li { display: flex; align-items: flex-start; gap: .75rem !important; margin: 0 !important; padding: 0; }
.guide-prose ul.list-unstyled > li > .gci-arrow-right {
	flex: none;
	display: grid; place-items: center;
	width: 1.6rem; height: 1.6rem;
	margin-top: .1rem !important;
	border-radius: 50%;
	background: rgba(237, 24, 73, .1);
	color: var(--gg-rose) !important;
	font-size: .8rem;
	transition: transform .2s ease, background-color .2s ease, color .2s ease;
}
.guide-prose ul.list-unstyled > li:hover > .gci-arrow-right { transform: translateX(2px); background: var(--gg-rose); color: #fff !important; }
.guide-prose section .card ul.list-unstyled { margin-top: 1rem !important; padding-top: 1rem; border-top: 1px dashed var(--gp-line); }
.guide-prose section .card h4 + ul.list-unstyled { margin-top: .5rem !important; padding-top: 0; border-top: 0; }

/* numbered step cards: the badge becomes a gradient step node */
.guide-prose section .card-body.d-flex:has(> .badge) { gap: 1.1rem !important; }
.guide-prose section .card .badge {
	flex: none;
	display: grid !important; place-items: center;
	width: 2.5rem; height: 2.5rem;
	padding: 0 !important;
	border-radius: 50% !important;
	background: var(--gg-brand) !important;
	font-size: 1rem !important; font-weight: 500;
	box-shadow: 0 .5rem 1.25rem rgba(237, 24, 73, .25);
}
.guide-prose section .card .badge + div h4 { margin-top: .45rem !important; }

/* pros / cons: tinted panels with a mark per line */
.guide-prose section .card:has(h4.text-success) { background: #f1faf5 !important; border-color: #cfeedd !important; }
.guide-prose section .card:has(h4.text-danger) { background: #fdf3f5 !important; border-color: #f7d3dc !important; }
.guide-prose section .card h4.text-success, .guide-prose section .card h4.text-danger { display: flex; align-items: center; gap: .6rem; }
.guide-prose section .card h4.text-success { color: #1d7a47 !important; }
.guide-prose section .card h4.text-danger { color: #c4123d !important; }
.guide-prose section .card :is(h4.text-success, h4.text-danger)::before {
	content: ""; flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%;
	background: currentColor center / .85rem no-repeat;
}
.guide-prose section .card h4.text-success::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.guide-prose section .card h4.text-danger::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 4l8 8M12 4l-8 8' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.guide-prose section .card:has(h4:is(.text-success, .text-danger)) ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.guide-prose section .card:has(h4:is(.text-success, .text-danger)) li { position: relative; padding-left: 1.4rem; }
.guide-prose section .card:has(h4:is(.text-success, .text-danger)) li::before { content: ""; position: absolute; left: .15rem; top: .62em; width: .45rem; height: .45rem; border-radius: 50%; }
.guide-prose section .card:has(h4.text-success) li::before { background: #33b36b; }
.guide-prose section .card:has(h4.text-danger) li::before { background: #ed1849; }

/* timelines (W1, W2... nodes): a gradient rail joins the steps */
.guide-prose section .d-flex:has(> .rounded-circle:is(.bg-primary, .bg-success)) { position: relative; gap: 1.1rem !important; margin-bottom: 0 !important; padding-bottom: 1.6rem; }
.guide-prose section .d-flex:has(> .rounded-circle:is(.bg-primary, .bg-success)):not(:last-child)::before {
	content: ""; position: absolute; left: calc(1.5rem - 1px); top: 3rem; bottom: 0; width: 2px;
	background: linear-gradient(var(--gg-orchid), rgba(237, 24, 73, .15));
}
.guide-prose section .rounded-circle:is(.bg-primary, .bg-success) {
	width: 3rem !important; height: 3rem !important;
	background: var(--gg-brand) !important;
	font-size: .9375rem; font-weight: 500 !important;
	box-shadow: 0 0 0 .35rem #fff, 0 .5rem 1.25rem rgba(237, 24, 73, .25);
}
.guide-prose section .rounded-circle.bg-success { background: var(--gg-ok) !important; box-shadow: 0 0 0 .35rem #fff, 0 .5rem 1.25rem rgba(51, 179, 107, .3); }
.guide-prose section .d-flex:has(> .rounded-circle:is(.bg-primary, .bg-success)) h4 { font-size: 1.1875rem !important; font-weight: 500; color: var(--gg-ink); margin: .6rem 0 .3rem !important; }

/* callouts */
.guide-prose section .alert {
	position: relative;
	margin: 1.75rem 0 2rem !important;
	padding: 1.25rem 1.4rem 1.3rem 4rem;
	border: 0;
	border-radius: 1.25rem !important;
	background: linear-gradient(100deg, rgba(237, 24, 73, .07), rgba(232, 53, 206, .07));
	color: var(--gg-ink);
	font-size: 1.125rem;
	line-height: 1.65;
}
.guide-prose section .alert::before {
	content: "";
	position: absolute; left: 1.25rem; top: 1.35rem;
	width: 1.75rem; height: 1.75rem; border-radius: 50%;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 4.2v4.6M8 11.4v.1' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E"), var(--gg-brand);
	background-position: center, center;
	background-size: 1rem, cover;
	background-repeat: no-repeat;
}
.guide-prose section .alert strong:first-child { display: block; margin-bottom: .15rem; }

/* in-article product card: a dark island like the hero */
.guide-prose section .card.rounded-5 {
	margin: 2.5rem 0 !important;
	padding: clamp(1.75rem, 1rem + 3vw, 3rem) !important;
	border: 0 !important;
	border-radius: 1.75rem !important;
	color: #c9ccdc;
	background-color: var(--gg-ink) !important;
	background-image:
		radial-gradient(60% 90% at 100% 0%, rgba(232, 53, 206, .3), transparent 70%),
		radial-gradient(55% 80% at 0% 100%, rgba(237, 24, 73, .26), transparent 70%) !important;
}
.guide-prose section .card.rounded-5:hover { transform: none; }
.guide-prose section .card.rounded-5 .card-body { padding: 0 !important; }
.guide-prose section .card.rounded-5 h3 { color: #fff; font-size: clamp(1.4rem, 1.2rem + .8vw, 1.875rem) !important; font-weight: 500; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 1rem !important; }
.guide-prose section .card.rounded-5 .fs-lg { font-size: 1.125rem !important; color: #c9ccdc; }
.guide-prose section .card.rounded-5 strong { color: #fff; }
.guide-prose section .card.rounded-5 ul.list-unstyled { border-top: 0; padding-top: 0; margin: 1.25rem 0 1.75rem !important; }
.guide-prose section .card.rounded-5 ul.list-unstyled > li > .gci-arrow-right { background: rgba(255, 255, 255, .1); color: #fff !important; }
.guide-prose section .card.rounded-5 .btn { background: var(--gg-brand); border: 0; color: #fff; padding-inline: 1.75rem; box-shadow: 0 .75rem 2rem rgba(237, 24, 73, .35); }
.guide-prose section .card.rounded-5 .btn:hover { filter: brightness(1.08); }

/* tables: framed, inked header, row focus on hover, scroll hint on small screens */
.guide-prose section .table-responsive {
	margin: 1.75rem 0 2rem !important;
	border: 1px solid var(--gp-line);
	border-radius: 1.25rem;
	overflow-x: auto;
	background:
		linear-gradient(90deg, #fff 30%, rgba(255, 255, 255, 0)) left / 2.5rem 100% no-repeat local,
		linear-gradient(270deg, #fff 30%, rgba(255, 255, 255, 0)) right / 2.5rem 100% no-repeat local,
		radial-gradient(farthest-side at 0 50%, rgba(13, 15, 27, .14), transparent) left / .9rem 100% no-repeat scroll,
		radial-gradient(farthest-side at 100% 50%, rgba(13, 15, 27, .14), transparent) right / .9rem 100% no-repeat scroll,
		#fff;
}
.guide-prose table { width: 100%; margin: 0 !important; border-collapse: collapse; font-size: 1rem; line-height: 1.55; --gc-table-bg: transparent; }
.guide-prose section .table > :not(caption) > * > * { background: transparent; box-shadow: none; }
.guide-prose table.table-bordered > :not(caption) > * > * { border-width: 0; }
.guide-prose th, .guide-prose td { padding: .9rem 1.1rem !important; border-bottom: 1px solid var(--gp-line) !important; text-align: left; vertical-align: top; min-width: 9rem; color: var(--gg-text); }
.guide-prose thead th { background: var(--gg-ink) !important; color: #fff !important; font-weight: 500; font-size: .9375rem; border-bottom: 0 !important; white-space: nowrap; }
.guide-prose tbody tr:last-child > * { border-bottom: 0 !important; }
.guide-prose tbody tr { transition: background-color .15s ease; }
.guide-prose tbody tr:hover > * { background: #fbf4f8 !important; }
.guide-prose tbody td:first-child { color: var(--gg-ink); }
.guide-prose td[rowspan] { background: var(--gg-mist) !important; color: var(--gg-ink); font-weight: 500; }
.guide-prose section .table-primary > * { background: rgba(237, 24, 73, .07) !important; }

/* in-article accordions: separated items, open one gets the brand rail */
.guide-prose section .accordion { margin: 1.75rem 0 2rem !important; display: grid; gap: .6rem; }
.guide-prose section .accordion-item {
	position: relative;
	margin: 0 !important;
	border: 1px solid var(--gp-line) !important;
	border-radius: 1.1rem !important;
	background: #fff !important;
	overflow: hidden;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.guide-prose section .accordion-item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gg-brand); opacity: 0; transition: opacity .2s ease; }
.guide-prose section .accordion-item:has(.accordion-collapse.show)::before { opacity: 1; }
.guide-prose section .accordion-item:has(.accordion-collapse.show) { box-shadow: 0 .75rem 2rem rgba(13, 15, 27, .07); }
.guide-prose section .accordion-item:hover { border-color: rgba(237, 24, 73, .35) !important; }
.guide-prose section .accordion-header { margin: 0 !important; font-size: inherit; }
.guide-prose section .accordion-button {
	padding: 1.1rem 1.4rem !important;
	background: transparent !important;
	box-shadow: none !important;
	font-size: 1.125rem;
	font-weight: 500;
	line-height: 1.4;
	color: var(--gg-ink) !important;
}
.guide-prose section .accordion-button:focus-visible { outline: 2px solid var(--gg-rose); outline-offset: -2px; }
.guide-prose section .accordion-body { padding: 0 1.4rem 1.3rem !important; font-size: 1.0625rem; line-height: 1.7; color: var(--gp-sub); }

/* code */
.guide-prose pre {
	position: relative;
	margin: 1.75rem 0 2rem !important;
	padding: 1.25rem 1.4rem !important;
	border-radius: 1.1rem !important;
	background: var(--gg-ink) !important;
	color: #e2e5f1 !important;
	font-size: .9375rem !important;
	line-height: 1.65;
	overflow-x: auto;
	white-space: pre;
}
.guide-prose pre code { padding: 0; background: none; color: inherit; font-size: inherit; }
.gp-copy {
	position: absolute; top: .75rem; right: .75rem;
	padding: .3rem .75rem;
	border: 1px solid rgba(255, 255, 255, .16);
	border-radius: 10em;
	background: rgba(255, 255, 255, .06);
	color: #e2e5f1;
	font: 500 .8125rem/1.4 var(--gc-font-sans-serif);
	cursor: pointer;
	transition: background-color .15s ease;
}
.gp-copy:hover, .gp-copy:focus-visible { background: rgba(255, 255, 255, .16); }
.gp-copy.is-done { background: rgba(51, 179, 107, .25); border-color: rgba(51, 179, 107, .5); }

@media (prefers-reduced-motion: reduce) {
	.guide-prose section .card, .guide-prose section .accordion-item, .guide-prose ul.list-unstyled > li > .gci-arrow-right, .guide-prose tbody tr { transition: none; }
	.guide-prose section .row .card:hover { transform: none; }
}

/* FAQ */
.guide-faq .accordion-item { border: 0; border-bottom: 1px solid #e5e7f0; background: transparent; }
.guide-faq .accordion-button {
	padding: 1.4rem 0;
	font-size: 1.25rem;
	font-weight: 500;
	line-height: 1.35;
	color: var(--gg-ink);
	background: transparent;
	box-shadow: none;
}
.guide-faq .accordion-body { padding: 0 0 1.5rem; font-size: 1.125rem; line-height: 1.7; color: var(--gg-text); max-width: 44rem; }

@media (prefers-reduced-motion: reduce) {
	.guide-card, .guide-toc a { transition: none; }
}

.guide-faq__title {
	font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem);
	font-weight: 500;
	letter-spacing: -.02em;
	line-height: 1.15;
	color: var(--gg-ink);
	scroll-margin-top: 6.5rem;
}
.guide-byline time { margin-right: 1rem; }

.guide-float-cta {
	position: fixed;
	left: 50%;
	bottom: max(1rem, env(safe-area-inset-bottom));
	z-index: 1030;
	transform: translateX(-50%);
	padding: .85rem 1.6rem;
	border-radius: 10em;
	background: var(--gg-brand);
	color: #fff;
	font-weight: 500;
	white-space: nowrap;
	text-decoration: none;
	box-shadow: 0 .75rem 2rem rgba(237, 24, 73, .4);
}
.guide-float-cta { transition: opacity .25s ease, transform .25s ease, visibility .25s; }
.guide-float-cta.is-hidden { opacity: 0; visibility: hidden; transform: translate(-50%, 1rem); pointer-events: none; }
.guide-float-cta:hover, .guide-float-cta:focus-visible { color: #fff; filter: brightness(1.08); }
@media (max-width: 991.98px) {
	/* room under the last content so the pill never sits on top of it */
	.guides-page:has(.guide-float-cta) { padding-bottom: 6rem !important; }
}
@media (prefers-reduced-motion: reduce) {
	.guide-float-cta { transition: none; }
}
.guide-float-cta:focus-visible { outline: 2px solid var(--gg-ink); outline-offset: 3px; }
.guide-prose section .card.rounded-5 .btn { max-width: 100%; white-space: normal; text-wrap: balance; }
@media (max-width: 575.98px) {
	.guide-prose section .card.rounded-5 .btn { display: flex; justify-content: center; width: 100%; }
	.guide-prose th, .guide-prose td { min-width: 11rem; }
}
