/* =========================================================================
   Boyle Built — Single Blog / Guide (Phase I12)

   Page-specific components only. The hero (+ 'byline' slot, see
   internal-hero.css), buttons, breadcrumbs and the closing Consultation
   CTA are reused as-is. blog-sidebar-list.php and blog-question-card.php
   (extended with a 'light' variant here) come from I11's resources.css,
   so this file only needs its own handles for the genuinely new pieces —
   Table of Contents, the article body itself, the PDF download card, and
   the Share row — built from the canonical Figma frame
   (PmKYD86EAlc1bZBDF5dSGK, node 214:2, "11 — Timber vs Conventional").
   ========================================================================= */

.article-main {
	background-color: var(--color-bg);
}

.article-main__inner {
	display: flex;
	flex-direction: column;
	gap: 32px;
	max-width: 1280px;
	margin: 0 auto;
	padding: var(--space-section-v) var(--space-section-h);
}

.article-main__content {
	display: flex;
	flex-direction: column;
	gap: 32px;
	min-width: 0;
}

.article-main__sidebar {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* -------------------------------------------------------------------------
   Table of Contents
   ------------------------------------------------------------------------- */

.article-toc {
	padding: 20px;
	border: 1px solid var(--color-border-light);
	border-radius: var(--radius-card);
	background-color: #eae7e2;
}

.article-toc__heading {
	margin: 0 0 14px;
	color: var(--color-ink);
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 16px;
}

.article-toc__list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.article-toc__item a {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.article-toc__number {
	flex-shrink: 0;
	color: var(--color-gold);
	font-family: var(--font-body);
	font-weight: 800;
	font-size: 11px;
}

.article-toc__label {
	color: var(--color-ink);
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 13px;
	line-height: 1.4;
}

/* -------------------------------------------------------------------------
   Article body — normal WordPress editor content. This is deliberately
   generic (no bespoke "callout"/"comparison table" data structures): any
   post using real <h2>/<h3>/<p>/<ul>/<table>/<blockquote>/<img> content
   inherits this styling automatically.
   ------------------------------------------------------------------------- */

.article-content {
	color: var(--color-ink);
	font-family: var(--font-body);
	font-size: 15px;
	line-height: 1.7;
	max-width: 760px;
}

.article-content > *:first-child {
	margin-top: 0;
}

.article-content h2 {
	margin: 40px 0 12px;
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 24px;
	scroll-margin-top: 20px;
}

.article-content h3 {
	margin: 28px 0 10px;
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 19px;
	scroll-margin-top: 20px;
}

.article-content p {
	margin: 0 0 16px;
	color: var(--color-body-muted);
}

.article-content ul,
.article-content ol {
	margin: 0 0 16px;
	padding-left: 20px;
	color: var(--color-body-muted);
}

.article-content li {
	margin-bottom: 6px;
}

.article-content a {
	color: var(--color-primary-green);
	text-decoration: underline;
}

.article-content img,
.article-content figure {
	display: block;
	width: 100%;
	height: auto;
	margin: 20px 0;
	border-radius: var(--radius-card);
}

.article-content img {
	object-fit: cover;
}

/* Comparison table — WP core's Table block (or a plain <table> from the
   classic editor) both match this selector. */
.article-content table {
	width: 100%;
	margin: 0 0 20px;
	border-collapse: collapse;
	font-size: 13px;
}

.article-content th {
	padding: 10px 12px;
	background-color: var(--color-dark-green-1);
	color: var(--color-text-light);
	font-family: var(--font-body);
	font-weight: 700;
	text-align: left;
}

.article-content td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--color-border-light);
	color: var(--color-ink);
}

.article-content tr:nth-child(even) td {
	background-color: var(--color-icon-ring-bg);
}

/* Callout — a real WordPress blockquote, styled to match the Figma's
   tan callout box. The book icon is a decorative CSS background-image,
   not stored data. */
.article-content blockquote {
	margin: 20px 0;
	padding: 18px 20px 18px 56px;
	border-radius: var(--radius-card);
	background: #e6d9c9 url('../icons/plan-help-book.svg') no-repeat 18px center;
	background-size: 22px 22px;
	color: var(--color-ink);
	font-family: var(--font-body);
	font-size: 14px;
	font-style: italic;
	line-height: 1.6;
}

.article-content blockquote p {
	margin: 0;
	color: inherit;
}

/* -------------------------------------------------------------------------
   PDF download card
   ------------------------------------------------------------------------- */

.article-download-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	padding: 20px;
	border: 1px solid var(--color-border-light);
	border-radius: var(--radius-card);
}

.article-download-card__icon {
	width: 28px;
	height: 28px;
}

.article-download-card__heading {
	margin: 0;
	color: var(--color-ink);
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 17px;
}

.article-download-card__text {
	margin: 0 0 4px;
	color: var(--color-body-muted);
	font-family: var(--font-body);
	font-size: 13px;
	line-height: 1.5;
}

.article-download-card .btn {
	width: 100%;
	justify-content: center;
}

/* -------------------------------------------------------------------------
   Share row
   ------------------------------------------------------------------------- */

.article-share {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
}

.article-share__heading {
	margin: 0;
	color: var(--color-ink);
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 17px;
}

.article-share__icons {
	display: flex;
	gap: 10px;
}

.article-share__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background-color: var(--color-dark-green-1);
}

.article-share__icon img {
	width: 15px;
	height: 15px;
}

.article-share__icon.is-copied {
	background-color: var(--color-primary-green);
}

/* -------------------------------------------------------------------------
   Tablet (601–1024px)
   ------------------------------------------------------------------------- */

@media (min-width: 601px) {
	.article-toc__list {
		flex-direction: row;
		flex-wrap: wrap;
	}

	.article-toc__item {
		flex: 0 0 calc(33.333% - 8px);
	}
}

/* -------------------------------------------------------------------------
   Desktop (1025px+)
   ------------------------------------------------------------------------- */

@media (min-width: 1025px) {
	.article-main__inner {
		flex-direction: row;
		align-items: flex-start;
	}

	.article-main__content {
		flex: 1;
	}

	.article-main__sidebar {
		flex: 0 0 300px;
	}

	.article-toc__list {
		flex-wrap: nowrap;
	}

	.article-toc__item {
		flex: 1;
	}
}
