/* Editorial/system frames — shared by the front end and Gutenberg canvas.
 * Native color, typography, dimensions and spacing controls stay authoritative.
 */
:where(.rx-e-page-head, .rx-e-section) {
	width: auto;
	max-width: var(--wp--style--global--wide-size, 1580px);
	margin-inline: auto;
	padding-inline: var(--rx-figma-gutter, 4.35vw);
}
:where(.rx-e-section) { padding-block: clamp(3rem, 6.5vw, 7rem); }
:where(.rx-e-page-head) { padding-block: clamp(5rem, 12vw, 13rem) clamp(3rem, 5vw, 5.5rem); }
:where(.rx-e-kicker) { text-transform: uppercase; letter-spacing: .035em; line-height: 1.4; }
:where(.rx-e-section, .rx-e-page-head, .rx-e-intro, .rx-e-hero) :where(h1, h2, h3, p, figure, ul, .wp-block-group, .wp-block-query) { margin-block-start: 0; }
:where(.rx-e-section, .rx-e-page-head) :where(h1, h2, h3) { font-weight: 400; line-height: 1.05; letter-spacing: -.035em; }
:where(.rx-e-section, .rx-e-page-head) :where(p) { line-height: 1.18; }
:where(.rx-e-section, .rx-e-page-head) :where(h2, h3) { margin-block-end: 1.5rem; }
:where(.rx-e-section, .rx-e-page-head) :where(p + p) { margin-block-start: 1rem; }
:where(.rx-e-split) { display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 2.06fr); gap: clamp(2rem, 4.5vw, 5rem); }
:where(.rx-e-split > *, .rx-e-system > *) { min-width: 0; }
/* Grid/flex children use their gap, not the Flow layout's sibling top margins. */
.wp-block-group:is(.rx-e-split, .rx-e-gallery, .rx-e-system, .rx-e-benefits-grid, .rx-e-benefit, .rx-e-steps, .rx-e-event-head, .rx-e-two-copy, .rx-e-event-filters, .rx-e-event-row, .rx-e-event-time, .rx-e-event-title, .rx-e-job-summary) > * { margin-block: 0; }
:where(.rx-e-section-copy > .wp-block-heading) { max-width: 17ch; }
:where(.rx-e-intro) { max-width: 1146px; margin-inline: auto; padding: clamp(4rem, 9vw, 10rem) 1.5rem clamp(2rem, 4vw, 4rem); text-align: center; }
:where(.rx-e-gallery) { padding-block-start: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 3.5vw, 3.75rem); }
:where(.rx-e-gallery img) { width: 100%; aspect-ratio: 1.75; object-fit: cover; border-radius: 6px; }

/* Landing heroes: Figma places title and short description at opposite edges. */
.rx-figma-hero.rx-e-hero { width: 100%; min-height: clamp(34rem, 48.84vw, 60rem); padding: clamp(10rem, 16vw, 17rem) var(--rx-figma-gutter, 4.35vw) clamp(2rem, 3.6vw, 4rem); }
.rx-figma-hero.rx-e-hero::after { background: linear-gradient(0deg, rgb(0 0 0 / .2), transparent 45%); }
.wp-block-cover.rx-figma-hero.rx-e-hero.has-custom-content-position > .wp-block-cover__inner-container { width: 100%; max-width: none; }
.rx-e-hero .rx-e-hero__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 268px); align-items: end; width: 100%; gap: 2rem; }
.rx-e-hero .rx-e-hero__identity { max-width: none; }
.rx-e-hero :where(h1) { max-width: none; margin: .75rem 0 0; line-height: .97; letter-spacing: -.045em; }
.rx-e-hero :where(h1.has-display-font-size) { font-size: var(--wp--preset--font-size--display); }
.rx-e-hero :where(.rx-e-kicker) { font-size: var(--wp--preset--font-size--micro); }
.rx-e-hero :where(.rx-e-hero__copy) { max-width: none; margin: 0 0 .5rem; line-height: 1.08; }
.rx-e-hero :where(.rx-e-hero__copy.has-lead-font-size) { font-size: var(--wp--preset--font-size--lead); }

/* Sustainability: independently editable sidebar list + article groups. */
:where(.rx-e-editorial-layout) { grid-template-columns: minmax(0, .94fr) minmax(0, 2.06fr); display: grid; gap: clamp(1.5rem, 3vw, 3.5rem); padding-block-start: 3rem; padding-block-end: clamp(7rem, 20vw, 22rem); border-top: 1px solid var(--wp--preset--color--line); }
:where(.rx-e-editorial-sidebar) { min-width: 0; }
:where(.rx-e-editorial-index) { padding: 0; list-style: none; position: sticky; top: 6rem; }
:where(.rx-e-editorial-index li) { border-bottom: 1px solid var(--wp--preset--color--line); }
:where(.rx-e-editorial-index a) { display: block; padding-block: .8rem; color: inherit; text-decoration: none; font-size: var(--wp--preset--font-size--lead); line-height: 1.2; }
:where(.rx-e-editorial-index a:hover, .rx-e-editorial-index a:focus-visible) { color: var(--wp--preset--color--blue); }
:where(.rx-e-editorial-article) { min-width: 0; padding-left: clamp(1.5rem, 4vw, 4.5rem); border-left: 1px solid var(--wp--preset--color--line); }
:where(.rx-e-sustainability__hero img) { width: 100%; aspect-ratio: 1.72; object-fit: cover; border-radius: 6px; }
:where(.rx-e-article-section) { margin-top: clamp(2.5rem, 5vw, 5rem); scroll-margin-top: 7rem; }
:where(.rx-e-lifecycle) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 2rem; margin: 2.5rem 0 0; padding-left: 1.2rem; font-size: var(--wp--preset--font-size--small); line-height: 1.2; }
:where(.rx-e-sustainability__detail) { margin-top: 3rem; }
:where(.rx-e-sustainability__detail img) { width: 100%; aspect-ratio: 4.6; object-fit: cover; border-radius: 6px; }

/* Identical explorer shell on /soluzioni/ and every canonical /solution/ URL. */
.rx-e-explorer { display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 2.06fr); gap: clamp(1.5rem, 3vw, 3.5rem); padding-block-start: 3rem; border-top: 1px solid var(--wp--preset--color--line); }
.rx-e-explorer__index, .rx-e-explorer__detail { min-width: 0; }
.rx-e-explorer__detail { border-left: 1px solid var(--wp--preset--color--line); padding-left: clamp(1.5rem, 4vw, 4.5rem); }
.rx-e-explorer .rx-solution-detail { padding: 0; }
.rx-e-explorer .rx-solution-detail__media { margin: 0 0 clamp(2rem, 5vw, 5rem); }
.rx-e-explorer .rx-solution-detail__body .rx-figma-article { width: auto; max-width: none; margin-inline: 0; padding: 0; }
.rx-e-explorer .rx-solution-detail__body { margin-block: 2rem; }
.rx-e-explorer .rx-solution-index__item .wp-block-post-title { font-size: var(--wp--preset--font-size--lead); }

/* SismaREX — flexible groups for technology, six benefits and installation. */
:where(.rx-e-system) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: clamp(2rem, 4vw, 4rem); }
:where(.rx-e-system-copy h2) { max-width: 16ch; }
:where(.rx-e-system-image img) { width: 100%; aspect-ratio: 1; object-fit: contain; }
:where(.rx-e-component-list, .rx-e-numbered-list) { list-style: none; padding: 0; margin-block: 2rem 0; }
:where(.rx-e-component-list li, .rx-e-numbered-list li) { position: relative; padding: 1rem 0 1rem 3rem; border-top: 1px solid var(--wp--preset--color--line); font-size: var(--wp--preset--font-size--lead); }
:where(.rx-e-component-list li)::before { content: "→"; position: absolute; left: 0; top: 1rem; }
:where(.rx-e-numbered-list) { counter-reset: application; }
:where(.rx-e-numbered-list li)::before { counter-increment: application; content: "[" counter(application, decimal-leading-zero) "]"; font: var(--wp--preset--font-size--micro) var(--wp--preset--font-family--mono); position: absolute; left: 0; top: 1.2rem; }
:where(.rx-e-benefits-intro) { max-width: 36ch; }
:where(.rx-e-benefits-grid) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; margin-top: 3rem; }
:where(.rx-e-benefit) { display: grid; grid-template-columns: minmax(50px, 25%) 1fr; align-items: center; gap: 1.5rem; }
:where(.rx-e-benefit-icon) { margin: 0; }
:where(.rx-e-benefit-icon img) { display: block; width: 100%; max-width: 130px; height: 80px; object-fit: contain; }
:where(.rx-e-benefit-copy) { padding-left: 1.25rem; border-left: 1px solid var(--wp--preset--color--line); }
:where(.rx-e-benefit-copy h3) { margin-bottom: 1rem; }
:where(.rx-e-steps) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; padding-top: 2rem; margin-top: 2rem; border-top: 1px solid var(--wp--preset--color--line); }
:where(.rx-e-installation-image img) { display: block; width: 100%; max-height: 680px; object-fit: contain; }
:where(.rx-e-documents__list) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; list-style: none; margin: 2rem 0; padding: 0; }
:where(.rx-e-document h3) { margin: .35rem 0 0; font-weight: 400; }
:where(.rx-e-document a) { color: inherit; text-decoration: underline; text-underline-offset: .15em; }
:where(.rx-e-wide-detail img) { width: 100%; aspect-ratio: 4.8; object-fit: cover; border-radius: 6px; }
:where(.rx-e-full-image) { width: 100%; margin: 0; }
:where(.rx-e-full-image img) { width: 100%; aspect-ratio: 2.9; object-fit: cover; }
:where(.rx-e-news) { margin-top: 3rem; }
:where(.rx-e-news-card img) { width: 100%; aspect-ratio: 3.3; object-fit: cover; border-radius: 6px; }
:where(.rx-e-news-card h3) { margin: .25rem 0 0; font-weight: 400; }
:where(.rx-e-news-card a) { color: inherit; text-decoration: none; }
:where(.rx-e-news-card .rx-e-kicker) { margin: .75rem 0 0; }
:where(.rx-e-details) { border-top: 1px solid var(--wp--preset--color--line); padding: 0; margin: 0; }
:where(.rx-e-details summary) { cursor: pointer; padding-block: 1.15rem; font-size: var(--wp--preset--font-size--lead); }
:where(.rx-e-details > :not(summary)) { padding-inline-start: 1.25rem; padding-block-end: 1rem; }
:where(.rx-e-application) { padding-block: clamp(4rem, 7vw, 8rem); }
:where(.rx-e-application-image img) { width: 100%; aspect-ratio: 3.85; object-fit: cover; border-radius: 6px; }

/* Event schedule and openings retain Query, Post Template and SCF leaf blocks. */
:where(.rx-e-event-head) { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: end; }
:where(.rx-e-event-intro-copy) { margin-left: auto; max-width: 35rem; }
:where(.rx-e-two-copy) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
:where(.rx-e-event-filters) { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 1.5rem; }
:where(.rx-e-event-filters .wp-block-button__link) { padding: .5rem 0; border: 0; background: transparent; color: inherit; font: var(--wp--preset--font-size--small) var(--wp--preset--font-family--sans); text-transform: none; }
:where(.rx-e-event-filters [aria-pressed="true"]) { text-decoration: underline; text-underline-offset: .3em; }
.wp-block-button.is-style-rexpol-filter .wp-block-button__link { font: inherit; text-transform: none; letter-spacing: normal; padding: .5rem 0; border: 0; border-radius: 0; }
.wp-block-button.is-style-rexpol-filter .wp-block-button__link:not(.has-background) { background: transparent; }
.wp-block-button.is-style-rexpol-filter .wp-block-button__link:not(.has-text-color) { color: inherit; }
.wp-block-button.is-style-rexpol-filter .wp-block-button__link[aria-pressed="true"] { text-decoration: underline; text-underline-offset: .3em; }
:where(.rx-e-events__list, .rx-e-jobs__list) { list-style: none; margin: 0; padding: 0; }
:where(.rx-e-event-row) { display: grid; grid-template-columns: 1fr 1fr 1fr 2.7fr 1.2fr 2.75rem; align-items: center; gap: 1rem; padding: 1.25rem 0; border-top: 1px solid var(--wp--preset--color--line); }
:where(.rx-e-event-row h3) { margin: 0; font-weight: 400; }
:where(.rx-e-event-row a) { color: inherit; text-decoration: none; }
:where(.rx-e-event-row .rx-meta-field > span, .rx-e-job-summary .rx-meta-field > span) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:where(.rx-e-event-row .rx-meta-field strong, .rx-e-job-summary .rx-meta-field strong) { font-size: var(--wp--preset--font-size--small); font-weight: 400; }
:where(.rx-e-event-badge) { justify-self: start; }
:where(.rx-e-event-badge .rx-meta-field strong) { display: block; padding: .5rem .8rem; color: var(--wp--preset--color--paper); background: var(--wp--preset--color--blue); font-family: var(--wp--preset--font-family--mono); text-transform: uppercase; font-size: var(--wp--preset--font-size--micro); }
:where(.rx-e-event-time) { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem; }
:where(.rx-e-event-time p) { margin: 0; }
:where(.rx-e-event-title > .rx-meta-field strong) { font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--micro); text-transform: uppercase; }
:where(.rx-e-event-link) { display: grid; min-width: 44px; min-height: 44px; place-content: center; }
:where(.rx-e-jobs-section > h2) { max-width: 25ch; margin-bottom: 3rem; }
:where(.rx-e-job) { position: relative; border-top: 1px solid var(--wp--preset--color--line); }
:where(.rx-e-job-summary) { display: grid; grid-template-columns: 1fr 1fr 2fr 1.8fr; align-items: start; gap: 1rem; padding: 1.5rem 3.5rem 1.5rem 0; }
:where(.rx-e-job-summary h3) { margin: 0; }
:where(.rx-e-job-summary a) { color: inherit; text-decoration: none; }
:where(.rx-e-job-summary > .rx-meta-field:first-child strong) { display: inline-block; padding: .5rem .8rem; color: var(--wp--preset--color--paper); background: var(--wp--preset--color--blue); font-family: var(--wp--preset--font-family--mono); text-transform: uppercase; font-size: var(--wp--preset--font-size--micro); }
:where(.rx-e-job-excerpt p) { margin: 0; }
:where(.rx-e-job-body) { max-width: 42rem; margin-left: auto; padding-bottom: 2rem; }
:where(.rx-e-job-body .rx-figma-article) { width: auto; max-width: none; padding: 0; }
:where(.rx-e-job-body .wp-block-heading) { font-size: var(--wp--preset--font-size--lead); }
:where(.rx-e-job-toggle) { position: absolute; right: 0; top: 1rem; width: 44px; height: 44px; border: 0; background: transparent; color: inherit; font-size: 1.5rem; cursor: pointer; }
:where(.rx-e-job-body[hidden], .rx-e-events__list > [hidden]) { display: none; }
.rx-e-event-row .rx-meta-field strong, .rx-e-job-summary .rx-meta-field strong { font: inherit; }
.rx-e-event-row > .rx-meta-field:last-of-type strong::after { content: " CFP"; }
:where(.rx-e-section a:focus-visible, .rx-e-section button:focus-visible, .rx-e-section summary:focus-visible) { outline: 3px solid var(--wp--preset--color--blue); outline-offset: 3px; }

/* Tailwind's asynchronously injected preflight has zero-specificity border resets.
 * Structural rules need one class of specificity; native inline border settings win.
 */
:is(.rx-e-editorial-layout, .rx-e-steps, .rx-e-details, .rx-e-event-row, .rx-e-job) { border-top: 1px solid var(--wp--preset--color--line); }
.rx-e-editorial-index li { border-bottom: 1px solid var(--wp--preset--color--line); }
.rx-e-editorial-article, .rx-e-benefit-copy { border-left: 1px solid var(--wp--preset--color--line); }
:is(.rx-e-component-list, .rx-e-numbered-list) li { border-top: 1px solid var(--wp--preset--color--line); }
.rx-e-section :is(a, button, summary):focus-visible { outline: 3px solid var(--wp--preset--color--blue); outline-offset: 3px; }

@media (max-width: 900px) {
	.rx-e-explorer { grid-template-columns: 1fr; }
	.rx-e-explorer__detail { border-left: 0; padding-left: 0; }
	:where(.rx-e-editorial-layout, .rx-e-split, .rx-e-system, .rx-e-event-head) { grid-template-columns: 1fr; }
	.rx-e-editorial-article { padding-left: 0; border-left: 0; }
	:where(.rx-e-editorial-index) { position: static; }
	:where(.rx-e-benefits-grid) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	:where(.rx-e-event-row) { grid-template-columns: 1fr 1fr 1fr 44px; gap: .75rem; }
	:where(.rx-e-event-title) { grid-column: 1 / 4; grid-row: 2; }
	:where(.rx-e-event-link) { grid-column: 4; grid-row: 1 / 3; }
	:where(.rx-e-event-row > .rx-meta-field:last-of-type) { grid-column: 1 / 4; }
	:where(.rx-e-job-summary) { grid-template-columns: 1fr 1fr; }
	:where(.rx-e-job-summary h3, .rx-e-job-excerpt) { grid-column: 1 / -1; }
	:where(.rx-e-job-body) { max-width: none; }
	:where(.rx-e-installation-image img) { max-height: 450px; }
}
@media (max-width: 600px) {
	.rx-figma-hero.rx-e-hero { min-height: 34rem; padding-bottom: 2rem; }
	.rx-e-hero .rx-e-hero__row { grid-template-columns: 1fr; gap: 1.75rem; }
	.rx-e-hero .rx-e-hero__copy { max-width: 25ch; }
	:where(.rx-e-gallery, .rx-e-benefits-grid, .rx-e-steps) { grid-template-columns: 1fr; }
	:where(.rx-e-documents__list, .rx-e-lifecycle) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	:where(.rx-e-event-head) { gap: 2rem; }
	:where(.rx-e-event-head) { padding-block-end: 2rem; }
	:where(.rx-e-calendar) { padding-block-start: 1rem; }
	:where(.rx-e-page-head, .rx-e-section) { padding-inline: 1.25rem; }
	:where(.rx-e-event-row) { grid-template-columns: 1fr 1fr 44px; }
	:where(.rx-e-event-time) { grid-row: 2; grid-column: 1 / 3; }
	:where(.rx-e-event-title) { grid-row: 3; grid-column: 1 / 3; }
	:where(.rx-e-event-link) { grid-column: 3; grid-row: 1 / 4; }
	:where(.rx-e-event-row > .rx-meta-field:last-of-type) { grid-column: 1 / 3; }
	:where(.rx-e-application-image img, .rx-e-wide-detail img) { aspect-ratio: 2; }
}
