/* CrossbowLife Pro — premium article experience.
   Loaded only on single posts (see cbl_enqueue_assets). Inherits design
   tokens (--cbl-*) from main.css. */

/* ===== Reading progress bar ===== */
.cbl-reading-progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	z-index: 60;
	pointer-events: none;
	background: rgba(31, 58, 46, .08);
}
.cbl-reading-progress__bar {
	display: block;
	height: 100%;
	width: 100%;
	transform: scaleX(0);
	transform-origin: 0 50%;
	background: linear-gradient(90deg, var(--cbl-cta), var(--cbl-accent));
	will-change: transform;
}

/* ===== Byline / meta ===== */
.cbl-post__cat a { color: inherit; }
.cbl-post__byline {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 16px;
	color: var(--cbl-muted);
	font-size: .9rem;
	margin: 8px 0 14px;
}
.cbl-post__author { display: inline-flex; align-items: center; gap: 8px; }
.cbl-post__avatar { border-radius: 50%; }
.cbl-post__author-name { font-weight: 700; color: var(--cbl-text); }
.cbl-post__meta-item { position: relative; }
.cbl-post__meta-item::before {
	content: '';
	display: inline-block;
	width: 4px; height: 4px;
	border-radius: 50%;
	background: currentColor;
	opacity: .5;
	margin-right: 16px;
	vertical-align: middle;
}

/* ===== Trust badges ===== */
.cbl-post__badges {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.cbl-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: .78rem;
	font-weight: 600;
	padding: 4px 10px 4px 8px;
	border-radius: 999px;
	background: rgba(31, 58, 46, .07);
	color: var(--cbl-primary);
}
.cbl-badge::before {
	content: '';
	width: 14px; height: 14px;
	background: currentColor;
	-webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
	-webkit-mask-position: center; mask-position: center;
}
.cbl-badge--check::before  { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.cbl-badge--updated::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 7v5l3 2'/%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 7v5l3 2'/%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3C/svg%3E"); }
.cbl-badge--disc::before   { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8h.01M11 12h1v4h1'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8h.01M11 12h1v4h1'/%3E%3C/svg%3E"); }

.cbl-post__hero img { width: 100%; }

/* ===== Table of contents ===== */
.cbl-toc { background: #fff; border: 1px solid var(--cbl-border); border-radius: var(--cbl-radius); }
.cbl-toc__title {
	margin: 0;
	font-weight: 800;
	font-size: .82rem;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--cbl-primary);
}
.cbl-toc__list { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: cbl-toc; }
.cbl-toc__item { line-height: 1.35; }
.cbl-toc__item--h3 { padding-left: 14px; }
.cbl-toc__link {
	display: block;
	padding: 6px 8px;
	border-radius: 8px;
	color: var(--cbl-text);
	font-size: .9rem;
	border-left: 2px solid transparent;
	transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.cbl-toc__link:hover { background: rgba(31, 58, 46, .05); text-decoration: none; }
.cbl-toc__link.is-active {
	color: var(--cbl-primary);
	font-weight: 700;
	border-left-color: var(--cbl-cta);
	background: rgba(201, 83, 30, .06);
}

/* Sticky desktop rail */
.cbl-toc--sticky { position: sticky; top: 16px; padding: 16px; margin-bottom: 16px; max-height: calc(100vh - 32px); overflow: auto; }

/* Collapsible mobile version */
.cbl-toc--inline { display: none; padding: 4px 16px; margin: 0 0 24px; }
.cbl-toc--inline > .cbl-toc__title { cursor: pointer; padding: 12px 0; list-style: none; }
.cbl-toc--inline > .cbl-toc__title::-webkit-details-marker { display: none; }
.cbl-toc--inline > .cbl-toc__title::after { content: '＋'; float: right; color: var(--cbl-cta); font-weight: 700; }
.cbl-toc--inline[open] > .cbl-toc__title::after { content: '－'; }
.cbl-toc--inline .cbl-toc__list { padding-bottom: 12px; }

/* Give anchored headings breathing room under any sticky UI when jumped to. */
.cbl-post__content :is(h2, h3) { scroll-margin-top: 20px; }

/* ===== Share ===== */
.cbl-share {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin: 28px 0;
	padding: 14px 0;
	border-top: 1px solid var(--cbl-border);
	border-bottom: 1px solid var(--cbl-border);
}
.cbl-share__label { font-weight: 700; color: var(--cbl-primary); font-size: .9rem; }
.cbl-share__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.cbl-share__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	width: 40px;
	height: 40px;
	justify-content: center;
	border-radius: 10px;
	border: 1px solid var(--cbl-border);
	background: #fff;
	color: var(--cbl-primary);
	cursor: pointer;
	transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.cbl-share__btn:hover { transform: translateY(-1px); background: var(--cbl-primary); color: #fff; border-color: var(--cbl-primary); text-decoration: none; }
.cbl-share__btn--copy { width: auto; padding: 0 14px; }
.cbl-share__btn--copy .cbl-share__btn-text { font-size: .88rem; font-weight: 700; }
.cbl-share__btn.is-copied { background: var(--cbl-primary); color: #fff; border-color: var(--cbl-primary); }

/* ===== Tags ===== */
.cbl-post__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 20px 0 0; }
.cbl-post__tags a {
	display: inline-block;
	font-size: .82rem;
	padding: 4px 12px;
	border-radius: 999px;
	background: rgba(141, 106, 63, .1);
	color: #6c4f2a;
}
.cbl-post__tags a:hover { background: var(--cbl-accent); color: #fff; text-decoration: none; }

/* ===== Prev/next navigation ===== */
.cbl-postnav { margin: 32px 0 0; }
.cbl-postnav .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0; }
.cbl-postnav .nav-previous a,
.cbl-postnav .nav-next a {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid var(--cbl-border);
	border-radius: var(--cbl-radius);
	height: 100%;
}
.cbl-postnav .nav-next { text-align: right; }
.cbl-postnav a:hover { text-decoration: none; border-color: var(--cbl-primary); }
.cbl-postnav__dir { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--cbl-muted); font-weight: 700; }
.cbl-postnav__title { color: var(--cbl-primary); font-weight: 700; }
@media (max-width: 560px) { .cbl-postnav .nav-links { grid-template-columns: 1fr; } .cbl-postnav .nav-next { text-align: left; } }

/* ===== Continue reading ===== */
.cbl-related { margin: 40px 0 0; padding-top: 28px; border-top: 2px solid var(--cbl-border); }
.cbl-related__title { margin: 0 0 18px; }

/* ===== Responsive: swap sticky ↔ inline TOC when the sidebar collapses ===== */
@media (max-width: 980px) {
	.cbl-toc--sticky { display: none; }
	.cbl-toc--inline { display: block; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
	.cbl-reading-progress__bar { will-change: auto; }
	.cbl-share__btn:hover { transform: none; }
}
