/* CodiceKit Importer: parts of imported pages. Uses Site Kit colours when present. */
.cki-box, .cki-steps, .cki-qa, .cki-sources, .cki-toc, .cki-byline, .cki-table {
	--i-ink: var(--ck-heading, #0F2A44);
	--i-text: var(--ck-text, #334155);
	--i-muted: var(--ck-muted, #5B6B80);
	--i-line: var(--ck-border, #E2E8F0);
	--i-surface: var(--ck-surface, #FFFFFF);
	--i-soft: var(--ck-surface-2, #F1F5F9);
	--i-accent: var(--ck-primary, #0B7F58);
	--i-wash: var(--ck-wash, #E8F7F1);
	--i-radius: 14px;
	--i-font-head: var(--ck-font-head, inherit);
}

/* byline */
.cki-byline { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 0 0 1.4em; font-size: .875rem; line-height: 1.6; color: var(--i-muted); }
.cki-byline > span:not(:last-child)::after { content: "·"; margin: 0 .55em; opacity: .7; }
.cki-byline a { color: var(--i-ink); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 30%, transparent); text-underline-offset: 3px; }
.cki-byline a:hover { text-decoration-color: currentColor; }
.cki-byline time { color: var(--i-text); }
* + .cki-byline:last-child { margin: 2.4em 0 0; padding-top: 1em; border-top: 1px solid var(--i-line); }

/* page index: a collapsible menu that marks the section you are reading */
.cki-toc { margin: 1.4em 0 1.8em; border: 1px solid var(--i-line); border-radius: var(--i-radius); background: var(--i-surface); }
.cki-toc__toggle { all: unset; box-sizing: border-box; display: flex !important; align-items: center; gap: 12px; width: 100%; padding: .85em 1.1em !important; cursor: pointer; color: var(--i-ink) !important; background: transparent !important; border: 0 !important; border-radius: var(--i-radius); font: inherit; }
.cki-toc__toggle:focus-visible { outline: 2px solid var(--i-accent); outline-offset: 2px; }
.cki-toc__head { display: grid; gap: 1px; min-width: 0; flex: 1; }
.cki-toc__title { font-family: var(--i-font-head); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--i-muted); }
.cki-toc__now { font-weight: 600; font-size: .95rem; color: var(--i-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cki-toc__chev { flex: none; color: var(--i-muted); transition: transform .3s ease; }
.cki-toc.is-open .cki-toc__chev { transform: rotate(180deg); }
.cki-toc__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s ease; }
.cki-toc.is-open .cki-toc__panel { grid-template-rows: 1fr; }
.cki-toc__inner { overflow: hidden; }
.cki-toc ol { margin: 0; padding: 0; list-style: none; }
.cki-toc__inner > ol { counter-reset: cki-toc; padding: 0 1.1em 1em; border-top: 1px solid var(--i-line); padding-top: .7em; display: grid; gap: .1em; }
.cki-toc__inner > ol > li { counter-increment: cki-toc; margin: 0; }
.cki-toc__inner > ol > li > a::before { content: counter(cki-toc, decimal-leading-zero); display: inline-block; min-width: 1.9em; font-size: .75rem; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--i-accent); }
.cki-toc li ol { margin: .1em 0 .3em 1.9em; display: grid; gap: .05em; }
.cki-toc li ol a { font-size: .92em; color: var(--i-muted) !important; }
.cki-toc a { display: block; padding: .28em .5em; margin: 0 -.5em; border-radius: 8px; color: var(--i-ink) !important; text-decoration: none !important; line-height: 1.4; transition: background-color .2s ease, color .2s ease; }
.cki-toc a:hover { background: var(--i-soft); }
.cki-toc a.is-active { background: var(--i-wash); color: var(--i-ink) !important; box-shadow: inset 3px 0 0 var(--i-accent); }

/* boxes: one family, each with its own mark */
.cki-box { position: relative; margin: 1.8em 0; padding: 1.15em 1.3em 1.15em 3.3em; border-radius: var(--i-radius); background: var(--i-soft); color: var(--i-text); }
.cki-box > :first-child { margin-top: 0 !important; }
.cki-box > :last-child { margin-bottom: 0 !important; }
.cki-box > * + * { margin-top: .7em; }
.cki-box::before { content: ""; position: absolute; left: 1.15em; top: 1.25em; width: 1.25em; height: 1.25em; background: var(--i-mark, var(--i-accent)); -webkit-mask: var(--i-icon) center / contain no-repeat; mask: var(--i-icon) center / contain no-repeat; }
.cki-box__title { font-family: var(--i-font-head); color: var(--i-ink); margin-bottom: .35em !important; }
.cki-box a { color: var(--i-ink); }
.cki-box--nota { --i-mark: #2F6DB5; --i-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1.5a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17Zm1 13H9V9h2v5.5ZM10 7.3a1.2 1.2 0 1 1 0-2.4 1.2 1.2 0 0 1 0 2.4Z'/%3E%3C/svg%3E"); background: color-mix(in srgb, #2F6DB5 8%, var(--i-surface)); }
.cki-box--attenzione { --i-mark: #B76E00; --i-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10.9 2.1a1 1 0 0 0-1.8 0L1.2 16.5A1 1 0 0 0 2 18h16a1 1 0 0 0 .9-1.5L10.9 2.1ZM11 15H9v-2h2v2Zm0-3.5H9V7h2v4.5Z'/%3E%3C/svg%3E"); background: color-mix(in srgb, #E09A1A 11%, var(--i-surface)); box-shadow: inset 3px 0 0 #D58A0B; }
.cki-box--consiglio { --i-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1.5a6 6 0 0 0-3.6 10.8c.6.5 1 1.2 1.1 2H12.5c.1-.8.5-1.5 1.1-2A6 6 0 0 0 10 1.5ZM7.5 15.5h5v1a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-1Z'/%3E%3C/svg%3E"); background: var(--i-wash); }
.cki-box--esempio { --i-mark: var(--i-ink); --i-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 2h9l3 3v13H4V2Zm2 5v1.6h8V7H6Zm0 3.2v1.6h8v-1.6H6Zm0 3.2V15h5v-1.6H6Z'/%3E%3C/svg%3E"); background: var(--i-surface); border: 1px dashed color-mix(in srgb, var(--i-ink) 28%, transparent); font-variant-numeric: tabular-nums; }
.cki-box--esempio code, .cki-box--esempio .wp-block-code { font-size: .92em; }
.cki-box--esempio ol, .cki-box--esempio ul { padding-left: 1.2em; }

/* steps */
ol.cki-steps { list-style: none; counter-reset: cki-step; margin: 1.6em 0; padding: 0; }
ol.cki-steps > li { position: relative; counter-increment: cki-step; margin: 0; padding: 0 0 1.15em 3em; min-height: 2.1em; }
ol.cki-steps > li::before { content: counter(cki-step); position: absolute; left: 0; top: -.1em; width: 2em; height: 2em; border-radius: 50%; display: grid; place-items: center; font-family: var(--i-font-head); font-weight: 700; font-size: .9rem; color: var(--i-accent); background: var(--i-wash); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--i-accent) 35%, transparent); }
ol.cki-steps > li:not(:last-child)::after { content: ""; position: absolute; left: calc(1em - 1px); top: 2.1em; bottom: .15em; width: 2px; border-radius: 2px; background: color-mix(in srgb, var(--i-accent) 18%, transparent); }
ol.cki-steps > li > ul, ol.cki-steps > li > ol { margin-top: .4em; }
.wp-block-group.cki-steps { counter-reset: cki-step; margin: 1.8em 0; }
.cki-step { position: relative; counter-increment: cki-step; padding: 0 0 1.4em 3.2em; }
.cki-step::before { content: counter(cki-step); position: absolute; left: 0; top: 0; width: 2.2em; height: 2.2em; border-radius: 12px; display: grid; place-items: center; font-family: var(--i-font-head); font-weight: 700; color: var(--ck-on-primary, #fff); background: var(--i-accent); }
.cki-step:not(:last-child)::after { content: ""; position: absolute; left: calc(1.1em - 1px); top: 2.6em; bottom: .3em; width: 2px; background: var(--i-line); }
.cki-step > .cki-step__title { margin: .15em 0 .4em !important; font-size: 1.12em; }
.cki-step > :last-child { margin-bottom: 0; }

/* questions */
.cki-qa { margin: 1.4em 0 2em; border-top: 1px solid var(--i-line); }
.cki-qa .wp-block-details { margin: 0; border-bottom: 1px solid var(--i-line); }
.cki-qa .wp-block-details summary { position: relative; padding: 1em 2.4em 1em 0; cursor: pointer; list-style: none; font-family: var(--i-font-head); font-weight: 600; color: var(--i-ink); line-height: 1.4; }
.cki-qa .wp-block-details summary::-webkit-details-marker { display: none; }
/* Questions are real H3s (so readers, screen readers and Yoast see the structure) but look like the summary line. */
.cki-qa .wp-block-details summary .cki-qa__q { margin: 0; padding: 0; font: inherit; font-size: 1.05em; line-height: 1.4; color: inherit; letter-spacing: normal; text-transform: none; display: inline; }
.cki-qa .wp-block-details summary::after { content: ""; position: absolute; right: .35em; top: 50%; width: .9em; height: .9em; margin-top: -.45em; background: var(--i-accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M7 1h2v14H7z'/%3E%3Cpath d='M1 7h14v2H1z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M7 1h2v14H7z'/%3E%3Cpath d='M1 7h14v2H1z'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform .25s ease; }
.cki-qa .wp-block-details[open] summary::after { transform: rotate(45deg); }
.cki-qa .wp-block-details summary:focus-visible { outline: 2px solid var(--i-accent); outline-offset: 2px; border-radius: 4px; }
.cki-qa .wp-block-details > :not(summary) { margin: 0 0 1em; color: var(--i-text); }

/* sources */
.cki-sources { margin: 2.4em 0 1em; padding: 1.1em 0 0; border-top: 1px solid var(--i-line); font-size: .9rem; color: var(--i-muted); }
.cki-sources__title { margin: 0 0 .5em !important; font-family: var(--i-font-head); color: var(--i-ink); }
.cki-sources ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .35em; }
.cki-sources li { position: relative; margin: 0; padding-left: 1.4em; line-height: 1.5; }
.cki-sources li::before { content: ""; position: absolute; left: 0; top: .42em; width: .8em; height: .8em; background: var(--i-muted); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M9 2h5v5h-2V5.4L7.7 9.7 6.3 8.3 10.6 4H9V2ZM3 4h4v2H4v6h6V9h2v5H2V4h1Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M9 2h5v5h-2V5.4L7.7 9.7 6.3 8.3 10.6 4H9V2ZM3 4h4v2H4v6h6V9h2v5H2V4h1Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.cki-sources a { color: var(--i-ink); overflow-wrap: anywhere; }

/* tables: the style follows what the table holds */
.wp-block-table.cki-table { margin: 1.6em 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cki-table table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--i-line); border-radius: 12px; overflow: hidden; font-size: .95em; }
.cki-table th, .cki-table td { padding: .7em .9em; border: 0; border-bottom: 1px solid var(--i-line); text-align: left; vertical-align: top; }
.cki-table tbody tr:last-child td { border-bottom: 0; }
.cki-table thead th { background: var(--i-soft); color: var(--i-ink); font-weight: 650; font-size: .92em; }
.cki-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--i-soft) 45%, transparent); }
.cki-table--pairs td:first-child { width: 38%; color: var(--i-muted); font-weight: 550; }
.cki-table--pairs tbody tr:nth-child(even) td { background: none; }
.cki-table--figures td, .cki-table--figures th { font-variant-numeric: tabular-nums; }
.cki-table .has-text-align-right { text-align: right; }
.cki-table--wide table { font-size: .86em; min-width: 640px; }
.cki-table--wide th:first-child, .cki-table--wide td:first-child { position: sticky; left: 0; background: var(--i-surface); box-shadow: 1px 0 0 var(--i-line); }
.cki-table--wide thead th:first-child { background: var(--i-soft); }

.entry-content > .wp-block-image, .elementor-widget-container > .wp-block-image, .cki-el-section .elementor-widget-image { margin: 1.9rem 0 1.4rem; }
.wp-block-image img, .cki-el-section .elementor-widget-image img { border-radius: 14px; }
.cki-el-section .elementor-widget-image .wp-caption-text { color: var(--i-muted, #5B6B80); font-size: .875rem; margin-top: .6rem; }
.wp-block-image .wp-element-caption { color: var(--i-muted, #5B6B80); font-size: .875rem; margin-top: .6rem; }

@media (max-width: 600px) {
	.cki-box { padding: 1em 1em 1em 2.9em; }
	.cki-box::before { left: .95em; top: 1.1em; }
	ol.cki-steps > li { padding-left: 2.7em; }
}
@media (prefers-reduced-motion: reduce) {
	.cki-toc a, .cki-toc__panel, .cki-toc__chev, .cki-qa .wp-block-details summary::after { transition: none; }
}

/* Pages the importer builds with Elementor: the site's own type and colours, not Elementor's default kit. */
.cki-el-section .elementor-widget-heading .elementor-heading-title { font-family: var(--ck-font-head, inherit); color: var(--ck-heading, #0F2A44); font-weight: 650; line-height: 1.25; }
.cki-el-section .elementor-widget-heading h2.elementor-heading-title { font-size: clamp(1.45rem, 1.15rem + 1vw, 1.9rem); margin: 1.4em 0 .2em; }
.cki-el-section .elementor-widget-heading h3.elementor-heading-title { font-size: 1.2rem; margin: 1.1em 0 .1em; }
.cki-el-section .elementor-widget-text-editor,
.cki-el-section .elementor-widget-html { font-family: var(--ck-font, inherit); color: var(--ck-text, #334155); font-size: 1.0625rem; line-height: 1.7; }
.cki-el-section .elementor-widget-text-editor a { color: var(--ck-primary, #0B7F58); }
.cki-el-section .elementor-widget-text-editor p:last-child,
.cki-el-section .elementor-widget-text-editor ul:last-child,
.cki-el-section .elementor-widget-text-editor ol:last-child { margin-bottom: 0; }
.cki-el-section .elementor-widget-image .widget-image-caption { color: var(--ck-muted, #5B6B80); font-size: .875rem; }

/* Phones: boxes keep their icon but give the text the full width. */
@media (max-width: 600px) {
	.cki-box:has(> .cki-box__title) { padding: 1em 1em 1em 1.1em; }
	.cki-box:has(> .cki-box__title)::before { left: 1.1em; top: 1.05em; }
	.cki-box > .cki-box__title { padding-left: 1.75em; }
	.cki-box ol, .cki-box ul { padding-left: 1.25em !important; margin-left: 0 !important; }
}

/* Buttons written with [pulsante] in the document. Email buttons get an envelope. */
.entry-content .wp-block-buttons, .cki-el-section .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.5em 0; }
.entry-content .wp-block-buttons + .wp-block-buttons, .cki-el-section .elementor-widget-html + .elementor-widget-html .wp-block-buttons { margin-top: -.4em; }
.entry-content .wp-block-button__link, .cki-el-section .wp-block-button__link {
	display: inline-flex !important; align-items: center; gap: 10px; padding: 15px 24px !important; border-radius: 14px !important;
	background: linear-gradient(135deg, var(--ck-primary, #0B7F58) 0%, color-mix(in srgb, var(--ck-primary, #0B7F58) 70%, #22C993) 100%) !important;
	color: #fff !important; font-family: var(--ck-font-head, inherit); font-weight: 600; font-size: 1.02rem; line-height: 1.2; text-decoration: none !important; border: 0 !important;
	box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--ck-primary, #0B7F58) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, .2);
	transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s ease;
}
.entry-content .wp-block-button__link:hover, .cki-el-section .wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px color-mix(in srgb, var(--ck-primary, #0B7F58) 85%, transparent), inset 0 1px 0 rgba(255, 255, 255, .2); color: #fff !important; }
.entry-content .wp-block-button__link:focus-visible, .cki-el-section .wp-block-button__link:focus-visible { outline: 3px solid color-mix(in srgb, var(--ck-primary, #0B7F58) 45%, transparent); outline-offset: 3px; }
.cki-btn--mail .wp-block-button__link::before { content: ""; width: 20px; height: 20px; flex: none; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2.5'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2.5'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E") center / contain no-repeat; }
@media (prefers-reduced-motion: reduce) { .entry-content .wp-block-button__link, .cki-el-section .wp-block-button__link { transition: none; } .entry-content .wp-block-button__link:hover { transform: none; } }

/* Links that open an email inside text and tables. */
.entry-content a[href^="mailto:"], .cki-el-section a[href^="mailto:"]:not(.wp-block-button__link) { font-weight: 600; }

/* Phones: text tables with three or more columns become one labelled block per row. */
@media (max-width: 640px) {
	.cki-table--stack.is-labelled { overflow: visible; }
	.cki-table--stack.is-labelled table { min-width: 0; border: 0; border-radius: 0; font-size: .95em; }
	.cki-table--stack.is-labelled thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.cki-table--stack.is-labelled tbody, .cki-table--stack.is-labelled tr { display: block; }
	.cki-table--stack.is-labelled tr { margin: 0 0 .75em; padding: .35em .95em; border: 1px solid var(--i-line, #E2E8F0); border-radius: 12px; background: var(--i-bg, transparent); }
	.cki-table--stack.is-labelled tbody tr:nth-child(even) td { background: none; }
	.cki-table--stack.is-labelled td { display: grid; grid-template-columns: minmax(96px, 36%) 1fr; gap: .8em; padding: .55em 0; border-bottom: 1px dashed var(--i-line, #E2E8F0); text-align: left !important; }
	.cki-table--stack.is-labelled td:last-child { border-bottom: 0; }
	.cki-table--stack.is-labelled td, .cki-table--stack.is-labelled th { box-shadow: none !important; position: static !important; }
	.cki-table--stack.is-labelled td::before { content: attr(data-label); font-size: .8em; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; color: var(--i-muted, #5B6B80); padding-top: .2em; }
	.cki-table--stack.is-labelled td:first-child { font-weight: 650; color: var(--i-ink, #0F2A44); }
}
