/**
 * Shared page-surface layers for eligible public editorial pages.
 *
 * This file owns page shells only: the outer frame, cold canvas and Library
 * illumination. It deliberately does not select cards, grids, sections,
 * content elements, the free Preview, or specialised components. It is the
 * final page-canvas owner for every request that passes the public fail-closed
 * guard; specialised styles continue to own only their components.
 */

body.ri-public-editorial-typography-active {
	--ri-public-surface-frame: #f5f6f7;
	--ri-public-surface-sheet: #fbfcfe;
	--ri-public-surface-canvas: #edf5fc;
	--ri-public-surface-panel: #f7fafe;
	--ri-public-surface-panel-deep: #e8f1fa;
	--ri-public-surface-rule: rgba(201, 206, 211, .72);
	--ri-public-surface-glow: rgba(135, 145, 154, .09);
	color-scheme: only light;
	background-color: var(--ri-public-surface-frame) !important;
}

html:has(> body.ri-public-editorial-typography-active) {
	background-color: #f5f6f7 !important;
}

body.ri-public-editorial-typography-active > #page.site {
	background-color: var(--ri-public-surface-frame) !important;
}

body.ri-public-editorial-typography-active > #page.site > #content.site-content {
	background-color: var(--ri-public-surface-canvas) !important;
	background-image:
		radial-gradient(ellipse 58% 68% at 92% 8%, rgba(127, 145, 170, .13), transparent 72%),
		linear-gradient(
			145deg,
			var(--ri-public-surface-panel) 0%,
			var(--ri-public-surface-canvas) 62%,
			var(--ri-public-surface-panel-deep) 100%
		) !important;
	box-shadow:
		inset 1px 0 0 var(--ri-public-surface-rule),
		inset -1px 0 0 var(--ri-public-surface-rule),
		0 18px 56px var(--ri-public-surface-glow) !important;
}

/*
 * GeneratePress article wrappers are page sheets, not content components.
 * Making only these wrappers transparent reveals the shared canvas without
 * changing any descendant surface.
 */
body.ri-public-editorial-typography-active article > .inside-article,
body.ri-public-editorial-typography-active article > .inside-article > .entry-content {
	background-color: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
}

/*
 * The shared author/further-reading foundation has an older, more-specific
 * page-sheet rule. Override only that full entry-content sheet so the exact
 * Library canvas remains visible. The author box, further-reading cards and
 * every descendant component retain their own surfaces.
 */
html body.ri-public-editorial-typography-active.ri-surface-foundation-active.ri-editorial-links-active
	article > .inside-article > .entry-content:has(> .ri-cpsc-author-box + .ri-further-reading) {
	background-color: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
}

/*
 * These are verified full-page canvases. No descendant card, grid, content
 * element or special component is selected.
 */
body.ri-public-editorial-typography-active .entry-content > :is(
	.ri-about-page,
	.ri-author-page,
	.ri-contact-page,
	.ri-policy-page,
	.pd-longread,
	.ri-mct-article,
	.ri-cpc-article,
	.ri-atv-article
) {
	background-color: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
}

/*
 * CPSC structured pages reuse the generic Austin/Texas section vocabulary.
 * Their historical outer and inner section sheets are full-width structural
 * shells, not cards. Reveal the shared Library canvas on those shells only.
 *
 * The exact contour excludes city modules and intelligence hubs, whose
 * specialised stylesheet already owns the same class names. Descendant
 * notes, cards, grids, panels, links and the author component are not selected.
 */
html body.ri-public-editorial-typography-active.ri-public-editorial-typography-active--structured:not(.ri-city-module-editorial-active):not(.ri-intelligence-hub-editorial-active)
	.entry-content:has(> .ri-austin-hero):has(> .ri-texas-directory)
	> :is(.ri-austin-hero, .ri-texas-directory, .ri-austin-final-cta),
html body.ri-public-editorial-typography-active.ri-public-editorial-typography-active--structured:not(.ri-city-module-editorial-active):not(.ri-intelligence-hub-editorial-active)
	.entry-content:has(> .ri-austin-hero):has(> .ri-texas-directory)
	> .ri-austin-hero > .ri-austin-hero__inner,
html body.ri-public-editorial-typography-active.ri-public-editorial-typography-active--structured:not(.ri-city-module-editorial-active):not(.ri-intelligence-hub-editorial-active)
	.entry-content:has(> .ri-austin-hero):has(> .ri-texas-directory)
	> .ri-texas-directory > .ri-texas-directory__inner,
html body.ri-public-editorial-typography-active.ri-public-editorial-typography-active--structured:not(.ri-city-module-editorial-active):not(.ri-intelligence-hub-editorial-active)
	.entry-content:has(> .ri-austin-hero):has(> .ri-texas-directory)
	> .ri-austin-final-cta > .ri-austin-final-cta__inner {
	background-color: transparent !important;
	background-image: none !important;
	border-top-color: transparent !important;
	border-bottom-color: transparent !important;
	box-shadow: none !important;
}

/*
 * Breadcrumb surfaces are intentionally absent from this page-canvas file.
 * public-breadcrumb-surface.css is their single final owner on eligible
 * public pages, so no later white band can override the transparent rule.
 */

/*
 * Guides index, state intelligence hubs, city modules and city research guides
 * use one continuous flat Library canvas. Keep the viewport, site sheet and
 * content sheet aligned even though this general stylesheet loads last.
 * No component, card, section, grid or content descendant is selected here.
 */
html:has(
	> body.ri-public-editorial-typography-active:is(
			.ri-guides-index-editorial-active,
			.ri-intelligence-hub-editorial-active,
			.ri-city-module-editorial-active,
			.ri-city-research-editorial-active
		)
),
html body.ri-public-editorial-typography-active:is(
	.ri-guides-index-editorial-active,
	.ri-intelligence-hub-editorial-active,
	.ri-city-module-editorial-active,
	.ri-city-research-editorial-active
),
html body.ri-public-editorial-typography-active:is(
	.ri-guides-index-editorial-active,
	.ri-intelligence-hub-editorial-active,
	.ri-city-module-editorial-active,
	.ri-city-research-editorial-active
) > #page.site,
html body.ri-public-editorial-typography-active:is(
	.ri-guides-index-editorial-active,
	.ri-intelligence-hub-editorial-active,
	.ri-city-module-editorial-active,
	.ri-city-research-editorial-active
)
	> #page.site
	> #content.site-content {
	background-color: #edf5fc !important;
	background-image: none !important;
	box-shadow: none !important;
}

/*
 * The Guides index must begin its breadcrumb band directly below the site
 * menu, exactly like the Knowledge Library and state intelligence hubs.
 * Keep the existing horizontal and bottom gutters; remove only the theme's
 * 40px pre-breadcrumb padding.
 */
html body.ri-public-editorial-typography-active.ri-guides-index-editorial-active
	> #page.site
	> #content.site-content {
	padding-top: 0 !important;
}
