/**
 * BV Core - article parts: byline, table of contents, share, related grid.
 * Values from the Blue Vineyard blog article design.
 *
 * Each part is a single root element with no outer container, so the page
 * builder owns layout and spacing.
 */

.bv-byline,
.bv-toc,
.bv-share,
.bv-related {
	--bv-blue: #2455dd;
	--bv-blue-soft: #d3ddf8;
	--bv-ink: #212b36;
	--bv-muted: #637381;
	--bv-line: #dfe3e8;

	color: var(--bv-ink);
	font-family: "Archivo", inherit;
}

.bv-byline *,
.bv-toc *,
.bv-share *,
.bv-related * {
	box-sizing: border-box;
}

/* ------------------------------------------------------------- Byline --- */

.bv-byline {
	display: flex;
	gap: 16px;
	align-items: center;
}

.bv-byline__avatar {
	flex-shrink: 0;
	width: 56px;
	height: 56px;
	border-radius: 999px;
	overflow: hidden;
	background: var(--bv-blue-soft);
	color: var(--bv-blue);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 18px;
}

.bv-byline__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.bv-byline__info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.bv-byline__name {
	font-weight: 600;
	font-size: 18px;
	line-height: 26px;
	color: var(--bv-ink);
}

.bv-byline__detail {
	font-weight: 400;
	font-size: 15px;
	line-height: 22px;
	color: var(--bv-muted);
}

/* --------------------------------------------- Sidebar: TOC and share --- */

.bv-toc,
.bv-share {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.bv-toc__title,
.bv-share__title {
	font-weight: 500;
	font-size: 13px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--bv-blue);
}

.bv-toc__list,
.bv-share__list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	align-items: flex-start;
}

/* TOC entries fill the column so long headings can truncate. */
.bv-toc__list {
	align-items: stretch;
}

.bv-toc__link,
.bv-share__link {
	font-weight: 500;
	font-size: 16px;
	line-height: 24px;
	color: var(--bv-muted);
	text-decoration: none;
	transition: color 0.2s ease;
}

/* Headings can be long; keep each entry to a single line so the sidebar
   stays scannable. The full text remains in the DOM for screen readers and
   in the title attribute on hover. */
.bv-toc__link {
	display: block;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bv-toc__link:hover,
.bv-share__link:hover,
.bv-toc__link:focus-visible,
.bv-share__link:focus-visible {
	color: var(--bv-blue);
}

/* Current section in the table of contents. */
.bv-toc__link[aria-current="true"] {
	color: var(--bv-ink);
}

/* Deeper headings are indented so the hierarchy reads. */
.bv-toc__link--h3 {
	padding-left: 16px;
}

.bv-toc__link--h4 {
	padding-left: 32px;
}

/* The copy-link control is a button; strip the native chrome. */
.bv-share__link--copy {
	appearance: none;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-weight: 500;
	cursor: pointer;
	text-align: left;
}

.bv-share__link.is-copied {
	color: var(--bv-blue);
}

/* ---------------------------------------------------- Related insights --- */

.bv-related {
	display: flex;
	flex-direction: column;
	gap: 48px;
}

.bv-related__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 24px;
}

.bv-related__title {
	margin: 0;
	font-weight: 800;
	font-size: clamp(36px, 4.5vw, 64px);
	line-height: 1.12;
	color: var(--bv-ink);
}

.bv-related__view-all {
	flex-shrink: 0;
	font-weight: 600;
	font-size: 16px;
	line-height: 24px;
	color: var(--bv-blue);
	text-decoration: none;
}

.bv-related__view-all:hover {
	text-decoration: underline;
}

.bv-related__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 24px;
}

@media (max-width: 720px) {
	.bv-related {
		gap: 32px;
	}

	.bv-related__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.bv-toc__link,
	.bv-share__link {
		transition: none;
	}
}
