/* VELYON Theme — Blog post page v2 (v2.6.0)
   Markup: single.php + inc/blog-single.php. Prefix bp-. Tokens only, so dark and light both work.
   Layout: article column + 330px sidebar (ad on top, then ONE sticky stack). Below 900px the sidebar
   drops under the article, the "On this page" list becomes a collapsible at the top of the article. */

.bp-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 330px;
	gap: 44px;
	align-items: start;
	padding: 18px 24px 56px;
}
.bp-main { min-width: 0; }

/* ---------- header ---------- */
.bp-cat {
	display: inline-block;
	margin-bottom: 12px;
	padding: 4px 12px;
	font-family: var(--velyon-font-heading);
	font-size: 11.5px;
	font-weight: 700;
	color: var(--velyon-accent-deep);
	border: 1px solid var(--velyon-accent);
	border-radius: 999px;
}
.bp-title { margin: 0 0 10px; font-size: clamp(28px, 4.6vw, 42px); font-weight: 800; line-height: 1.15; }
.bp-stand { margin: 0 0 16px; font-size: 18px; line-height: 1.5; color: var(--velyon-text-muted); }
.bp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--velyon-text-muted); }
.bp-meta-author { display: inline-flex; align-items: center; gap: 9px; color: var(--velyon-text); font-weight: 700; }
.bp-meta-avatar { width: 34px; height: 34px; border-radius: 50%; }
.bp-dot { opacity: .5; }
.bp-header .share-row { margin-top: 14px; }

/* ---------- cover ---------- */
.bp-cover { margin: 18px 0 8px; }
.bp-cover img { display: block; width: 100%; height: auto; border-radius: 20px; }
.bp-cover-grad { height: clamp(190px, 34vw, 330px); border-radius: 20px; }
.bp-grad-a { background: linear-gradient(135deg, #1d4ed8, #10b981 60%, #f59e0b); }
.bp-grad-b { background: linear-gradient(135deg, #7c3aed, #ec4899); }
.bp-grad-c { background: linear-gradient(135deg, #0ea5e9, #22c55e); }
.bp-grad-d { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.bp-cap { margin-top: 6px; font-size: 12px; color: var(--velyon-text-muted); }

/* ---------- key takeaways ---------- */
.bp-key {
	margin: 14px 0 18px;
	padding: 16px 20px;
	background: var(--velyon-surface);
	border: 1px solid var(--velyon-border);
	border-left: 4px solid var(--velyon-accent);
	border-radius: var(--velyon-radius-m);
}
.bp-key-title { margin: 0 0 8px; font-size: 16px; font-weight: 800; }
.bp-key ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14.5px; }
.bp-key li::before { content: "\2713"; margin-right: 8px; font-weight: 800; color: var(--velyon-accent-deep); }

/* ---------- ads ---------- */
.bp-ad { margin: 26px 0; text-align: center; clear: both; }
.bp-ad-label { display: block; margin-bottom: 6px; font-family: var(--velyon-font-heading); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--velyon-text-muted); }
.bp-ad .velyon-ad-slot { margin: 0 auto; }
.bp-ad--side { margin: 0 0 14px; }
@media (max-width: 900px) {
	.bp-ad--side { display: none; } /* phones use the in-article and end ads */
	.bp-ad--in1 .velyon-ad-slot, .bp-ad--in2 .velyon-ad-slot { min-height: 250px !important; }
}

/* ---------- prose ---------- */
.bp-prose { max-width: 70ch; font-size: 17px; line-height: 1.75; }
.bp-prose h2, .bp-prose h3 { position: relative; scroll-margin-top: calc(var(--bp-stick-top, 88px) + 8px); }
.bp-prose h2 { margin: 34px 0 10px; font-size: 24px; font-weight: 800; }
.bp-anchor { position: absolute; left: -22px; opacity: 0; font-size: 16px; color: var(--velyon-accent-deep); text-decoration: none; }
.bp-prose h2:hover .bp-anchor, .bp-prose h3:hover .bp-anchor { opacity: 1; }

/* callout block styles (Group block > Styles) */
.wp-block-group.is-style-velyon-tip,
.wp-block-group.is-style-velyon-warning,
.wp-block-group.is-style-velyon-example {
	margin: 20px 0;
	padding: 14px 18px;
	border-radius: var(--velyon-radius-m);
	border: 1px solid var(--bp-callout, var(--velyon-border));
	background: color-mix(in srgb, var(--bp-callout, var(--velyon-accent)) 12%, var(--velyon-surface));
	font-size: 15.5px;
	line-height: 1.6;
}
.wp-block-group.is-style-velyon-tip { --bp-callout: #f59e0b; }
.wp-block-group.is-style-velyon-warning { --bp-callout: #ef4444; }
.wp-block-group.is-style-velyon-example { --bp-callout: #3b82f6; }
.wp-block-group.is-style-velyon-tip::before,
.wp-block-group.is-style-velyon-warning::before,
.wp-block-group.is-style-velyon-example::before {
	display: block;
	margin-bottom: 4px;
	font-family: var(--velyon-font-heading);
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--velyon-text-muted);
}
.wp-block-group.is-style-velyon-tip::before { content: "Pro tip"; }
.wp-block-group.is-style-velyon-warning::before { content: "Heads up"; }
.wp-block-group.is-style-velyon-example::before { content: "Example"; }
.wp-block-group.is-style-velyon-tip > :last-child,
.wp-block-group.is-style-velyon-warning > :last-child,
.wp-block-group.is-style-velyon-example > :last-child { margin-bottom: 0; }

/* inline "Read next" card */
.bp-readnext { margin: 22px 0; }
.bp-readnext a { display: flex; align-items: center; gap: 14px; padding: 12px; color: var(--velyon-text); background: var(--velyon-surface); border: 1px solid var(--velyon-border); border-radius: var(--velyon-radius-m); transition: transform .15s ease, box-shadow .15s ease; }
.bp-readnext a:hover { transform: translateY(-2px); box-shadow: var(--velyon-shadow); }
.bp-rn-img { flex: none; width: 84px; height: 64px; object-fit: cover; border-radius: 10px; }
.bp-rn-img--ph { display: block; background: linear-gradient(135deg, #6366f1, #22c55e); }
.bp-rn-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bp-rn-kicker { font-family: var(--velyon-font-heading); font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--velyon-accent-deep); }
.bp-rn-title { font-family: var(--velyon-font-heading); font-size: 15px; font-weight: 700; line-height: 1.3; }

/* ---------- mobile "On this page" ---------- */
.bp-toc-mobile { display: none; margin-bottom: 16px; padding: 12px 16px; background: var(--velyon-surface); border: 1px solid var(--velyon-border); border-radius: var(--velyon-radius-m); }
.bp-toc-mobile summary { cursor: pointer; font-family: var(--velyon-font-heading); font-size: 14px; font-weight: 700; }

/* ---------- tags, topics, helpful ---------- */
.bp-tags, .bp-topics { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0 12px; }
.bp-tags a, .bp-topics a { padding: 4px 12px; font-size: 12.5px; color: var(--velyon-text-muted); background: var(--velyon-surface); border: 1px solid var(--velyon-border); border-radius: 999px; }
.bp-tags a:hover, .bp-topics a:hover { color: var(--velyon-text); border-color: var(--velyon-accent); }
.bp-topics-h { font-family: var(--velyon-font-heading); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--velyon-text-muted); }
.bp-topics b { margin-left: 5px; color: var(--velyon-accent-deep); }
.bp-helpful { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0; padding: 14px 18px; background: var(--velyon-surface); border: 1px solid var(--velyon-border); border-radius: var(--velyon-radius-m); }
.bp-helpful-q { margin-right: auto; font-family: var(--velyon-font-heading); font-size: 14.5px; }
.bp-helpful-thanks { color: var(--velyon-accent-deep); font-weight: 600; }
.bp-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 18px; font-family: var(--velyon-font-heading); font-size: 13.5px; font-weight: 700; color: var(--velyon-text); background: transparent; border: 1px solid var(--velyon-border); border-radius: 999px; cursor: pointer; }
.bp-btn:hover { border-color: var(--velyon-accent); }
.bp-btn--solid { color: var(--velyon-on-accent); background: var(--velyon-accent); border-color: var(--velyon-accent); }
.bp-btn:focus-visible { outline: 2px solid var(--velyon-accent); outline-offset: 2px; }

/* ---------- author box ---------- */
.bp-author { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 20px; margin: 26px 0; padding: 24px; background: var(--velyon-surface); border: 1px solid var(--velyon-border); border-radius: 22px; }
.bp-author-img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.bp-author-by { font-family: var(--velyon-font-heading); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--velyon-accent-deep); }
.bp-author-name { margin: 2px 0 6px; font-size: 21px; font-weight: 800; }
.bp-author-name a { color: inherit; }
.bp-author-bio { margin: 0 0 12px; font-size: 14.5px; color: var(--velyon-text-muted); }
.bp-author-stats, .bp-author-social { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; }
.bp-author-stats li { padding: 5px 12px; font-size: 12.5px; color: var(--velyon-text-muted); background: var(--velyon-surface-alt); border: 1px solid var(--velyon-border); border-radius: 999px; }
.bp-author-stats strong { color: var(--velyon-text); }
.bp-author-social a { width: 34px; height: 34px; display: grid; place-items: center; color: var(--velyon-text-muted); border: 1px solid var(--velyon-border); border-radius: 50%; }
.bp-author-social a:hover { color: var(--velyon-accent-deep); border-color: var(--velyon-accent); }
.bp-author-social svg { width: 16px; height: 16px; }
.bp-author-more { display: grid; gap: 6px; padding-top: 12px; font-size: 14px; border-top: 1px solid var(--velyon-border); }
.bp-author-more-h { font-size: 12.5px; color: var(--velyon-text-muted); }
.bp-author-all { font-weight: 700; color: var(--velyon-accent-deep); }

/* ---------- previous / next ---------- */
.bp-postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 26px 0; }
.bp-postnav a { display: flex; align-items: center; gap: 12px; padding: 14px; color: var(--velyon-text); background: var(--velyon-surface); border: 1px solid var(--velyon-border); border-radius: var(--velyon-radius-m); }
.bp-postnav a:hover { border-color: var(--velyon-accent); }
.bp-postnav-next { flex-direction: row-reverse; text-align: right; }
.bp-pn-img { flex: none; width: 64px; height: 52px; object-fit: cover; border-radius: 8px; }
.bp-pn-img--ph { display: block; background: linear-gradient(135deg, #6366f1, #22c55e); }
.bp-pn-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bp-pn-kicker { font-family: var(--velyon-font-heading); font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--velyon-accent-deep); }
.bp-pn-title { font-family: var(--velyon-font-heading); font-size: 14px; font-weight: 700; line-height: 1.3; }

/* ---------- related reading ---------- */
.bp-related { margin: 26px 0; }
.bp-related-h { margin: 0 0 14px; font-size: 22px; font-weight: 800; }
.bp-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.bp-rc { display: flex; flex-direction: column; overflow: hidden; color: var(--velyon-text); background: var(--velyon-surface); border: 1px solid var(--velyon-border); border-radius: var(--velyon-radius-m); transition: transform .15s ease, box-shadow .15s ease; }
.bp-rc:hover { transform: translateY(-3px); box-shadow: var(--velyon-shadow); }
.bp-rc-img { position: relative; display: block; aspect-ratio: 5 / 3; overflow: hidden; }
.bp-rc-img img, .bp-rc-ph { display: block; width: 100%; height: 100%; object-fit: cover; }
.bp-rc-img em { position: absolute; left: 10px; top: 10px; padding: 3px 10px; font-family: var(--velyon-font-heading); font-size: 10.5px; font-style: normal; font-weight: 700; color: var(--velyon-accent-deep); background: var(--velyon-bg); border-radius: 999px; }
.bp-rc-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.bp-rc-body strong { font-family: var(--velyon-font-heading); font-size: 14.5px; line-height: 1.3; }
.bp-rc-body small { font-size: 12px; color: var(--velyon-text-muted); }

/* ---------- closing call-to-action ---------- */
.bp-continue { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: center; margin: 26px 0; padding: 28px; border: 1px solid color-mix(in srgb, var(--velyon-accent) 40%, var(--velyon-border)); border-radius: 22px; background: linear-gradient(135deg, color-mix(in srgb, var(--velyon-accent) 14%, var(--velyon-surface)), var(--velyon-surface) 80%); }
.bp-continue-title { margin: 0 0 6px; font-size: 24px; font-weight: 800; }
.bp-continue-text { margin: 0; color: var(--velyon-text-muted); }
.bp-continue-act { display: grid; gap: 8px; }

/* ---------- sidebar ---------- */
.bp-side { min-width: 0; align-self: stretch; } /* full column height, so the sticky stack has room to travel */
.bp-stick { position: sticky; top: var(--bp-stick-top, 88px); display: grid; gap: 14px; }
.bp-card { padding: 18px; background: var(--velyon-surface); border: 1px solid var(--velyon-border); border-radius: 20px; }
.bp-card-title { margin: 0 0 10px; font-family: var(--velyon-font-heading); font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--velyon-text-muted); }
.bp-card--toc .bp-toc { max-height: 30vh; overflow: auto; }
.bp-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 13.5px; }
.bp-toc a { display: flex; gap: 8px; padding: 6px 8px; line-height: 1.35; color: var(--velyon-text-muted); border-radius: 8px; }
.bp-toc a::before { content: "\25CB"; flex: none; margin-top: 2px; font-size: 11px; }
.bp-toc a.is-done { color: var(--velyon-text); }
.bp-toc a.is-done::before { content: "\2713"; font-weight: 800; color: var(--velyon-accent-deep); }
.bp-toc a.is-on { font-weight: 600; color: var(--velyon-text); background: color-mix(in srgb, var(--velyon-accent) 14%, transparent); }
.bp-toc a.is-on::before { content: "\25CF"; color: var(--velyon-accent-deep); }
.bp-toc-meter { height: 6px; margin: 12px 0 4px; overflow: hidden; background: var(--velyon-surface-alt); border-radius: 999px; }
.bp-toc-meter i { display: block; width: 0; height: 100%; background: var(--velyon-accent); }
.bp-toc-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--velyon-text-muted); }

.bp-hub { padding: 20px; color: #ecedee; background: #06100a; border: 1px solid var(--velyon-accent); border-radius: 20px; }
.bp-hub-eyebrow { font-family: var(--velyon-font-heading); font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--velyon-accent); }
.bp-hub-title { margin: 6px 0; font-size: 20px; font-weight: 800; line-height: 1.2; color: #ecedee; }
.bp-hub-title em { font-style: normal; color: var(--velyon-accent); }
.bp-hub-text { margin: 0 0 14px; font-size: 13px; color: #9aa0a6; }
.bp-hub-btn { display: block; padding: 10px; font-family: var(--velyon-font-heading); font-size: 14px; font-weight: 700; text-align: center; color: #05170a; background: var(--velyon-accent); border-radius: 999px; }
.bp-card--news input[type="email"], .bp-card--news input[type="text"] { width: 100%; box-sizing: border-box; padding: 10px; color: var(--velyon-text); background: var(--velyon-bg); border: 1px solid var(--velyon-border); border-radius: 10px; }
.bp-card--news button, .bp-card--news input[type="submit"] { width: 100%; margin-top: 8px; padding: 10px; font-weight: 700; color: var(--velyon-on-accent); background: var(--velyon-accent); border: 0; border-radius: 999px; cursor: pointer; }

/* ---------- reading progress ---------- */
.bp-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 9990; height: 3px; pointer-events: none; }
.bp-progress i { display: block; width: 0; height: 100%; background: var(--velyon-accent); }
.bp-pill { position: fixed; left: 50%; bottom: calc(var(--velyon-bottom-nav-height, 0px) + 16px); transform: translateX(-50%); z-index: 9980; display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 24px); padding: 8px 16px; font-size: 12.5px; background: var(--velyon-surface); border: 1px solid var(--velyon-border); border-radius: 999px; box-shadow: var(--velyon-shadow); }
.bp-pill[hidden] { display: none; }
.bp-pill strong { font-family: var(--velyon-font-heading); }
.bp-toast { position: fixed; left: 50%; top: 84px; z-index: 9995; padding: 10px 20px; font-family: var(--velyon-font-heading); font-size: 13px; font-weight: 700; color: var(--velyon-on-accent); background: var(--velyon-accent); border-radius: 999px; opacity: 0; transform: translate(-50%, -24px); transition: opacity .3s ease, transform .3s ease; pointer-events: none; }
.bp-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-height: 1000px) { .bp-card--news { display: none; } }
@media (max-height: 760px) { .bp-hub-text { display: none; } }
@media (max-width: 900px) {
	.bp-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 14px 16px 40px; }
	.bp-toc-mobile { display: block; }
	.bp-card--toc { display: none; }
	.bp-stick { position: static; }
	.bp-card--news { display: block; }
	.bp-related-grid, .bp-postnav, .bp-continue { grid-template-columns: minmax(0, 1fr); }
	.bp-author { grid-template-columns: minmax(0, 1fr); }
	.bp-anchor { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.bp-rc, .bp-readnext a, .bp-toast { transition: none; }
	.bp-rc:hover, .bp-readnext a:hover { transform: none; }
}

/* ---------- Listen to this article + Translate (v2.8.0) ---------- */
.bp-listen {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	margin: 14px 0 18px;
	overflow: hidden;
	background: linear-gradient(135deg, color-mix(in srgb, var(--velyon-accent) 9%, var(--velyon-surface)), var(--velyon-surface) 70%);
	border: 1px solid var(--velyon-border);
	border-left: 4px solid var(--velyon-accent);
	border-radius: var(--velyon-radius-m);
}
.bp-listen[hidden], .bp-listen-main[hidden] { display: none; }
.bp-listen:not(:has(.bp-listen-tr)), .bp-listen:has(.bp-listen-main[hidden]) { grid-template-columns: minmax(0, 1fr); }
.bp-listen-main, .bp-listen-tr { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 18px; min-height: 76px; box-sizing: border-box; }
.bp-listen-main { flex-wrap: wrap; }
.bp-listen-tr { border-left: 1px solid var(--velyon-border); }
.bp-listen-ic { flex: none; width: 38px; height: 38px; display: grid; place-items: center; color: var(--velyon-accent-deep); background: var(--velyon-surface); border: 1px solid var(--velyon-border); border-radius: 50%; }
.bp-listen-ic svg { width: 19px; height: 19px; }
.bp-listen-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 140px; }
.bp-listen-title { font-family: var(--velyon-font-heading); font-size: 14px; font-weight: 700; }
.bp-listen-status { font-size: 12.5px; color: var(--velyon-text-muted); }
.bp-listen-ctl { display: flex; align-items: center; gap: 8px; }
.bp-listen-play { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 18px; font-family: var(--velyon-font-heading); font-size: 13.5px; font-weight: 700; color: var(--velyon-on-accent); background: var(--velyon-accent); border: 0; border-radius: 999px; cursor: pointer; }
.bp-listen-play svg { width: 16px; height: 16px; }
.bp-listen-play .bp-i-pause { display: none; }
.bp-listen[data-state="playing"] .bp-i-play { display: none; }
.bp-listen[data-state="playing"] .bp-i-pause { display: block; }
.bp-listen-icon { min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 10px; font-family: var(--velyon-font-heading); font-size: 12.5px; font-weight: 700; color: var(--velyon-text-muted); background: var(--velyon-surface); border: 1px solid var(--velyon-border); border-radius: 999px; cursor: pointer; }
.bp-listen-icon svg { width: 15px; height: 15px; }
.bp-listen-icon:hover:not(:disabled) { color: var(--velyon-text); border-color: var(--velyon-accent); }
.bp-listen-icon:disabled { opacity: .45; cursor: default; }
.bp-listen-play:focus-visible, .bp-listen-icon:focus-visible { outline: 2px solid var(--velyon-accent); outline-offset: 2px; }
.bp-listen-meter { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; }
.bp-listen-meter i { display: block; width: 0; height: 100%; background: var(--velyon-accent); transition: width .3s ease; }
.bp-listen[data-state="error"] .bp-listen-status { color: #c0392b; }
.bp-listen-gt select { max-width: 100%; padding: 6px 8px; color: var(--velyon-text); background: var(--velyon-bg); border: 1px solid var(--velyon-border); border-radius: 8px; }
.bp-reading { background: color-mix(in srgb, var(--velyon-accent) 13%, transparent); border-radius: 6px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--velyon-accent) 13%, transparent); }
@media (max-width: 900px) {
	.bp-listen { grid-template-columns: minmax(0, 1fr); }
	.bp-listen-tr { border-left: 0; border-top: 1px solid var(--velyon-border); }
}
@media (prefers-reduced-motion: reduce) { .bp-listen-meter i { transition: none; } }
