/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* ==========================================================================
 * bodyfat.tips — editorial layer
 *
 * Scope is deliberately narrow. The site's visual direction is not settled,
 * so this styles the claim-checking apparatus (which is currently unstyled
 * and looks broken) and fixes reading typography. It does not impose a
 * broader identity — that lands once a direction is agreed.
 *
 * Colour is semantic only: the four confidence tiers. Nothing decorative.
 * ========================================================================== */

:root {
	--bft-established: #14705C;
	--bft-supported:   #1F5486;
	--bft-preliminary: #9A6A00;
	--bft-unsupported: #B3231B;

	--bft-rule:  #E1E4E5;
	--bft-rule2: #C4C9CB;
	--bft-mute:  #5A6469;
	--bft-faint: #868F94;
	--bft-mono:  ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* --------------------------------------------------------------- reading */

.single .entry-content p {
	line-height: 1.68;
}

.single .entry-content > * + * {
	margin-top: 1.15em;
}

.single .entry-content h2 {
	margin-top: 2.2em;
	line-height: 1.22;
}

.single .entry-content h3 {
	margin-top: 1.8em;
}

/* Links in body copy should read as citations, not decoration. */
.single .entry-content a {
	text-underline-offset: 0.16em;
	text-decoration-thickness: 1px;
}

/* ---------------------------------------------------------- confidence tier */

.bft-tier {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
}

.bft-tier::before {
	content: "";
	width: 1.5rem;
	height: 3px;
	background: currentColor;
	flex: none;
}

.bft-tier--established { color: var(--bft-established); }
.bft-tier--supported   { color: var(--bft-supported); }
.bft-tier--preliminary { color: var(--bft-preliminary); }
.bft-tier--unsupported { color: var(--bft-unsupported); }

/* ------------------------------------------------------------ evidence panel */

.bft-evidence {
	border: 1px solid var(--bft-rule);
	padding: 1.15rem 1.35rem 1.25rem;
	margin: 0 0 2rem;
}

.bft-evidence__head {
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--bft-faint);
	margin-bottom: 0.9rem;
}

/* Cells reflow rather than being forced to two columns — values here vary from
   "166" to "Meta-analysis of 10 randomised trials", and a fixed grid squeezed
   the long ones into unreadable slivers. */
.bft-evidence dl {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 0 1.75rem;
	margin: 0;
}

/* Label above value. Side-by-side breaks as soon as a value runs long. */
.bft-evidence .row {
	display: block;
	padding: 0.55rem 0;
	border-bottom: 1px solid var(--bft-rule);
}

.bft-evidence dt {
	font-size: 0.5625rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--bft-faint);
	margin-bottom: 0.2rem;
}

.bft-evidence dd {
	margin: 0;
	font-family: var(--bft-mono);
	font-size: 0.875rem;
	line-height: 1.4;
	font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------- provenance chain */

.bft-provenance {
	margin: 0 0 2rem;
}

.bft-provenance__head {
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--bft-faint);
	padding-bottom: 0.5rem;
	border-bottom: 2px solid currentColor;
	margin-bottom: 0;
}

.bft-provenance__chain {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: bft-step;
}

/* The plugin emits label, source and year as three FLAT siblings inside the
   step — no wrapper. So the counter and the year are positioned absolutely
   and the spans just stack. A grid here put the source in the counter column
   and wrapped it one character per line. */
.bft-provenance__step {
	position: relative;
	padding: 0.85rem 3.6rem 0.85rem 2.3rem;
	border-bottom: 1px solid var(--bft-rule);
	counter-increment: bft-step;
}

.bft-provenance__step::before {
	content: counter(bft-step, decimal-leading-zero);
	position: absolute;
	left: 0;
	top: 1.05rem;
	line-height: 1;
	font-family: var(--bft-mono);
	font-size: 0.6875rem;
	font-weight: 700;
	color: var(--bft-faint);
}

.bft-provenance__label {
	display: block;
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--bft-faint);
	margin-bottom: 0.25rem;
}

.bft-provenance__source {
	display: block;
	font-size: 1rem;
	line-height: 1.45;
}

/* Right-hand date column, like a ledger. */
.bft-provenance__year {
	position: absolute;
	right: 0;
	top: 1.05rem;
	line-height: 1;
	font-family: var(--bft-mono);
	font-size: 0.75rem;
	color: var(--bft-faint);
	font-variant-numeric: tabular-nums;
}

@media (max-width: 480px) {
	.bft-provenance__step { padding-right: 0; }
	.bft-provenance__year { position: static; display: block; margin-top: 0.3rem; }
}

/* ------------------------------------------------------------- corrections */

/* A permanent matter of record, not an error state. */
.bft-correction {
	border-left: 2px solid var(--bft-preliminary);
	padding: 0.85rem 0 0.85rem 1.25rem;
	margin: 2.25rem 0;
	font-size: 0.9375rem;
}

.bft-correction__label {
	display: block;
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--bft-preliminary);
	margin-bottom: 0.4rem;
}

.bft-correction p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------- citations */

.bft-cite {
	font-family: var(--bft-mono);
	font-size: 0.75rem;
	text-decoration: none;
	border-bottom: 1px solid currentColor;
	white-space: nowrap;
}

/* ---------------------------------------------------------------- ad slots */

/* Always labelled, never native. Reserved height so filling causes no shift. */
.bft-ad {
	margin: 2.5rem 0;
	padding-top: 0.65rem;
	border-top: 1px solid var(--bft-rule);
	text-align: center;
	min-height: 106px;
}

.bft-ad::before {
	content: "Advertisement";
	display: block;
	margin-bottom: 0.7rem;
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--bft-faint);
}

/* ------------------------------------------------------------ housekeeping */

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
