/* Blog Reader Layout — all rules scoped to .tpp-br */
.tpp-br {
	--tpp-green: #0B422A;
	--tpp-green-2: #14633f;
	--tpp-orange: #F2A93B;
	--tpp-ink: #19191a;
	--tpp-muted: #5f6368;
	--tpp-line: #e6e8e6;
	--tpp-soft: #f5f7f5;
	--tpp-measure: 720px;
	--tpp-heading-line: #F2C14E; /* colour of the line under headings */
	--tpp-text-size: 16px;      /* article text size */
	font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	color: var(--tpp-ink);
}
.tpp-br *, .tpp-br *::before, .tpp-br *::after { box-sizing: border-box; }

/* Hero */
.tpp-br-hero {
	position: relative;
	color: #fff;
	background: linear-gradient(135deg, var(--tpp-green), var(--tpp-green-2));
	padding: clamp(56px, 9vw, 110px) 20px clamp(48px, 7vw, 84px);
	overflow: hidden;
}
.tpp-br-hero.has-image {
	background:
		linear-gradient(180deg, rgba(8, 40, 26, .55) 0%, rgba(8, 40, 26, .82) 100%),
		var(--tpp-br-hero) center / cover no-repeat;
}
.tpp-br-hero__inner { max-width: 1120px; margin: 0 auto; }
.tpp-br-crumbs { font-size: 13px; opacity: .85; display: flex; gap: 8px; margin-bottom: 18px; }
.tpp-br-crumbs a { color: #fff; text-decoration: none; }
.tpp-br-crumbs a:hover { text-decoration: underline; }
.tpp-br-pill {
	display: inline-block;
	background: var(--tpp-orange);
	color: var(--tpp-green) !important;
	font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
	padding: 5px 12px; border-radius: 999px; text-decoration: none; margin-bottom: 18px;
}
.tpp-br .tpp-br-title {
	color: #fff;
	font-size: clamp(32px, 5vw, 56px);
	line-height: 1.1; font-weight: 800; letter-spacing: -.02em;
	max-width: 18ch; margin: 0 0 18px;
	text-shadow: 0 2px 20px rgba(0,0,0,.25);
}
.tpp-br-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 15px; opacity: .92; }

/* ListingHive's wrapper uses overflow:hidden, which stops the sidebar from
   sticking. "clip" still stops sideways scrolling but lets sticky work. */
body.tpp-br-active .site-container { overflow: visible !important; overflow-x: clip !important; }

/* Theme banner (ListingHive): title on the left, lined up with the article */
body.tpp-br-active .header-hero .container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
body.tpp-br-active .header-hero .row { margin: 0; }
body.tpp-br-active .header-hero .row > [class*="col-"] { margin-left: 0; padding: 0; flex: 0 0 100%; width: 100%; max-width: 760px; }
body.tpp-br-active .header-hero .post__header,
body.tpp-br-active .header-hero .post__header * { text-align: left; }
body.tpp-br-active .header-hero .post__details { justify-content: flex-start; }

/* No own hero: the theme's banner is the title */
.tpp-br--no-hero .tpp-br-layout { padding-top: 40px; }
.tpp-br-readtime { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--tpp-muted); margin: 0 0 20px; }
.tpp-br-readtime svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* Hide WordPress's default "Uncategorized" pill in the theme banner */
body.tpp-br-active .header-hero .post__categories a[href*="/category/uncategorized/"] { display: none; }
body.tpp-br-active .header-hero .post__categories:not(:has(a:not([href*="/category/uncategorized/"]))) { display: none; }

/* Reading progress */
.tpp-br-progress { position: sticky; top: 0; z-index: 20; height: 3px; background: transparent; }
.tpp-br-progress span { display: block; height: 100%; width: 0; background: var(--tpp-orange); transition: width .1s linear; }
body.admin-bar .tpp-br-progress { top: 32px; }

/* Layout */
.tpp-br-layout {
	max-width: 1120px; margin: 0 auto; padding: 48px 20px 80px;
	display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px;
}
.tpp-br-side__sticky { position: sticky; top: 100px; }
.tpp-br-side__label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tpp-muted); margin: 0 0 12px; }
.tpp-br-toc { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.tpp-br-toc li { margin: 0; }
.tpp-br-toc a {
	display: block; padding: 7px 0 7px 14px; border-left: 2px solid var(--tpp-line);
	color: var(--tpp-ink); text-decoration: none; font-size: 14px; line-height: 1.4;
	transition: color .15s, border-color .15s;
}
.tpp-br-toc a:hover { color: var(--tpp-green-2); }
.tpp-br-toc a.is-active { border-left-color: var(--tpp-orange); color: var(--tpp-green); font-weight: 700; }
.tpp-br-side hr { border: 0; border-top: 1px solid var(--tpp-line); margin: 22px 0; }

.tpp-br-actions { display: flex; flex-direction: column; gap: 4px; }
.tpp-br .tpp-br-btn {
	display: flex; align-items: center; gap: 10px; width: 100%;
	background: none; border: 1px solid transparent; border-radius: 8px;
	padding: 9px 12px; font: inherit; font-size: 14px; color: var(--tpp-ink);
	text-decoration: none; cursor: pointer; text-align: left; box-shadow: none;
}
.tpp-br .tpp-br-btn:hover { background: var(--tpp-soft); color: var(--tpp-green); }
.tpp-br .tpp-br-btn--outline { border-color: var(--tpp-line); font-weight: 600; margin-bottom: 6px; }
.tpp-br-btn svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Article body */
.tpp-br-main { max-width: var(--tpp-measure); }
.tpp-br-lede { font-size: 18px; line-height: 1.6; color: var(--tpp-muted); margin: 0 0 32px; }
.tpp-br-content { font-size: var(--tpp-text-size); line-height: 1.75; }
.tpp-br-content > * { margin-top: 0; margin-bottom: 1.4em; }
/* Section headings get an accent line underneath */
.tpp-br .tpp-br-content h1,
.tpp-br .tpp-br-content h2 {
	font-size: clamp(22px, 2.4vw, 26px); line-height: 1.3; font-weight: 800; letter-spacing: -.01em;
	color: var(--tpp-ink);
	margin: 1.8em 0 .8em;
	padding: 0 0 .5em;
	border: 0;
	border-bottom: 1px solid var(--tpp-heading-line);
	scroll-margin-top: 110px;
}
.tpp-br .tpp-br-content h1:first-child,
.tpp-br .tpp-br-content h2:first-child { margin-top: 0; }
.tpp-br-content h3 { font-size: 19px; line-height: 1.35; font-weight: 700; margin: 1.6em 0 .5em; scroll-margin-top: 110px; }
.tpp-br-content a { color: var(--tpp-green-2); text-decoration: underline; text-decoration-color: var(--tpp-orange); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.tpp-br-content img { max-width: 100%; height: auto; border-radius: 14px; }
.tpp-br-content figure { margin: 2em 0; }
.tpp-br-content figcaption { font-size: 14px; color: var(--tpp-muted); text-align: center; margin-top: 8px; }
.tpp-br-content ul, .tpp-br-content ol { padding-left: 1.3em; }
.tpp-br-content li { margin-bottom: .4em; }
.tpp-br-content li::marker { color: var(--tpp-green-2); }
.tpp-br-content blockquote,
.tpp-br-content .wp-block-quote,
.tpp-br-content .wp-block-pullquote {
	border: 0; border-left: 4px solid var(--tpp-orange);
	background: none; padding: 4px 0 4px 24px; margin: 2em 0;
	font-size: 19px; line-height: 1.55; font-style: italic; color: var(--tpp-green); text-align: left;
}
.tpp-br-content blockquote p:last-child { margin-bottom: 0; }
.tpp-br-content blockquote cite { display: block; font-size: 14px; font-style: normal; color: var(--tpp-muted); margin-top: 10px; }
.tpp-br-content hr { border: 0; border-top: 1px solid var(--tpp-line); margin: 3em 0; }
.tpp-br-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tpp-br-content th, .tpp-br-content td { border-bottom: 1px solid var(--tpp-line); padding: 10px 12px; text-align: left; }
.tpp-br-content pre { background: var(--tpp-soft); border-radius: 10px; padding: 16px; overflow-x: auto; font-size: 15px; }

/* After the article */
.tpp-br-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 0; }
.tpp-br-tags a { background: var(--tpp-soft); color: var(--tpp-green); padding: 6px 12px; border-radius: 999px; font-size: 14px; text-decoration: none; }
.tpp-br-author { display: flex; gap: 16px; align-items: center; border-top: 1px solid var(--tpp-line); border-bottom: 1px solid var(--tpp-line); padding: 24px 0; margin: 40px 0; }
.tpp-br-author img { border-radius: 50%; flex: none; }
.tpp-br-author p { margin: 0; }
.tpp-br-author__name { font-weight: 700; }
.tpp-br-author__bio { color: var(--tpp-muted); font-size: 15px; margin-top: 4px !important; }
.tpp-br-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tpp-br-nav a { display: block; border: 1px solid var(--tpp-line); border-radius: 12px; padding: 16px 18px; text-decoration: none; color: var(--tpp-ink); transition: border-color .15s; }
.tpp-br-nav a:hover { border-color: var(--tpp-green-2); }
.tpp-br-nav__next { grid-column: 2; text-align: right; }
.tpp-br-nav small { display: block; color: var(--tpp-muted); font-size: 13px; margin-bottom: 4px; }
.tpp-br-nav span { font-weight: 700; line-height: 1.35; }
.tpp-br-comments { margin-top: 48px; }

.tpp-br-toast {
	position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
	background: var(--tpp-green, #0B422A); color: #fff; padding: 10px 18px; border-radius: 999px;
	font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 9999;
}
.tpp-br-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Tablet / phone: contents and actions move above the article */
@media (max-width: 960px) {
	.tpp-br-layout { grid-template-columns: 1fr; gap: 28px; padding-top: 32px; }
	.tpp-br-side__sticky { position: static; }
	.tpp-br-side { background: var(--tpp-soft); border-radius: 14px; padding: 18px; }
	.tpp-br-actions { flex-direction: row; flex-wrap: wrap; }
	.tpp-br .tpp-br-btn { width: auto; }
	.tpp-br .tpp-br-btn--outline { margin-bottom: 0; background: #fff; }
	.tpp-br-main { max-width: none; }
}
@media (max-width: 600px) {
	.tpp-br-content { font-size: 15.5px; }
	.tpp-br-nav { grid-template-columns: 1fr; }
	.tpp-br-nav__next { grid-column: 1; }
	body.admin-bar .tpp-br-progress { top: 0; }
}

/* Print / Save as PDF: just the article */
@media print {
	body.tpp-br-active header:not(.tpp-br-hero),
	body.tpp-br-active footer,
	body.tpp-br-active #wpadminbar,
	body.tpp-br-active .tpp-br-side,
	body.tpp-br-active .tpp-br-progress,
	body.tpp-br-active .tpp-br-nav,
	body.tpp-br-active .tpp-br-comments,
	body.tpp-br-active .tpp-br-toast,
	body.tpp-br-active [class*="whatsapp"],
	body.tpp-br-active .site-header,
	body.tpp-br-active .site-footer { display: none !important; }
	html { margin-top: 0 !important; }
	.tpp-br-hero, .tpp-br-hero.has-image { background: none !important; color: #000; padding: 0 0 16px; }
	.tpp-br .tpp-br-title { color: #000; text-shadow: none; max-width: none; font-size: 30px; }
	.tpp-br-crumbs { display: none; }
	.tpp-br-pill { border: 1px solid #999; background: none; }
	.tpp-br-layout { display: block; padding: 0; }
	.tpp-br-main { max-width: none; }
	.tpp-br-content { font-size: 12pt; line-height: 1.6; }
	.tpp-br-content a { color: #000; }
	.tpp-br-content h2, .tpp-br-content h3 { break-after: avoid; }
	.tpp-br-content img, .tpp-br-content blockquote { break-inside: avoid; }
}
