/* Census Design 1.1.2: type, spacing and component refinements on top of the Census theme.
   Principles borrowed from a mature SaaS layout (not its colors or look): a tighter weight ladder,
   leads that carry weight instead of fading to grey, a compact sticky header, cards with one clear
   action, soft depth only where something is clickable, and one consistent spacing rhythm. */

:root {
	--hdr: 4.25rem;
	--lift: 0 1px 2px rgba(23,35,33,.05), 0 14px 32px -18px rgba(23,35,33,.28);
	--ease: cubic-bezier(.2,.7,.2,1);
}

/* ---------- 1. Type ladder: weight steps 800 / 740 / 660, tracking scales with size ---------- */
h1, h2, h3, h4 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
.census-section h2, .census-band h2, .census-prose h2, .cl-main h2 { font-weight: 740; letter-spacing: -0.03em; line-height: 1.1; }
.census-hero h1 { letter-spacing: -0.042em; }
.census-page-hero h1 { letter-spacing: -0.035em; line-height: 1.06; }
.census-measure h3, .census-steps h3, .census-principle h3, .census-contact h3, .cl-main h3, .cl-card h3 { font-weight: 660; letter-spacing: -0.012em; }
.census-post-title { font-weight: 740; }
.census-steps li::before, .census-tally-row .n, .cl-stats strong { font-variant-numeric: tabular-nums; }

/* ---------- 2. Leads carry weight: ink, medium weight, comfortable measure ---------- */
.census-lead, .census-page-lead, .census-page-hero .wp-block-post-excerpt__excerpt { font-weight: 500; color: var(--ink-2); line-height: 1.5; letter-spacing: -0.005em; }
.census-section-intro { color: var(--ink-2); font-weight: 500; }
.census-band .census-section-intro { color: #D3DAD7; }
/* Links inside dark bands were the same color as the band */
.census-band a:not(.wp-block-button__link):not(.c2-btn) { color: var(--lime); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.census-band a:not(.wp-block-button__link):not(.c2-btn):hover { color: #fff; }
.census-steps p { color: #CBD3D0; }

/* ---------- 3. Compact sticky header, pill hover on nav ---------- */
.wp-site-blocks > header.wp-block-template-part { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 50; }
.census-header { padding-block: 0.7rem !important; }
/* Blur only where the nav is inline: backdrop-filter would trap the phone menu overlay inside the header */
@media (min-width: 600px) { .census-header { background: rgba(244,242,233,.88); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); } }
.census-header .census-logo img { height: 40px; }
.census-header .wp-block-navigation { font-size: 0.9688rem; }
.census-header .wp-block-navigation-item__content { font-weight: 600; }
.census-header .wp-block-navigation a { border-bottom: 0 !important; }
@media (min-width: 600px) {
	.census-header .wp-block-navigation__container > .wp-block-navigation-item:not(.census-nav-cta) { padding: 0.45em 0.75em; border-radius: 10px; transition: background-color .15s var(--ease); }
	.census-header .wp-block-navigation__container > .wp-block-navigation-item:not(.census-nav-cta) > a { padding: 0 !important; }
	.census-header .wp-block-navigation__container > .wp-block-navigation-item:not(.census-nav-cta):hover, .census-header .wp-block-navigation__container > .current-menu-item:not(.census-nav-cta) { background: var(--panel); }
	.census-header .wp-block-navigation__container { gap: 0.15rem !important; }
	.census-header .wp-block-navigation__submenu-container a { padding: 0.5em 0.75em !important; border-radius: 8px; }
	.census-header .wp-block-navigation__submenu-container a:hover { background: var(--panel); }
	.census-header .wp-block-navigation__submenu-container { border-radius: 12px !important; border: 1px solid var(--rule) !important; box-shadow: var(--lift); padding: 0.4rem !important; background: var(--paper) !important; }
}
.census-header .census-nav-cta a { padding: 0.6em 1.15em !important; }
.census-header .census-nav-cta a:hover { background: var(--lime) !important; }
@media (max-width: 600px) { .census-header .census-logo img { height: 34px; } }
/* Anchors and the sticky rail clear the header */
html { scroll-padding-top: calc(var(--hdr) + 1rem); }
.cl-rail { top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--hdr) + 1.5rem) !important; max-height: calc(100vh - var(--hdr) - 3rem) !important; }
.cl-main h2[id], .cl-main h3[id] { scroll-margin-top: calc(var(--hdr) + 1.5rem) !important; }

/* ---------- 4. Article hero: give the title the width, shrink the graphic ---------- */
.single .census-page-hero { background-size: auto 44%; }
body.single .census-page-hero.is-layout-constrained > * { padding-right: max(0px, calc(min(100%, var(--wrap, 1200px)) - 47rem)) !important; }
.single .census-page-hero .wp-block-post-excerpt__excerpt { max-width: 42rem; font-size: clamp(1.125rem, 1.6vw, 1.3125rem); }
@media (max-width: 1080px) and (min-width: 761px) { .single .census-page-hero { background-size: auto 30%; background-position: right -60px top 20px; } }
/* Phones: the stroke mark sits above the title as a small badge instead of behind the text */
@media (max-width: 760px) {
	.census-page-hero { background-size: auto 2.75rem !important; background-position: right 1rem top 1.5rem !important; padding-top: 5rem !important; }
}

/* Index pages (Blog): the lead lined up with the page edge instead of the title */
.census-page-hero > .census-page-lead { margin-left: max(0px, calc((100% - var(--wrap, 1200px)) / 2)) !important; }

/* ---------- 5. Reading rhythm in long pages ---------- */
.cl-main > .wp-block-post-content > p, .cl-main > .wp-block-post-content > ul, .cl-main > .wp-block-post-content > ol { line-height: 1.68; }
.cl-main > .wp-block-post-content > * + h2 { margin-top: 3.25rem; }
.cl-main > .wp-block-post-content > h2 + * { margin-top: 1rem; }
.census-note { border-radius: var(--radius-m); border-left-width: 4px; }

/* ---------- 6. Depth only where something is clickable ---------- */
.cl-card, .census-contact, .census-factsheet, .census-specimen-card { transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease); }
.cl-card:has(a.cl-card-link):hover { transform: translateY(-3px) !important; box-shadow: var(--lift); border-color: var(--rule) !important; }
.cl-card-link::before { content: ""; }
.cl-card-link { display: inline-flex; align-items: center; gap: .4rem; align-self: flex-start; padding: .45rem .85rem; margin-top: auto; border: 1.5px solid var(--ink); border-radius: 999px; font-size: .8438rem; line-height: 1.2; transition: background-color .15s var(--ease), color .15s var(--ease); }
.cl-card:has(a.cl-card-link):hover .cl-card-link { background: var(--ink); color: var(--canvas) !important; }
.census-factsheet { box-shadow: 0 1px 2px rgba(23,35,33,.04), 0 18px 40px -26px rgba(23,35,33,.3); }

/* ---------- 7. Destination cards on the homepage (Census Lab) ---------- */
.census-links { list-style: none; margin: 2.25rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.census-links li { margin: 0; }
.census-links a { position: relative; display: flex; flex-direction: column; gap: 1.25rem; height: 100%; padding: 1.35rem 1.35rem 1.25rem; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-m); color: var(--ink); text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.census-links a:hover { transform: translateY(-3px); box-shadow: var(--lift); }
.census-links .k { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.census-links .t { display: block; margin-top: .4rem; font-size: 1.1875rem; font-weight: 700; line-height: 1.25; letter-spacing: -.015em; }
.census-links .go { align-self: flex-start; margin-top: auto; display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .9rem; border: 1.5px solid var(--ink); border-radius: 999px; font-size: .875rem; font-weight: 700; transition: background-color .15s var(--ease), color .15s var(--ease); }
.census-links .go i { font-style: normal; transition: transform .15s var(--ease); }
.census-links a:hover .go { background: var(--ink); color: var(--canvas); }
.census-links a:hover .go i { transform: translateX(3px); }
.census-links a:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
@media (max-width: 760px) { .census-links { grid-template-columns: 1fr; } .census-links a { gap: 1rem; } }

/* ---------- 8. Buttons: same height pair, arrow nudge ---------- */
.wp-block-button__link { letter-spacing: -0.005em; }
.cl-btn span, .c2-btn span { display: inline-block; transition: transform .15s var(--ease); }
.cl-btn:hover span { transform: translateX(3px); }

/* ---------- 9. Footer: quiet headings, more air between links ---------- */
.census-footer h2 { color: #9AA6A3 !important; font-weight: 600 !important; }
.census-footer ul { gap: 0.75rem !important; }

/* ---------- 10. Mobile ---------- */
@media (max-width: 600px) {
	:root { --hdr: 3.6rem; }
	.census-hero .wp-block-buttons { flex-direction: column; align-items: stretch; }
	.census-hero .wp-block-button__link { display: block; text-align: center; }
	.census-lead { font-size: 1.125rem; }
}

/* ---------- 11. Phone menu: canvas background, left aligned, clear hierarchy ---------- */
@media (max-width: 599px) {
	.census-header .wp-block-navigation__responsive-container.is-menu-open { --navigation-layout-justification-setting: flex-start; --navigation-layout-justify: flex-start; background: var(--canvas) !important; color: var(--ink) !important; padding: 1.1rem 1.25rem 2.5rem !important; }
	.census-header .is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 3.25rem !important; align-items: stretch !important; }
	.census-header .is-menu-open .wp-block-navigation__container { align-items: stretch !important; gap: 0 !important; width: 100%; }
	.census-header .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item { align-items: flex-start !important; padding: 1rem 0 !important; border-bottom: 1px solid var(--rule); }
	.census-header .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content { font-size: 1.375rem; font-weight: 740; letter-spacing: -0.02em; }
	.census-header .is-menu-open .wp-block-navigation__submenu-container { padding: 0.6rem 0 0 !important; gap: 0 !important; align-items: flex-start !important; }
	.census-header .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content { font-size: 1.0625rem; font-weight: 500; color: var(--ink-2); padding: 0.45rem 0 !important; }
	.census-header .is-menu-open .wp-block-navigation__container > .census-nav-cta { border-bottom: 0 !important; padding-top: 1.5rem !important; align-items: stretch !important; }
	.census-header .is-menu-open .wp-block-navigation__container > .census-nav-cta a { display: block; width: 100%; box-sizing: border-box; text-align: center; font-size: 1.0625rem !important; font-weight: 700 !important; letter-spacing: 0 !important; padding: 0.95em 1.2em !important; }
}

/* ---------- 12. Product and tool pages: landing layout, distinct from articles ---------- */
/* Hero: centered, gridded canvas instead of the stroke mark, actions under the summary */
.census-product .census-page-hero { text-align: center; border-bottom: 0; padding-block: clamp(4rem, 9vw, 7rem) clamp(3rem, 6vw, 4.5rem) !important;
	background: radial-gradient(ellipse 70% 80% at 50% 0%, transparent 0 40%, var(--canvas) 78%), linear-gradient(var(--rule) 1px, transparent 1px) 0 0 / 56px 56px, linear-gradient(90deg, var(--rule) 1px, transparent 1px) 0 0 / 56px 56px, var(--canvas) !important; }
.census-product .census-page-hero h1 { font-size: clamp(2.75rem, 6.2vw, 4.75rem); line-height: 1.02; letter-spacing: -0.042em; max-width: 16ch !important; margin-inline: auto !important; }
.census-product .census-page-hero .wp-block-post-excerpt { max-width: 44rem !important; margin-inline: auto !important; }
.census-product .census-page-hero .wp-block-post-excerpt__excerpt { max-width: none; margin-inline: auto; font-size: clamp(1.125rem, 1.7vw, 1.375rem); }
.census-product .census-page-hero .cp-actions { justify-content: center; margin-top: 2rem; }
.census-product .census-page-hero .census-updated { margin-top: 1.75rem; font-size: .8125rem; }
.census-product .census-page-hero .cp-actions .wp-block-button__link span { display: inline-block; transition: transform .15s var(--ease); }
.census-product .census-page-hero .cp-actions .wp-block-button__link:hover span { transform: translateY(2px); }
.census-product .census-prose { padding-top: 0 !important; padding-bottom: 0 !important; }
/* Actions directly under the summary, the date last */
.census-product .census-page-hero { display: flex; flex-direction: column; align-items: center; }
.census-product .census-page-hero > * { width: 100%; }
.census-product .census-page-hero > .wp-block-post-title { order: 1; } .census-product .census-page-hero > .wp-block-post-excerpt { order: 2; }
.census-product .census-page-hero > .cp-actions { order: 3; } .census-product .census-page-hero > .census-updated { order: 4; }
.cp-intro > :is(p, ul, ol) { max-width: 46rem; margin-left: auto !important; margin-right: auto !important; }
.cp-intro > p:not(.census-note) { font-size: 1.0625rem; line-height: 1.68; }

/* Body: full 1200 grid, one band per section, alternating surface */
.cp-layout { max-width: var(--wrap, 1200px) !important; margin-inline: auto !important; }
.cp-layout > .wp-block-post-content { padding-inline: 0 !important; max-width: none !important; }
.cp-layout > .wp-block-post-content > * { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
.cp-intro { padding-top: clamp(1rem, 2vw, 1.5rem); }
.cp-intro > .census-note { max-width: 48rem; margin: 0 auto 2rem !important; }
.cp-intro > .cl-stats { margin-block: 0 0.5rem; box-shadow: 0 1px 2px rgba(23,35,33,.04), 0 18px 40px -28px rgba(23,35,33,.28); }
.cp-sec { padding-block: clamp(3.5rem, 7vw, 6rem); margin: 0 !important; }
.cp-sec:nth-of-type(odd) { background: var(--paper); box-shadow: 0 0 0 100vmax var(--paper); clip-path: inset(0 -100vmax); }
.cp-sec > * { max-width: 46rem; margin-left: auto !important; margin-right: auto !important; }
.cp-sec > :is(.cl-cards, .cl-grades, .cl-feature, .cl-stats, figure, .wp-block-table, .census-figure, .census-edition, .wp-block-html, .wp-block-columns, .wp-block-group) { max-width: 100%; }
.census-prose .cp-sec > h2, .cp-sec > h2 { text-align: center; font-size: clamp(2rem, 3.6vw, 2.875rem) !important; line-height: 1.08; letter-spacing: -0.032em; max-width: 22ch; margin: 0 auto 1rem !important; padding-top: 0 !important; border-top: 0 !important; }
.cp-sec > h2 + p { text-align: center; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.55; font-weight: 500; color: var(--ink-2); max-width: 40rem; margin-bottom: 2.25rem !important; }
.cp-sec > h3 { margin-top: 2.25rem; }
.cp-sec .cl-cards { margin-block: 0 0.5rem; }
.cp-sec:nth-of-type(odd) .cl-card, .cp-sec:nth-of-type(odd) .cl-grades li { background: var(--canvas); }
.cp-sec .cl-card { padding: 1.35rem 1.35rem 1.4rem; }
.cp-sec .cl-feature { margin-block: 0; }

/* Closing band replaces the article rail */
.cp-cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 3rem; align-items: center; background: var(--ink); color: var(--canvas); border-radius: var(--radius-l); padding: clamp(2rem, 5vw, 3.5rem); margin-block: clamp(3.5rem, 7vw, 5.5rem); }
.cp-cta .cl-label { color: var(--lime); }
.cp-cta-title { margin: 0 0 .6rem; font-size: clamp(1.6rem, 3vw, 2.25rem); line-height: 1.12; font-weight: 740; letter-spacing: -0.028em; color: #fff; }
.cp-cta-text { margin: 0; max-width: 38rem; color: #CBD3D0; line-height: 1.55; }
.cp-cta .cl-btn { font-size: 1rem; padding: .95rem 1.5rem; white-space: nowrap; }
.cp-cta .cl-btn:hover span { transform: translateX(3px); }

@media (max-width: 760px) {
	.cp-cta { grid-template-columns: 1fr; }
	.census-product .census-page-hero { background-size: auto, 40px 40px, 40px 40px, auto !important; }
	.census-prose .cp-sec > h2, .cp-sec > h2, .cp-sec > h2 + p { text-align: left; margin-left: 0 !important; }
	.census-product .census-page-hero { padding-bottom: 2.25rem !important; }
}
@media (max-width: 600px) {
	.census-product .census-page-hero { text-align: left; padding-top: 3.25rem !important; align-items: stretch; }
	.census-product .census-page-hero h1 { margin-inline: 0 !important; }
	.census-product .census-page-hero .wp-block-post-excerpt, .census-product .census-page-hero .wp-block-post-excerpt__excerpt { margin-inline: 0 !important; }
	.census-product .census-page-hero .cp-actions { flex-direction: column; align-items: stretch; justify-content: flex-start; }
	.census-product .census-page-hero .wp-block-button__link { display: block; text-align: center; }
}
