/*
 * A resource (hub/resource.php). Grace: resource-template.png. Hero, card,
 * "helpful" row and More resources reuse the recipe page's styles
 * (hub-recipe.css, hub-recipes.css); this adds the resource's own content
 * inside the card and the Yes / No answer.
 */

body.vh-page--resource { background: #f2f4f7; }

/* The resource's own blocks, in the white card. */
.vh-resource__card { padding: 34px 40px 48px; min-height: 420px; }
.vh-resource__content { font-size: 17px; line-height: 1.6; color: #0a213f; }
.vh-resource__content > * + * { margin-top: 1.1em; }
.vh-resource__content :is(.alignfull, .alignwide, .vis-section) { width: auto !important; max-width: none !important; margin-inline: 0 !important; padding-inline: 0 !important; }
.vh-resource__content .vis-section { padding-block: 0 !important; background: none !important; }
.vh-resource__content .vis-section + .vis-section { margin-top: 2rem; }
body.vh-page--resource .vh-resource .vh-resource__card .vh-resource__content :is(h2, h3, h4) { /* outranks the site’s band-opener heading rule */
	font-family: var(--vh-body) !important; font-style: normal !important; font-weight: 700 !important; text-transform: none !important; letter-spacing: -.01em !important;
	line-height: 1.25 !important; color: #0a213f !important; margin-top: 1.6em !important; margin-bottom: 0 !important;
}
body.vh-page--resource .vh-resource .vh-resource__card .vh-resource__content h2 { font-size: 24px !important; }
body.vh-page--resource .vh-resource .vh-resource__card .vh-resource__content h3 { font-size: 19px !important; }
body.vh-page--resource .vh-resource .vh-resource__card .vh-resource__content h4 { font-size: 17px !important; }
.vh-resource__content > :first-child, .vh-resource__content > .vis-section:first-child > * > :first-child { margin-top: 0 !important; }
/* The intro (Grace: plain text across the card), whichever template wrote it: the site's big, narrow lead style is for marketing pages. */
.vh-resource__card .vh-resource__content p.is-style-lead { font: 400 17px/1.6 var(--vh-body) !important; letter-spacing: 0 !important; max-width: none !important; color: #0a213f !important; }
.vh-resource__content a:not(.wp-block-button__link) { color: var(--wp--preset--color--blue-700); text-decoration: underline; text-underline-offset: 3px; }
.vh-resource__content img { max-width: 100%; height: auto; border-radius: 4px; }
.vh-resource__content :is(ul, ol) { padding-left: 1.3em; }
/* The hub resets lists to bare (hub.css); in a resource's own content they are real lists, as in the editor. */
.vh-resource__content ul { list-style: disc; }
.vh-resource__content ol { list-style: decimal; }
.vh-resource__content :is(ul, ol) ul { list-style: circle; }
.vh-resource__content li + li { margin-top: .35em; }
.vh-resource__content li::marker { color: #0a213f; }

/* Buttons: the card is white, so they take the light-band look the editor shows (navy, white text, gold arrow tab).
   Without this the page's dark default made them white on white, and the hub's `.vh a { color: inherit }` turned the text navy on navy. */
.vh-resource__card { --vis-btn-bg: var(--wp--preset--color--navy-900); --vis-btn-fg: var(--wp--preset--color--white); }
.vh .vh-resource__content .wp-block-button:not(.is-style-outline) > .wp-block-button__link { background-color: var(--wp--preset--color--navy-900); color: var(--wp--preset--color--white); text-decoration: none; }
.vh .vh-resource__content .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover { background-color: var(--wp--preset--color--blue-700); color: var(--wp--preset--color--white); }
.vh .vh-resource__content .wp-block-button.is-style-outline > .wp-block-button__link { color: #0a213f; text-decoration: none; }
.vh-resource__content :is(iframe, video) { max-width: 100%; }

/* Was this resource helpful? */
.vh-helpful__choices { display: flex; gap: 8px; margin-top: 16px; }
.vh-helpful__choices button {
	min-width: 76px; min-height: 40px; padding: 0 22px; border: 1px solid #0a213f; border-radius: 999px; background: transparent;
	color: #0a213f; font: 600 15px/1 var(--vh-body); cursor: pointer; transition: background .2s, color .2s;
}
.vh-helpful__choices button:hover { background: rgb(10 33 63 / 6%); }
.vh-helpful__choices button[aria-pressed="true"] { background: #0a213f; color: #fff; }
.vh-helpful__choices button:focus-visible { outline: 3px solid var(--vh-gold); outline-offset: 3px; }

@media (max-width: 640px) {
	.vh-resource__card { padding: 22px 20px 30px; min-height: 0; }
	.vh-resource__content { font-size: 16px; }
}
@media print {
	body.vh-page--resource :is(.vis-header, .vis-newsletter, .vis-footer, #wpadminbar, .vh-recipe-hero__actions, .vh-recipe-hero__crumb, .vh-helpful, .vh-recipe__more, .vis-save-toast) { display: none !important; }
	body.vh-page--resource { background: #fff; }
	.vh-resource-hero { min-height: 0; padding: 0 0 8mm; background: none !important; color: #000; text-align: left; }
	.vh-resource-hero::before, .vh-resource-hero::after { display: none; }
	.vh-resource-hero .vh-recipe-hero__title { color: #000; font-size: 28pt; }
	.vh-resource__card { border: 0; box-shadow: none; padding: 0; }
}

/* Resources made with the old templates sit in narrow, centred columns ("article" rows): in the card, text uses the card's width. */
.vh-resource__content .is-layout-constrained > :where(:not(.alignleft):not(.alignright)) { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
.vh-resource__card .vh-resource__content :is(.vis-article, .vis-article__row) { max-width: none !important; margin-inline: 0 !important; padding-top: 0 !important; }
.vh-resource__card .vh-resource__content .vis-article__row { margin-bottom: 0 !important; }
.vh-resource__card .vh-resource__content .vis-article__row + .vis-article__row { margin-top: 2rem !important; }
.vh-resource__card .vh-resource__content .vis-article__row.is-two { align-items: flex-start !important; }
.vh-resource__card .vh-resource__content .vis-card-lite { border-radius: 8px; }
.vh-resource__card .vh-resource__content :is(.vis-article__row, .vis-card-lite) :is(h2, h3, h4):first-child { margin-top: 0 !important; }
