/* ==========================================================================
   Finance Head - content blocks (loaded on posts/pages and in the editor)
   ========================================================================== */

.fh-box__title {
	font-family: var(--fh-font-head, inherit);
	font-weight: 800; font-size: 13px !important; letter-spacing: .12em; text-transform: uppercase;
	margin: 0 0 .6em !important; color: var(--fh-heading, #123B7A);
}

/* Fallback colours in var() below are only used if the palette tokens fail to load. */

/* Key takeaways: block style + shortcode */
.is-style-fh-takeaways, .fh-takeaways {
	background: var(--fh-accent-soft, #FCEDED);
	border: 1px solid color-mix(in srgb, var(--fh-accent, #B91C1C) 35%, transparent);
	border-top: 4px solid var(--fh-accent, #B91C1C);
	border-radius: var(--fh-radius, 10px);
	padding: 1.2em 1.4em;
	margin: 1.8em 0;
}
.is-style-fh-takeaways > :last-child, .fh-takeaways > :last-child { margin-bottom: 0; }
.fh-takeaways ul, .is-style-fh-takeaways ul { list-style: none; padding: 0; margin: 0; }
.fh-takeaways li, .is-style-fh-takeaways li { position: relative; padding-left: 1.6em; margin-bottom: .5em; }
.fh-takeaways li::before, .is-style-fh-takeaways li::before {
	content: ""; position: absolute; left: 0; top: .55em; width: .62em; height: .62em; border-radius: 2px;
	background: var(--fh-accent, #B91C1C); transform: rotate(45deg);
}

/* Callouts */
.fh-box, .is-style-fh-tip, .is-style-fh-info, .is-style-fh-warning, .is-style-fh-highlight {
	--box: var(--fh-info, #1D4ED8); --box-soft: var(--fh-info-soft, #EAF0FD);
	background: var(--box-soft); border-left: 4px solid var(--box);
	border-radius: 0 var(--fh-radius-sm, 6px) var(--fh-radius-sm, 6px) 0;
	padding: 1em 1.2em; margin: 1.6em 0;
}
.fh-box { display: flex; gap: 12px; align-items: flex-start; }
.fh-box__icon { flex: none; color: var(--box); margin-top: 2px; }
.fh-box__content { min-width: 0; }
.fh-box__content > :last-child, .is-style-fh-tip > :last-child, .is-style-fh-info > :last-child,
.is-style-fh-warning > :last-child, .is-style-fh-highlight > :last-child { margin-bottom: 0; }
.fh-box .fh-box__title { color: var(--box); }
.fh-box--tip, .is-style-fh-tip { --box: var(--fh-good, #0F7B4F); --box-soft: var(--fh-good-soft, #E8F5EE); }
.fh-box--success { --box: var(--fh-good, #0F7B4F); --box-soft: var(--fh-good-soft, #E8F5EE); }
.fh-box--warning, .is-style-fh-warning { --box: var(--fh-warn, #9A5B06); --box-soft: var(--fh-warn-soft, #FDF4E3); }
.is-style-fh-highlight { --box: var(--fh-accent, #B91C1C); --box-soft: var(--fh-surface, #F7F8FB); border-left-width: 0; border-top: 3px solid var(--box); border-radius: var(--fh-radius, 10px); box-shadow: var(--fh-shadow); }

/* Lists: checklist / pros / cons */
.is-style-fh-check, .is-style-fh-pros, .is-style-fh-cons { list-style: none; padding-left: 0 !important; }
.is-style-fh-check li, .is-style-fh-pros li, .is-style-fh-cons li { position: relative; padding-left: 1.9em; }
.is-style-fh-check li::before, .is-style-fh-pros li::before, .is-style-fh-cons li::before,
.fh-pc li::before {
	position: absolute; left: 0; top: .18em; width: 1.3em; height: 1.3em; border-radius: 50%;
	display: grid; place-items: center; font-size: .8em; font-weight: 800; line-height: 1;
}
.is-style-fh-check li::before, .is-style-fh-pros li::before, .fh-pc__col--pros li::before { content: "\2713"; color: var(--fh-good, #0F7B4F); background: var(--fh-good-soft, #E8F5EE); }
.is-style-fh-cons li::before, .fh-pc__col--cons li::before { content: "\2715"; color: var(--fh-bad, #B42318); background: var(--fh-bad-soft, #FDECEA); }

/* Pros & cons shortcode */
.fh-pc { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; margin: 1.8em 0; }
.fh-pc__col { border: 1px solid var(--fh-border, #DEE2EA); border-radius: var(--fh-radius, 10px); padding: 1em 1.2em; background: var(--fh-bg, #fff); min-width: 0; }
.fh-pc__col--pros { border-top: 4px solid var(--fh-good, #0F7B4F); }
.fh-pc__col--cons { border-top: 4px solid var(--fh-bad, #B42318); }
.fh-pc__title { font-weight: 800; font-size: 13px !important; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 .6em !important; }
.fh-pc__col--pros .fh-pc__title { color: var(--fh-good, #0F7B4F); }
.fh-pc__col--cons .fh-pc__title { color: var(--fh-bad, #B42318); }
.fh-pc ul { list-style: none; margin: 0 !important; padding: 0; }
.fh-pc li { position: relative; padding-left: 1.9em; margin-bottom: .5em; font-size: .97em; }
.fh-pc li:last-child { margin-bottom: 0; }

/* Key facts */
.fh-facts { border: 1px solid var(--fh-border, #DEE2EA); border-radius: var(--fh-radius, 10px); margin: 1.8em 0; overflow: hidden; background: var(--fh-bg, #fff); }
.fh-facts .fh-box__title { background: var(--fh-band-bg, #123B7A); color: var(--fh-band-text, #fff); padding: .8em 1.2em; margin: 0 !important; }
.fh-facts dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.fh-facts__row { padding: .85em 1.2em; border-top: 1px solid var(--fh-border, #DEE2EA); border-right: 1px solid var(--fh-border, #DEE2EA); margin-right: -1px; }
.fh-facts dt { font-size: 12.5px; color: var(--fh-muted, #586174); font-weight: 600; letter-spacing: .02em; }
.fh-facts dd { margin: 2px 0 0; font-weight: 800; color: var(--fh-heading, #123B7A); font-size: 1.05rem; font-variant-numeric: tabular-nums; }

/* Rating */
.fh-rating { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid var(--fh-border, #DEE2EA); border-radius: 999px; background: var(--fh-surface, #F7F8FB); margin: .4em 0 1.2em; font-size: 14px; }
.fh-rating__label { font-weight: 600; color: var(--fh-muted, #586174); }
.fh-rating__stars { --fh-rating: 80%; position: relative; font-size: 18px; letter-spacing: 2px; line-height: 1; }
.fh-rating__stars::before { content: "\2605\2605\2605\2605\2605"; color: var(--fh-border, #DEE2EA); }
.fh-rating__stars::after { content: "\2605\2605\2605\2605\2605"; color: var(--fh-accent, #B91C1C); position: absolute; left: 0; top: 0; width: var(--fh-rating); overflow: hidden; white-space: nowrap; }
.fh-rating__value { font-weight: 800; color: var(--fh-heading, #123B7A); font-variant-numeric: tabular-nums; }

/* CTA button */
.fh-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin: 1.4em 0; }
.fh-cta .fh-btn, .entry-content a.fh-btn {
	display: inline-flex; align-items: center; gap: 8px; padding: .85em 1.6em; border-radius: 999px;
	background: var(--fh-crimson, #B91C1C); color: #fff !important; font-weight: 700; text-decoration: none !important;
	box-shadow: 0 10px 20px -10px rgba(185, 28, 28, .7);
}
.fh-cta .fh-btn::after { content: "\2197"; font-weight: 400; }
.fh-cta__note { font-size: 13px; color: var(--fh-muted, #586174); }

/* Comparison table */
.is-style-fh-compare { overflow-x: auto; border-radius: var(--fh-radius, 10px); border: 1px solid var(--fh-border, #DEE2EA); }
.is-style-fh-compare table { border: 0 !important; margin: 0; min-width: 560px; font-variant-numeric: tabular-nums; }
.is-style-fh-compare thead th, .is-style-fh-compare tr:first-child th { background: var(--fh-band-bg, #123B7A) !important; color: var(--fh-band-text, #fff) !important; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.is-style-fh-compare td, .is-style-fh-compare th { border-width: 0 0 1px !important; border-color: var(--fh-border, #DEE2EA) !important; }
.is-style-fh-compare tbody td:first-child { font-weight: 700; color: var(--fh-heading, #123B7A); }
.is-style-fh-compare tbody tr:hover td { background: var(--fh-accent-soft, #FCEDED) !important; }

/* FAQ (core Details block) */
.entry-content .wp-block-details {
	border: 1px solid var(--fh-border, #DEE2EA); border-radius: var(--fh-radius-md, 10px);
	background: var(--fh-bg, #fff); margin: 0 0 10px; padding: 0; overflow: hidden;
}
.entry-content .wp-block-details summary {
	cursor: pointer; list-style: none; position: relative; padding: 16px 52px 16px 20px;
	font: 700 1.02rem/1.45 var(--fh-font-head, inherit); color: var(--fh-heading, #123B7A);
}
.entry-content .wp-block-details summary::-webkit-details-marker { display: none; }
.entry-content .wp-block-details summary::after {
	content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
	width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
	background: var(--fh-accent-soft, #FCEDED); color: var(--fh-crimson, #B91C1C); font: 700 18px/1 var(--fh-font-body, sans-serif);
}
.entry-content .wp-block-details[open] summary::after { content: "\2212"; }
.entry-content .wp-block-details[open] summary { border-bottom: 1px solid var(--fh-border, #DEE2EA); }
.entry-content .wp-block-details > :not(summary) { padding: 0 20px; }
.entry-content .wp-block-details > :not(summary):first-of-type { padding-top: 14px; }
.entry-content .wp-block-details > :last-child { padding-bottom: 16px; margin-bottom: 0; }

/* GenerateBlocks Pro: accordion and tabs pick up the brand by default.
   :where() keeps specificity at zero, so any style you set in GenerateBlocks wins. */
:where(.gb-accordion__item) { border: 1px solid var(--fh-border, #DEE2EA); border-radius: var(--fh-radius-md, 10px); margin-bottom: 10px; overflow: hidden; background: var(--fh-bg, #fff); }
:where(.gb-accordion__toggle) { width: 100%; padding: 16px 20px; background: transparent; color: var(--fh-heading, #123B7A); font-family: var(--fh-font-head, inherit); font-weight: 700; text-align: left; }
:where(.gb-accordion__item-open .gb-accordion__toggle, .gb-accordion__toggle.gb-block-is-current) { color: var(--fh-crimson, #B91C1C); }
:where(.gb-accordion__content) { padding: 0 20px 16px; }
:where(.gb-tabs__menu) { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--fh-border, #DEE2EA); margin-bottom: 18px; }
:where(.gb-tabs__menu-item) { padding: 10px 18px; border-radius: 999px 999px 0 0; color: var(--fh-muted, #586174); font-weight: 600; cursor: pointer; border-bottom: 3px solid transparent; }
:where(.gb-tabs__menu-item.gb-block-is-current) { color: var(--fh-heading, #123B7A); border-bottom-color: var(--fh-crimson, #B91C1C); }

/* Expert quote */
.is-style-fh-expert {
	border: 0 !important; background: var(--fh-surface, #F7F8FB) !important; border-radius: var(--fh-radius, 10px) !important;
	padding: 1.6em 1.6em 1.4em 3.4em !important; position: relative; font-family: var(--fh-font-head, inherit);
	font-size: 1.15rem; line-height: 1.55; color: var(--fh-heading, #123B7A);
}
.is-style-fh-expert::before { content: "\201C"; position: absolute; left: .45em; top: .1em; font-size: 4rem; line-height: 1; color: var(--fh-accent, #B91C1C); font-family: Georgia, serif; }
.is-style-fh-expert cite { display: block; margin-top: .8em; font-size: 14px; font-style: normal; font-weight: 700; color: var(--fh-muted, #586174); font-family: var(--fh-font-body, inherit); }
