/*
 * Transition Light: white canvas variant of the Transition Program Template.
 * Loads after program-transition-2026.css and flips the text colors for a light background.
 * The hero is a navy band in the Our Work style (see the Hero block below).
 */

body.ssrc-transition-light .site { background: var(--ssrc-white); }

/* Text: white -> navy/ink */
body.ssrc-transition-light { color: #161F21; }
body.ssrc-transition-light h1, body.ssrc-transition-light h2, body.ssrc-transition-light h3,
body.ssrc-transition-light h4, body.ssrc-transition-light h5 { color: var(--ssrc-navy); }
body.ssrc-transition-light .entry-content,
body.ssrc-transition-light .entry-content p,
body.ssrc-transition-light .entry-content li,
body.ssrc-transition-light .card,
body.ssrc-transition-light .card p,
body.ssrc-transition-light .sidebar-main,
body.ssrc-transition-light .sidebar-main .widget { color: #161F21; }
body.ssrc-transition-light .card .entry-summary,
body.ssrc-transition-light .ssrc-section p { color: #3d4a52; }

/* Hero (Our Work style): navy band under the transparent header. The left half is solid navy
 * behind the label, title and tagline; it fades left to right into the feature image on the
 * right half. The program menu sits inside the band along the bottom. No fade into the page. */
body.ssrc-transition-light .title-banner { position: relative !important; min-height: 0; height: auto; overflow: hidden; background: var(--ssrc-navy) !important; padding: 10.75rem 0 calc(3.75rem + 3.6875rem); }
body.ssrc-transition-light .title-banner,
body.ssrc-transition-light .title-banner .title-banner-info,
/* Centered logo header layout (program logo instead of a text title): same band, no extra top gap. */
body.ssrc-transition-light .title-banner .title-banner-info.static { position: static; margin: 0 !important; max-width: none; }
body.ssrc-transition-light .title-banner .program-dark-header > div { padding-top: 0; padding-bottom: 0; }
body.ssrc-transition-light .title-banner .banner-logo img { max-width: min(100%, 34rem); height: auto; padding: 0; }
body.ssrc-transition-light .title-banner .program-dark-header .content,
body.ssrc-transition-light .title-banner .program-dark-header .content p { font-family: var(--ssrc-font-body); font-size: 1.0625rem; font-weight: 300; line-height: 1.65; color: var(--ssrc-hemisphere); }
body.ssrc-transition-light .title-banner .banner-title { color: var(--ssrc-white); }
/* Feature image: right 62% of the band, without the legacy black gradient layer. */
body.ssrc-transition-light .title-banner .title-banner-bg { position: absolute; inset: 0 0 1px auto; width: 62%; height: auto; background-size: 0 0, cover !important; background-position: center !important; background-repeat: no-repeat !important; }
body.ssrc-transition-light .title-banner .title-banner-bg::after { content: ""; position: absolute; inset: 0 0 0 -2px; background: linear-gradient(90deg, var(--ssrc-navy) 0%, var(--ssrc-navy) 6%, rgba(4, 47, 71, 0.8) 28%, rgba(4, 47, 71, 0.35) 62%, rgba(4, 47, 71, 0.18) 100%); pointer-events: none; }
body.ssrc-transition-light .title-banner .video-bg { position: absolute; inset: 0 0 0 auto; width: 62%; height: 100%; object-fit: cover; }
body.ssrc-transition-light .title-banner .video-overlay { inset: 0 0 0 auto; width: 62%; height: 100%; background: linear-gradient(90deg, var(--ssrc-navy) 0%, var(--ssrc-navy) 6%, rgba(4, 47, 71, 0.8) 28%, rgba(4, 47, 71, 0.35) 62%, rgba(4, 47, 71, 0.18) 100%); }
body.ssrc-transition-light .title-banner > .ast-container { position: relative; z-index: 1; max-width: var(--ssrc-content-width); width: calc(100% - 2 * var(--ssrc-space-4)); margin-inline: auto; padding-inline: 0; }
body.ssrc-transition-light .title-banner .title-banner-info:not(.static) { position: static !important; margin: 0 !important; max-width: 38rem; }
/* Centered logo header layout (program logo instead of a text title): same band, no extra top gap. */
body.ssrc-transition-light .title-banner .title-banner-info.static { position: static; margin: 0 !important; max-width: none; }
body.ssrc-transition-light .title-banner .program-dark-header > div { padding-top: 0; padding-bottom: 0; }
body.ssrc-transition-light .title-banner .banner-logo img { max-width: min(100%, 34rem); height: auto; padding: 0; }
body.ssrc-transition-light .title-banner .program-dark-header .content,
body.ssrc-transition-light .title-banner .program-dark-header .content p { font-family: var(--ssrc-font-body); font-size: 1.0625rem; font-weight: 300; line-height: 1.65; color: var(--ssrc-hemisphere); }
body.ssrc-transition-light .title-banner .banner-title { font-size: clamp(2.5rem, 1.9rem + 2vw, 3.75rem) !important; font-weight: 400; line-height: 1.08; letter-spacing: -0.015em; margin: 0.875rem 0 0; text-wrap: balance; }
body.ssrc-transition-light .title-banner .title-banner-info .banner-description { font-family: var(--ssrc-font-body) !important; font-size: 1.0625rem; font-weight: 300; line-height: 1.65; color: var(--ssrc-hemisphere); margin: 1.5rem 0 0; padding: 0; max-width: 36rem; }

/* Program menu: Our Work sub menu styling, pulled up into the bottom of the navy band. */
@media (min-width: 768px) {
	body.ssrc-transition-light.ssrc-dark .anchor-navigation { position: relative; z-index: 2; margin-top: -3.6875rem; background: transparent; color: var(--ssrc-white); font-family: var(--ssrc-font-body); font-size: 0.9375rem; font-weight: 500; letter-spacing: 0; text-transform: none; }
	body.ssrc-transition-light.ssrc-dark .anchor-navigation > .ast-container { max-width: var(--ssrc-content-width); width: calc(100% - 2 * var(--ssrc-space-4)); margin-inline: auto; padding-inline: 0; border-top: 1px solid rgba(255, 255, 255, 0.25); }
	body.ssrc-transition-light.ssrc-dark .anchor-navigation > .ast-container > div > ul,
	body.ssrc-transition-light.ssrc-dark .anchor-navigation > .ast-container > ul { display: flex; flex-wrap: nowrap; gap: 2rem; margin: 0; padding: 0; overflow: visible; }
	body.ssrc-transition-light.ssrc-dark .anchor-navigation > .ast-container > div > ul > li,
	body.ssrc-transition-light.ssrc-dark .anchor-navigation > .ast-container > ul > li { flex: none; margin: 0; padding: 0; }
	body.ssrc-transition-light.ssrc-dark .anchor-navigation ul li a { display: block; padding: 1.25rem 0 1.0625rem; line-height: 1.2; white-space: nowrap; color: var(--ssrc-white); border-bottom: 3px solid transparent; transition: border-color 0.2s ease; }
	/* Orange underline on hover and on the current page. */
	body.ssrc-transition-light.ssrc-dark .anchor-navigation ul > li > a:hover,
	body.ssrc-transition-light.ssrc-dark .anchor-navigation ul.anchor-nav li:hover > a,
	body.ssrc-transition-light.ssrc-dark .anchor-navigation ul li.current-menu-parent > a,
	body.ssrc-transition-light.ssrc-dark .anchor-navigation ul li.current-menu-ancestor > a,
	body.ssrc-transition-light.ssrc-dark .anchor-navigation ul li.current-menu-item > a { color: var(--ssrc-white); border-bottom-color: var(--ssrc-accent); }

	/* Dropdowns: the white panel from the primary menu (design 19a). Opens on hover and keyboard focus. */
	body.ssrc-transition-light.ssrc-dark .anchor-navigation ul li.menu-item-has-children { position: relative; }
	body.ssrc-transition-light.ssrc-dark .anchor-navigation ul .sub-menu { display: block; position: absolute; top: 100%; left: -24px; z-index: 60; width: 300px; margin: 0; padding: 12px 0; list-style: none; background: var(--ssrc-white); border: 0; border-radius: 4px; box-shadow: 0 18px 40px rgba(4, 47, 71, 0.28); text-align: left; opacity: 0; visibility: hidden; transition: opacity 150ms ease, visibility 0s linear 150ms; }
	body.ssrc-transition-light.ssrc-dark .anchor-navigation ul li:hover > .sub-menu,
	body.ssrc-transition-light.ssrc-dark .anchor-navigation ul li:focus-within > .sub-menu { opacity: 1; visibility: visible; transition-delay: 0s; }
	body.ssrc-transition-light.ssrc-dark .anchor-navigation ul > li:nth-last-child(-n+2) > .sub-menu { left: auto; right: -24px; }
	body.ssrc-transition-light.ssrc-dark .anchor-navigation ul .sub-menu li { display: block; margin: 0; padding: 0; }
	body.ssrc-transition-light.ssrc-dark .anchor-navigation ul .sub-menu li a,
	body.ssrc-transition-light.ssrc-dark .anchor-navigation ul.anchor-nav li:hover .sub-menu li a { display: block; padding: 11px 24px; font-size: 0.9375rem; font-weight: 500; line-height: 1.3; letter-spacing: 0; white-space: normal; color: var(--ssrc-navy); border: 0; box-shadow: none; opacity: 1; }
	body.ssrc-transition-light.ssrc-dark .anchor-navigation ul .sub-menu li a:hover,
	body.ssrc-transition-light.ssrc-dark .anchor-navigation ul .sub-menu li a:focus-visible { background: var(--ssrc-parchment); color: var(--ssrc-navy); box-shadow: inset 3px 0 0 var(--ssrc-accent); opacity: 1; }
	body.ssrc-transition-light.ssrc-dark .anchor-navigation ul .sub-menu li.current-menu-item > a { color: var(--ssrc-navy); box-shadow: inset 3px 0 0 var(--ssrc-accent); }
}

@media (max-width: 900px) {
	/* Narrow screens: the image runs full width under a heavier navy wash so the text stays readable. */
	body.ssrc-transition-light .title-banner { padding-top: 8.25rem; padding-bottom: calc(2.5rem + 3.6875rem); }
	body.ssrc-transition-light .title-banner .title-banner-bg,
	body.ssrc-transition-light .title-banner .video-bg,
	body.ssrc-transition-light .title-banner .video-overlay { width: 100%; }
	body.ssrc-transition-light .title-banner .title-banner-bg::after,
	body.ssrc-transition-light .title-banner .video-overlay { background: linear-gradient(90deg, rgba(4, 47, 71, 0.94) 0%, rgba(4, 47, 71, 0.72) 100%); }
}
@media (max-width: 767px) {
	/* Phones: the legacy "Page Navigation" toggle, as a navy strip directly under the band. */
	body.ssrc-transition-light .title-banner { padding-bottom: 2.5rem; }
	body.ssrc-transition-light.ssrc-dark .anchor-navigation { background: var(--ssrc-navy); border-top: 1px solid rgba(255, 255, 255, 0.25); font-family: var(--ssrc-font-body); font-size: 0.9375rem; font-weight: 500; letter-spacing: 0; text-transform: none; }
	body.ssrc-transition-light.ssrc-dark .anchor-navigation .anchor-mobile { color: var(--ssrc-white); text-transform: none; }
	body.ssrc-transition-light.ssrc-dark .anchor-navigation ul li a { color: var(--ssrc-white); }
}

/* Labels and eyebrows: red on light, as on the 2026 pages. */
body.ssrc-transition-light.ssrc-dark .icon-heading,
body.ssrc-transition-light .items-container .meta .primary-category { color: var(--ssrc-accent); }
body.ssrc-transition-light.ssrc-dark .icon-heading.large { color: var(--ssrc-accent) !important; }
/* Card labels ("Initiative", "Grant") were light blue on white: unreadable. */
body.ssrc-transition-light .entry-item.eyebrow-highlight .icon-heading { color: var(--ssrc-accent); }
/* Funder and partner logo cards: keep the logo's own proportions and a sensible size on phones. */
@media (max-width: 782px) {
	body.ssrc-transition-light .content-card.simple .card-img { height: auto; }
	body.ssrc-transition-light .content-card.simple .card-img img { width: auto; height: auto; max-width: min(100%, 15rem); max-height: 9rem; object-fit: contain; }
}

/* Links: navy, red on hover. */
body.ssrc-transition-light #primary a:not([class*="button"]) { color: var(--ssrc-navy); }
body.ssrc-transition-light #primary a:not([class*="button"]):hover { color: var(--ssrc-accent); }
body.ssrc-transition-light .sidebar-main a:not([class*="button"]) { color: var(--ssrc-navy); }
body.ssrc-transition-light .sidebar-main a:not([class*="button"]):hover { color: var(--ssrc-accent); }

/* Cards: bordered white panels. */
body.ssrc-transition-light .card {
	background: var(--ssrc-white);
	border: 1px solid rgba(4, 47, 71, 0.12);
	border-radius: 4px;
	padding: 1.25rem;
}

/* Grant / fellowship snapshot in the sidebar: body text color instead of the dark template's white. */
body.ssrc-transition-light .grant-snapshot,
body.ssrc-transition-light .grant-snapshot p,
body.ssrc-transition-light .grant-snapshot li,
body.ssrc-transition-light .grant-snapshot div:not(.icon-heading),
body.ssrc-transition-light .grant-snapshot span,
body.ssrc-transition-light .grant-snapshot strong,
body.ssrc-transition-light .grant-snapshot b { color: #161F21 !important; }

/* Buttons keep their own text colors (the navy link color above must not reach them):
 * filled accent button has white text, inverting on hover; the white button is outlined in navy. */
body.ssrc-transition-light a.button-blue,
body.ssrc-transition-light .button-blue a,
body.ssrc-transition-light #primary a.button-blue,
body.ssrc-transition-light .sidebar-main a.button-blue { color: var(--ssrc-white); }
body.ssrc-transition-light a.button-blue:hover,
body.ssrc-transition-light .button-blue:hover a,
body.ssrc-transition-light #primary a.button-blue:hover,
body.ssrc-transition-light .sidebar-main a.button-blue:hover { color: var(--ssrc-accent); }
body.ssrc-transition-light a.button-white,
body.ssrc-transition-light #primary a.button-white,
body.ssrc-transition-light .sidebar-main a.button-white { color: var(--ssrc-navy); }
/* Buttons: the white button needs a border on a light page. */
body.ssrc-transition-light a.button-white { border-color: var(--ssrc-navy); }

/* Sidebar partner logos were made for the dark pages (white/negative versions): give them a
 * navy chip so they stay visible on the white page. */
body.ssrc-transition-light .sidebar-main .widget > img {
	background: var(--ssrc-navy);
	padding: 1rem 1.25rem;
	border-radius: 4px;
}
/* Linked logos: the chip is on the link, at either nesting depth the widgets use, so a JPEG
 * logo with its own black background can blend into the navy. */
body.ssrc-transition-light .sidebar-main .widget > a:has(> img),
body.ssrc-transition-light .sidebar-main .widget > :is(div, p, figure) > a:has(> img) { display: inline-block; max-width: 100%; box-sizing: border-box; background: var(--ssrc-navy); padding: 1rem 1.25rem; border-radius: 4px; line-height: 0; }
body.ssrc-transition-light .sidebar-main .widget > a > img,
body.ssrc-transition-light .sidebar-main .widget > :is(div, p, figure) > a > img { display: block; background: none; padding: 0; border-radius: 0; }
body.ssrc-transition-light .sidebar-main .widget a > img:is([src$=".jpg"], [src$=".jpeg"]) { mix-blend-mode: screen; }

/* Content: the dark template set many pieces to white or light grey with its own faces. On the
 * light page they take the surrounding text color and the body face instead. */
body.ssrc-transition-light #content :is(p, li, div, span, strong, b, em, td, th, dt, dd, blockquote, figcaption, small, label):not([class*="button"]):not(.icon-heading):not(.primary-category):not([class*="fa-"]) { color: inherit; }
body.ssrc-transition-light #content :is(.description, .person-meta, .person-bio, .entry-summary, .meta) { color: #3d4a52; }
body.ssrc-transition-light #content .person-name { color: var(--ssrc-navy); font-weight: 500; }
body.ssrc-transition-light #content :is(.description, .item-more, .item-more span, .news-load-more, .person-name, .person-meta) { font-family: var(--ssrc-font-body); }
body.ssrc-transition-light #content :is(h2, h3, h4).alt-title a,
body.ssrc-transition-light #content .entry-item .title a { font-family: inherit; color: var(--ssrc-navy); text-decoration: none; }
body.ssrc-transition-light #content :is(h2, h3, h4).alt-title a:hover,
body.ssrc-transition-light #content .entry-item .title a:hover { color: var(--ssrc-accent); }

/* "Read more" / "Learn more" arrow links: navy circle with a white arrow, navy label. */
body.ssrc-transition-light #content a.item-more { color: var(--ssrc-navy); text-decoration: none; }
body.ssrc-transition-light #content a.item-more span { color: var(--ssrc-navy); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
body.ssrc-transition-light #content a.item-more svg { width: 2.25rem; height: 2.25rem; }
body.ssrc-transition-light #content a.item-more svg .bg { fill: var(--ssrc-navy); transition: fill 0.2s ease; }
body.ssrc-transition-light #content a.item-more svg .arrow { fill: var(--ssrc-white); }
body.ssrc-transition-light #content a.item-more:hover svg .bg { fill: var(--ssrc-accent); }
body.ssrc-transition-light #content a.item-more:hover span { color: var(--ssrc-accent); }

/* News list "Load more": outlined navy pill instead of the black block. */
body.ssrc-transition-light #content a.news-load-more,
body.ssrc-transition-light #content a.news-load-more:visited { background: transparent; color: var(--ssrc-navy); border: 1.5px solid var(--ssrc-navy); border-radius: 999px; font-size: 0.84375rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
body.ssrc-transition-light #content a.news-load-more:hover { background: var(--ssrc-navy); color: var(--ssrc-white); }

/* Spacing: one rhythm for every program page. Content and sidebar both start 3.5rem under the
 * hero, sections are 3.5rem apart, and the page ends 5rem above the footer. */
body.ssrc-transition-light #content { padding-top: 0; }
body.ssrc-transition-light #primary { margin-top: 3.5rem !important; margin-bottom: 5rem !important; }
body.ssrc-transition-light #secondary { margin-top: 3.5rem !important; margin-bottom: 5rem !important; }
body.ssrc-transition-light #primary > .site-main > article { margin-bottom: 0; }
body.ssrc-transition-light #primary > .ssrc-section { margin: 3.5rem 0 0; padding: 0; }
body.ssrc-transition-light #primary > .ssrc-section:first-child { margin-top: 0; }
/* A page whose own content is empty (staff and fellows listings) should not leave a blank block
 * above its people section. */
body.ssrc-transition-light #primary > .site-main:not(:has(.entry-content > :not(p:empty))) { display: none; }
body.ssrc-transition-light #primary > .site-main:not(:has(.entry-content > :not(p:empty))) + .ssrc-section { margin-top: 0; }

/* Text blocks: first element flush with the top, even heading spacing. */
body.ssrc-transition-light #primary .entry-content p:empty { display: none; }
body.ssrc-transition-light #primary .entry-content > :first-child { margin-top: 0; }
/* Last visible block (ignoring trailing empty paragraphs and inline style or script tags). */
body.ssrc-transition-light #primary .entry-content > :last-child,
body.ssrc-transition-light #primary .entry-content > :not(style, script):not(:has(~ :not(style, script, p:empty))) { margin-bottom: 0; }
body.ssrc-transition-light #primary .entry-content :is(h2, h3, h4) { margin-top: 2.5rem; margin-bottom: 0.875rem; }
body.ssrc-transition-light #primary .entry-content :is(h2, h3, h4):first-child { margin-top: 0; }
body.ssrc-transition-light #primary .ssrc-section > :is(h2, h3):first-child { margin-top: 0; }

/* Listings and people cards: flush with the left edge of the text column, no extra top padding. */
body.ssrc-transition-light #primary .entry-content > .ast-flex.ast-col-xs-12 { padding-left: 0; padding-right: 0; }
body.ssrc-transition-light #primary .entry-item:first-child { padding-top: 0; margin-top: 0; }
body.ssrc-transition-light #primary .person-card-expanded:last-child,
body.ssrc-transition-light #primary .person-card-expanded2:last-child { margin-bottom: 0; }
body.ssrc-transition-light #primary .news-load-more-container { margin: 2.5rem 0 0; padding: 0; }

/* Sidebar: even gaps between blocks. */
body.ssrc-transition-light #secondary .sidebar-main > .widget { margin: 0 0 2.25rem; padding: 0; }
body.ssrc-transition-light #secondary .sidebar-main > .widget:last-child { margin-bottom: 0; }
body.ssrc-transition-light #secondary .sidebar-main > .widget > :first-child { margin-top: 0; }

/* Body headings: one scale, whatever was typed into them. Bold and links inside a heading take
   the heading's own weight and colour; a linked heading is underlined only on hover. */
body.ssrc-transition-light #primary .entry-content :is(h2, h3, h4) { font-family: var(--ssrc-font-heading); font-weight: 400; letter-spacing: normal; text-transform: none; color: var(--ssrc-navy); }
body.ssrc-transition-light #primary .entry-content h2 { font-size: 2.25rem; line-height: 1.15; }
body.ssrc-transition-light #primary .entry-content h3 { font-size: 1.75rem; line-height: 1.2; }
body.ssrc-transition-light #primary .entry-content h4 { font-size: 1.375rem; line-height: 1.25; }
body.ssrc-transition-light #primary .entry-content :is(h5, h6) { font-family: var(--ssrc-font-body); font-size: 1.0625rem; font-weight: 600; line-height: 1.4; letter-spacing: normal; text-transform: none; color: var(--ssrc-navy); margin-top: 1.75rem; margin-bottom: 0.5rem; }
body.ssrc-transition-light #primary .entry-content :is(h2, h3, h4, h5, h6) :is(strong, b, a, span, em, u) { font-weight: inherit; font-size: inherit; font-family: inherit; color: inherit; }
body.ssrc-transition-light #primary .entry-content :is(h2, h3, h4, h5, h6) :is(a, u) { text-decoration: none; }
body.ssrc-transition-light #primary .entry-content :is(h2, h3, h4, h5, h6) a:hover, body.ssrc-transition-light #primary .entry-content :is(h2, h3, h4, h5, h6) a:focus-visible { color: var(--ssrc-accent); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }

/* Programs whose featured image is an old banner with text baked in: add the CSS class
   "ssrc-no-hero-image" on the program to show the plain navy hero without the image. */
body.ssrc-transition-light.ssrc-no-hero-image .title-banner .title-banner-bg { display: none; }

/* Sidebar logo chips: same width, logo centred. The old pages spaced logos with margins on the
   image itself, which would otherwise sit inside the chip and push the logo off centre. */
body.ssrc-transition-light .sidebar-main .widget > a:has(> img),
body.ssrc-transition-light .sidebar-main .widget > :is(div, p, figure) > a:has(> img) { display: block; width: min(100%, 21.25rem); margin: 0 0 1rem; }
body.ssrc-transition-light .sidebar-main .widget > a > img,
body.ssrc-transition-light .sidebar-main .widget > :is(div, p, figure) > a > img { margin: 0 auto !important; max-width: 100%; height: auto; }
