/* =========================================================================
   The Sacred Files — block styles shared by the front end and the editor.
   Tokens come from theme.json (--wp--preset--*); a few extra are defined here.
   ========================================================================= */

:root {
	--tsf-abyss: #1a1217;         /* header, footer, hero panel */
	--tsf-wine: #3d1a26;          /* dark cards, hover, archive headers */
	--tsf-burgundy: #562434;
	--tsf-burgundy-deep: #291d24;
	--tsf-parchment: #f4ebdd;
	--tsf-ivory: #fbf7f0;
	--tsf-gold: #b99867;          /* on dark backgrounds only (5.98:1 on deep burgundy) */
	--tsf-gold-light: #d9c19a;    /* gold text on dark (8.8:1 on wine, 7.1:1 on burgundy) */
	--tsf-gold-text: #76582a;     /* gold-toned text on light backgrounds (5.56:1 on parchment) */
	--tsf-midnight: #242328;
	--tsf-muted: #5e5560;         /* secondary text on light (6.04:1) */
	--tsf-muted-dark: #c9c0b6;    /* secondary text on dark (9.03:1) */
	--tsf-muted-rose: #d4c3c6;    /* secondary text on burgundy/wine (7.3:1 / 9.0:1) */
	--tsf-sage: #969d8b;          /* decorative only */
	--tsf-white: #fff;
	--tsf-line: rgba(36, 35, 40, 0.14);
	--tsf-line-dark: rgba(217, 193, 154, 0.28);
	--tsf-serif: var(--wp--preset--font-family--serif, "Cormorant Garamond", "TSF Serif Fallback", Georgia, serif);
	--tsf-sans: var(--wp--preset--font-family--sans, Inter, "TSF Sans Fallback", system-ui, sans-serif);
	--tsf-radius: 2px;
	--tsf-focus: 0 0 0 3px var(--tsf-parchment), 0 0 0 5px var(--tsf-burgundy);
}

/* Metric-matched fallbacks: while the web fonts load, local fonts are scaled to the
   same width so the swap does not move the layout (prevents CLS). */
@font-face { font-family: "TSF Serif Fallback"; font-weight: 300 500; font-style: normal; src: local("Times New Roman"), local("TimesNewRomanPSMT"), local("Liberation Serif"), local("Tinos"); size-adjust: 94.3%; ascent-override: 100%; descent-override: 31%; line-gap-override: 0%; }
@font-face { font-family: "TSF Serif Fallback"; font-weight: 600 800; font-style: normal; src: local("Times New Roman Bold"), local("TimesNewRomanPS-BoldMT"), local("Liberation Serif Bold"), local("Tinos Bold"); size-adjust: 90.7%; ascent-override: 100%; descent-override: 31%; line-gap-override: 0%; }
@font-face { font-family: "TSF Serif Fallback"; font-weight: 300 800; font-style: italic; src: local("Times New Roman Italic"), local("TimesNewRomanPS-ItalicMT"), local("Liberation Serif Italic"), local("Tinos Italic"); size-adjust: 88%; ascent-override: 100%; descent-override: 31%; line-gap-override: 0%; }
@font-face { font-family: "TSF Sans Fallback"; font-weight: 300 500; font-style: normal; src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Arimo"); size-adjust: 105%; ascent-override: 92%; descent-override: 23%; line-gap-override: 0%; }
@font-face { font-family: "TSF Sans Fallback"; font-weight: 600 800; font-style: normal; src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Arimo Bold"); size-adjust: 100.5%; ascent-override: 92%; descent-override: 23%; line-gap-override: 0%; }

/* Lead paragraph */
.is-style-tsf-lead {
	font-family: var(--tsf-serif);
	font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.7rem);
	line-height: 1.45;
	color: var(--tsf-midnight);
}

/* Fact box */
.wp-block-group.is-style-tsf-fact-box {
	background: var(--tsf-ivory);
	border: 1px solid var(--tsf-line);
	border-top: 3px solid var(--tsf-gold);
	padding: clamp(1.25rem, 3vw, 2rem);
}
.is-style-tsf-fact-box > :first-child { margin-top: 0; }
.is-style-tsf-fact-box > :last-child { margin-bottom: 0; }

/* Editorial note */
.wp-block-group.is-style-tsf-note,
.tsf-review-notice {
	background: rgba(185, 152, 103, 0.12);
	border-left: 3px solid var(--tsf-gold-text);
	padding: 1rem 1.25rem;
	font-size: 0.95em;
}
.tsf-review-notice { border-left-color: var(--tsf-burgundy); background: rgba(86, 36, 52, 0.08); }

/* Dark panel */
.wp-block-group.is-style-tsf-dark {
	background: var(--tsf-burgundy-deep);
	color: var(--tsf-parchment);
	padding: clamp(1.5rem, 4vw, 3rem);
}
.is-style-tsf-dark :where(h1, h2, h3, h4, h5, h6) { color: var(--tsf-gold-light); }
.is-style-tsf-dark a { color: var(--tsf-gold-light); }

/* Numbered steps */
.wp-block-list.is-style-tsf-steps {
	list-style: none;
	counter-reset: tsf-step;
	padding-left: 0;
}
.wp-block-list.is-style-tsf-steps > li {
	counter-increment: tsf-step;
	position: relative;
	padding: 0 0 1.1rem 3.25rem;
	min-height: 2.25rem;
}
.wp-block-list.is-style-tsf-steps > li::before {
	content: counter(tsf-step);
	position: absolute;
	left: 0;
	top: -0.1rem;
	width: 2.25rem;
	height: 2.25rem;
	border: 1px solid var(--tsf-gold-text);
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-family: var(--tsf-serif);
	font-weight: 600;
	font-size: 1.15rem;
	color: var(--tsf-gold-text);
}
ul.wp-block-list.is-style-tsf-steps > li::before { content: ""; width: 0.75rem; height: 0.75rem; top: 0.55rem; left: 0.75rem; background: var(--tsf-gold); border: 0; }

/* Ornament separator */
.wp-block-separator.is-style-tsf-ornament {
	border: 0;
	height: 1.25rem;
	width: 7rem;
	max-width: 100%;
	margin-inline: auto;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='112' height='20' viewBox='0 0 112 20'%3E%3Cg fill='none' stroke='%2376582a' stroke-width='1'%3E%3Cpath d='M0 10h42M70 10h42'/%3E%3Cpath d='M56 3.5 62.5 10 56 16.5 49.5 10Z'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
	opacity: 1;
}
.is-style-tsf-dark .wp-block-separator.is-style-tsf-ornament { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='112' height='20' viewBox='0 0 112 20'%3E%3Cg fill='none' stroke='%23b99867' stroke-width='1'%3E%3Cpath d='M0 10h42M70 10h42'/%3E%3Cpath d='M56 3.5 62.5 10 56 16.5 49.5 10Z'/%3E%3C/g%3E%3C/svg%3E"); }

/* Outline button */
.wp-block-button.is-style-tsf-outline .wp-block-button__link {
	background: transparent;
	color: var(--tsf-burgundy);
	border: 1px solid currentColor;
}

/* Never show unfilled placeholders as blank bullets */
.entry-content li:empty { display: none; }
