/* Cortex theme: componenti e tema scuro. I token colore vivono in theme.json (preset). */

:root {
  --cx-grid: rgba(20, 19, 23, 0.045);
  --cx-corner: #9A98A3;
  --cx-header-bg: rgba(237, 237, 240, 0.86);
  --cx-radius: 4px;
  --cx-wide: 1240px;
  color-scheme: light;
}

/* Tema scuro: esplicito via data-theme, oppure da preferenza di sistema se l'utente non ha scelto */
:root[data-theme="dark"] {
  --wp--preset--color--bg: #0B0B0E;
  --wp--preset--color--surface: #131317;
  --wp--preset--color--ink: #F1F0F4;
  --wp--preset--color--muted: #8D8A97;
  --wp--preset--color--line: #26252C;
  --wp--preset--color--accent-text: #9C80CC;
  --cx-grid: rgba(241, 240, 244, 0.035);
  --cx-corner: #4A4852;
  --cx-header-bg: rgba(11, 11, 14, 0.86);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --wp--preset--color--bg: #0B0B0E;
    --wp--preset--color--surface: #131317;
    --wp--preset--color--ink: #F1F0F4;
    --wp--preset--color--muted: #8D8A97;
    --wp--preset--color--line: #26252C;
    --wp--preset--color--accent-text: #9C80CC;
    --cx-grid: rgba(241, 240, 244, 0.035);
    --cx-corner: #4A4852;
    --cx-header-bg: rgba(11, 11, 14, 0.86);
    color-scheme: dark;
  }
}

body {
  background-color: var(--wp--preset--color--bg);
  background-image:
    linear-gradient(var(--cx-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--cx-grid) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:where(.cx-main) p { max-width: 68ch; }
.cx-main { padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--70); }
.cx-main--canvas { padding-top: var(--wp--preset--spacing--50); }

/* ---------- Header ---------- */
.cx-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--cx-header-bg);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--wp--preset--color--line);
}
.admin-bar .cx-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .cx-header { top: 46px; } }
.cx-header__bar { min-height: 64px; gap: 24px; }
.cx-header__right { gap: 12px; }
.cx-wordmark { margin: 0; font-family: var(--wp--preset--font-family--brand); font-size: 20px; line-height: 1; letter-spacing: 0.02em; white-space: nowrap; }
.cx-wordmark a { color: var(--wp--preset--color--ink); text-decoration: none; }
.cx-wordmark a:hover { color: var(--wp--preset--color--accent-text); }

.cx-nav { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.cx-nav .wp-block-navigation-item__content { color: var(--wp--preset--color--muted); padding: 9px 12px; border-radius: var(--cx-radius); text-decoration: none; transition: color .15s, background-color .15s; }
.cx-nav .wp-block-navigation-item__content:hover,
.cx-nav .current-menu-item > .wp-block-navigation-item__content { color: var(--wp--preset--color--ink); background: color-mix(in srgb, var(--wp--preset--color--ink) 7%, transparent); }
.cx-nav .wp-block-navigation__container { gap: 2px; }
.cx-nav .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--bg); color: var(--wp--preset--color--ink); }

.cx-theme-toggle {
  display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0;
  background: transparent; color: var(--wp--preset--color--ink);
  border: 1px solid var(--wp--preset--color--line); border-radius: var(--cx-radius); cursor: pointer;
}
.cx-theme-toggle:hover { border-color: var(--wp--preset--color--ink); }
.cx-theme-toggle:focus-visible, .wp-element-button:focus-visible, a:focus-visible { outline: 2px solid var(--wp--preset--color--accent-text); outline-offset: 2px; }
.cx-theme-toggle .cx-ico-sun { display: none; }
:root[data-theme="dark"] .cx-theme-toggle .cx-ico-sun { display: block; }
:root[data-theme="dark"] .cx-theme-toggle .cx-ico-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cx-theme-toggle .cx-ico-sun { display: block; }
  :root:not([data-theme="light"]) .cx-theme-toggle .cx-ico-moon { display: none; }
}
.cx-header__cta .wp-element-button { padding: 10px 16px; font-size: 12px; }
@media (max-width: 900px) { .cx-header__cta { display: none !important; } }
@media (max-width: 600px) { .cx-wordmark { font-size: 16px; } }

/* ---------- Pulsanti ---------- */
.wp-element-button, .wp-block-button__link { transition: background-color .15s, color .15s, border-color .15s, transform .08s; }
.wp-element-button:hover { background: color-mix(in srgb, var(--wp--preset--color--accent) 84%, var(--wp--preset--color--ink)); border-color: color-mix(in srgb, var(--wp--preset--color--accent) 84%, var(--wp--preset--color--ink)); }
.wp-element-button:active { transform: translateY(1px); }
.wp-block-button.is-style-outline > .wp-block-button__link {
  background: transparent; color: var(--wp--preset--color--ink);
  border: 1px solid var(--wp--preset--color--ink); padding: 14px 22px;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--bg); }

/* ---------- Pannello con segni d'angolo (firma dell'HMI) ---------- */
.cx-panel {
  position: relative;
  background: var(--wp--preset--color--surface);
  border: 1px solid var(--wp--preset--color--line);
  border-radius: 0;
  padding: clamp(20px, 3vw, 32px);
}
.cx-panel::before {
  content: ""; position: absolute; inset: -5px; pointer-events: none;
  --c: var(--cx-corner); --l: 9px; --w: 1.5px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) top left / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) top right / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) bottom left / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) bottom right / var(--w) var(--l);
  background-repeat: no-repeat;
}
.cx-panel > :first-child { margin-top: 0; }
.cx-panel > :last-child { margin-bottom: 0; }
.cx-panel--flush { padding: 0; overflow: visible; }
.cx-panel--flush .wp-block-image, .cx-panel--flush figure { margin: 0; }
.cx-panel--flush img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.cx-panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 14px; margin-bottom: 20px !important;
  border-bottom: 1px solid var(--wp--preset--color--line);
}

/* ---------- Etichette, stati, dati ---------- */
.cx-label {
  font-size: 11px !important; font-weight: 650; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--wp--preset--color--muted); line-height: 1.3; margin: 0;
}
.cx-label--ink { color: var(--wp--preset--color--ink); }
.cx-mono, .cx-mono * { font-family: var(--wp--preset--font-family--mono); font-feature-settings: "zero" 1; }
.cx-status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px !important; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 4px 9px; margin: 0;
  border: 1px solid var(--wp--preset--color--line); border-radius: 2px;
  color: var(--wp--preset--color--ink); white-space: nowrap;
}
.cx-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cx-dot, var(--wp--preset--color--muted)); }
.cx-status--ok { --cx-dot: var(--wp--preset--color--ok); color: var(--wp--preset--color--ok); border-color: color-mix(in srgb, var(--wp--preset--color--ok) 40%, transparent); }
.cx-status--warn { --cx-dot: var(--wp--preset--color--warn); }
.cx-status--dev { --cx-dot: var(--wp--preset--color--accent-text); }

.cx-readout, .cx-project p.cx-readout { color: var(--wp--preset--color--ink); font-family: var(--wp--preset--font-family--mono); font-weight: 700; font-size: var(--wp--preset--font-size--readout); line-height: 1; letter-spacing: -0.02em; margin: 0; }
.cx-readout span, .cx-readout em { font-style: normal; font-weight: 400; font-size: 0.45em; color: var(--wp--preset--color--muted); margin-left: 0.25em; letter-spacing: 0; }

/* ---------- Hero ---------- */
.cx-hero { align-items: stretch !important; gap: clamp(20px, 3vw, 32px) !important; }
.cx-hero h1 { font-size: var(--wp--preset--font-size--display); max-width: 18ch; margin-top: 18px; }
.cx-hero .cx-lead { font-size: var(--wp--preset--font-size--lead); color: var(--wp--preset--color--muted); line-height: 1.55; max-width: 46ch; }
.cx-hero .wp-block-buttons { margin-top: 28px; }
.cx-hero > .wp-block-column, .cx-split > .wp-block-column, .cx-about > .wp-block-column { display: flex; flex-direction: column; }
.cx-hero > .wp-block-column > .cx-panel, .cx-split > .wp-block-column > .cx-panel, .cx-about > .wp-block-column > .cx-panel { flex: 1; }
.cx-panel--flush > .wp-block-image { flex: 1; min-height: 0; }
.cx-split .cx-panel--flush, .cx-about .cx-panel--flush { display: flex; flex-direction: column; }
.cx-hero__text { display: flex; flex-direction: column; justify-content: center; }
.cx-hero__media { min-height: 420px; display: flex; flex-direction: column; }
.cx-hero__media .wp-block-image { flex: 1; min-height: 0; }
.cx-hero__media .cx-caption { padding: 12px 16px; border-top: 1px solid var(--wp--preset--color--line); margin: 0; display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--wp--preset--color--muted); }
.cx-brandline { font-family: var(--wp--preset--font-family--brand); font-size: 22px; letter-spacing: 0.04em; color: var(--wp--preset--color--accent-text); margin: 0; line-height: 1.1; }

/* ---------- Righe specifiche ---------- */
.cx-specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--wp--preset--color--line); margin-top: 24px !important; }
.cx-specs > * { margin: 0 !important; padding: 18px 18px 4px 0; }
.cx-specs .cx-label { margin-top: 8px !important; }
@media (max-width: 600px) { .cx-specs { grid-template-columns: 1fr 1fr; } }

/* ---------- Sezioni ---------- */
.cx-section { margin-top: var(--wp--preset--spacing--70) !important; scroll-margin-top: 96px; }
.cx-section > h2 { margin-bottom: 8px; }
.cx-section__intro { color: var(--wp--preset--color--muted); margin-top: 0; }

/* Competenze: elenco a righe */
.cx-rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--wp--preset--color--line); }
.cx-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; padding: 20px 0; border-bottom: 1px solid var(--wp--preset--color--line); }
.cx-row h3 { margin: 0; font-size: 18px; }
.cx-row p { margin: 0; grid-column: 1 / -1; color: var(--wp--preset--color--muted); font-size: 15px; }
.cx-row .cx-tools { grid-column: 2; grid-row: 1; font-family: var(--wp--preset--font-family--mono); font-size: 12px; color: var(--wp--preset--color--muted); text-align: right; align-self: center; }
@media (max-width: 600px) { .cx-row .cx-tools { grid-column: 1; grid-row: auto; text-align: left; } }

/* Progetti */
.cx-projects { gap: clamp(16px, 2.4vw, 24px) !important; }
.cx-project { display: flex; flex-direction: column; height: 100%; }
.cx-project h3 { margin: 18px 0 6px; font-size: 21px; }
.cx-project p { color: var(--wp--preset--color--muted); font-size: 15px; margin: 0; }
.cx-project .cx-project__media { margin: calc(-1 * clamp(20px, 3vw, 32px)) calc(-1 * clamp(20px, 3vw, 32px)) 0; border-bottom: 1px solid var(--wp--preset--color--line); aspect-ratio: 16 / 10; overflow: hidden; }
.cx-project .cx-project__media img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; }
.cx-project__foot { margin-top: auto !important; padding-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cx-project__foot a { font-size: 13px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wp--preset--color--ink); text-decoration: none; }
.cx-project__foot a:hover { color: var(--wp--preset--color--accent-text); }
.cx-placeholder { aspect-ratio: 16 / 10; display: grid; place-items: center; text-align: center; padding: 16px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--wp--preset--color--accent) 22%, var(--wp--preset--color--surface)), var(--wp--preset--color--surface) 70%);
  color: var(--wp--preset--color--muted); font-family: var(--wp--preset--font-family--mono); font-size: 12px; }

.cx-projects > .wp-block-column { display: flex; flex-direction: column; }
.cx-projects > .wp-block-column > .cx-project { flex: 1; }
.cx-projects > .wp-block-column:first-child .cx-project__media { aspect-ratio: auto; flex: 1; min-height: 300px; }
.cx-stack { display: flex; flex-direction: column; gap: clamp(16px, 2.4vw, 24px); }
.cx-stack > .cx-project { margin: 0 !important; height: auto; flex: 1; }
.cx-split { gap: clamp(20px, 3vw, 32px) !important; align-items: stretch !important; }
.cx-split .cx-panel--flush { height: 100%; }
.cx-spec > * { margin: 0 !important; }

/* Documentazione */
.cx-docs { width: 100%; border-collapse: collapse; font-size: 15px; }
.cx-docs th { text-align: left; font-size: 11px; font-weight: 650; letter-spacing: 0.16em; text-transform: uppercase; color: var(--wp--preset--color--muted); padding: 0 12px 12px 0; border-bottom: 1px solid var(--wp--preset--color--line); }
.cx-docs td { padding: 16px 12px 16px 0; border-bottom: 1px solid var(--wp--preset--color--line); vertical-align: middle; }
.cx-docs td.cx-mono { font-size: 13px; color: var(--wp--preset--color--muted); white-space: nowrap; }
.cx-docs .cx-doc-title { font-weight: 600; }
.cx-docs td:last-child { text-align: right; padding-right: 0; }
.cx-dl { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--wp--preset--color--ink); border-radius: var(--cx-radius); color: var(--wp--preset--color--ink); text-decoration: none; font-size: 12px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.cx-dl:hover { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--bg); }
@media (max-width: 700px) {
  .cx-docs thead { display: none; }
  .cx-docs tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--wp--preset--color--line); }
  .cx-docs td { border: 0; padding: 0; }
  .cx-docs td:nth-child(2) { grid-column: 1 / -1; }
  .cx-docs td:last-child { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
}
.cx-note { font-size: 13px; color: var(--wp--preset--color--muted); margin-top: 14px; }

/* Chi sono */
.cx-about { gap: clamp(20px, 3vw, 32px) !important; align-items: stretch !important; }
.cx-about .cx-portrait img { aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(1) contrast(1.05); }

/* Contatti */
.cx-contact { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--bg); border-color: var(--wp--preset--color--ink); }
.cx-contact h2, .cx-contact p { color: var(--wp--preset--color--bg); }
.cx-contact .cx-label { color: color-mix(in srgb, var(--wp--preset--color--bg) 60%, transparent); }
.cx-contact a:not(.wp-element-button) { color: var(--wp--preset--color--bg); }
.cx-contact .cx-mono { font-size: 15px; }

/* Footer */
.cx-footer { border-top: 1px solid var(--wp--preset--color--line); background: var(--wp--preset--color--bg); }
.cx-footer__bar { padding: 28px 0; gap: 12px 24px; }
.cx-footer__meta { margin: 0; font-size: 13px; color: var(--wp--preset--color--muted); }
.cx-footer__meta a { color: var(--wp--preset--color--muted); }

/* Colonne: stack su mobile */
@media (max-width: 781px) {
  .cx-hero__media { min-height: 280px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
html { scroll-behavior: smooth; }

/* ---------- Servizi: griglia a moduli (bento) ---------- */
.cx-bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 24px); margin-top: 28px !important; }
.cx-bento > * { margin: 0 !important; }
.cx-span-2 { grid-column: span 2; }
.cx-span-3 { grid-column: span 3; }
.cx-span-4 { grid-column: span 4; }
.cx-span-6 { grid-column: span 6; }
@media (max-width: 960px) {
  .cx-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-span-2 { grid-column: span 1; }
  .cx-span-3, .cx-span-4, .cx-span-6 { grid-column: span 2; }
}
@media (max-width: 600px) {
  .cx-bento { grid-template-columns: 1fr; }
  .cx-span-2, .cx-span-3, .cx-span-4, .cx-span-6 { grid-column: span 1; }
}
.cx-service { display: flex; flex-direction: column; }
.cx-service h3 { font-size: var(--wp--preset--font-size--small-title); margin: 0 0 10px; }
.cx-service p { color: var(--wp--preset--color--muted); font-size: 15px; margin: 0; }
.cx-service p.cx-deliver { margin-top: auto !important; padding-top: 16px; font-family: var(--wp--preset--font-family--mono); font-size: 12px; line-height: 1.5; border-top: 1px solid var(--wp--preset--color--line); }
.cx-service .cx-service__body { display: flex; flex-direction: column; gap: 0; flex: 1; }
.cx-service .cx-service__body > * { margin-top: 0; }
.cx-service .cx-service__body p + p.cx-deliver { margin-top: auto !important; }
.cx-service .cx-service__body > p:not(.cx-deliver) { margin-bottom: 20px; }

.cx-service--split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 0; }
.cx-service--split > .cx-service__body { padding: clamp(20px, 3vw, 32px); }
.cx-service--split > .wp-block-image, .cx-service--split > .cx-placeholder { margin: 0; min-height: 280px; border-left: 1px solid var(--wp--preset--color--line); }
.cx-service--split.cx-service--media-left > .wp-block-image, .cx-service--split.cx-service--media-left > .cx-placeholder { order: -1; border-left: 0; border-right: 1px solid var(--wp--preset--color--line); }
.cx-service--split > .wp-block-image img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; }
.cx-service--split > .cx-placeholder { aspect-ratio: auto; }
@media (max-width: 700px) {
  .cx-service--split { grid-template-columns: 1fr; }
  .cx-service--split > .wp-block-image, .cx-service--split > .cx-placeholder { order: -1; min-height: 200px; border: 0; border-bottom: 1px solid var(--wp--preset--color--line); }
}
.cx-service__media-top { margin: calc(-1 * clamp(20px, 3vw, 32px)) calc(-1 * clamp(20px, 3vw, 32px)) 20px !important; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--wp--preset--color--line); }
.cx-service__media-top img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; }

.cx-service--ink { background: var(--wp--preset--color--ink); border-color: var(--wp--preset--color--ink); }
.cx-service--ink h3, .cx-service--ink p { color: var(--wp--preset--color--bg) !important; }
.cx-service--ink p { opacity: 0.78; }
.cx-service--ink p.cx-deliver { opacity: 0.65; border-top-color: color-mix(in srgb, var(--wp--preset--color--bg) 25%, transparent); }

.cx-service--strip { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cx-service--strip .cx-service__body { flex: 1 1 420px; }
.cx-service--strip .cx-service__body > p:not(.cx-deliver) { margin-bottom: 0; }
.cx-service--strip .wp-block-buttons { margin: 0; }

.cx-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cx-section__head h2 { margin: 0 0 8px; }
.cx-section__head .cx-section__intro { margin: 0; }
.cx-more { font-size: 13px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; margin: 0; }
.cx-more a { color: var(--wp--preset--color--ink); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.cx-more a:hover { color: var(--wp--preset--color--accent-text); }
.cx-hero .wp-block-buttons { gap: 12px; }

/* ---------- Illustrazioni tecniche (maschere SVG, seguono il tema) ---------- */
.cx-illu {
  position: relative; aspect-ratio: 16 / 9; margin: 0 0 22px !important;
  border: 1px solid var(--wp--preset--color--line);
  background-color: var(--wp--preset--color--bg);
  background-image: linear-gradient(var(--cx-grid) 1px, transparent 1px), linear-gradient(90deg, var(--cx-grid) 1px, transparent 1px);
  background-size: 12px 12px; background-position: -1px -1px;
}
.cx-illu::before, .cx-illu::after {
  content: ""; position: absolute; inset: 9% 7%;
  -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat;
}
.cx-illu::before { background: var(--wp--preset--color--muted); opacity: 0.85; }
.cx-illu::after { --m: var(--m2); background: var(--wp--preset--color--accent-text); }
.cx-illu--pcb { --m: url(illu/pcb-base.svg); --m2: url(illu/pcb-accent.svg); }
.cx-illu--fw { --m: url(illu/fw3-base.svg); --m2: url(illu/fw3-accent.svg); }
.cx-illu--proto { --m: url(illu/proto-base.svg); --m2: url(illu/proto-accent.svg); }
.cx-illu--hero { --m: url(illu/hero-base.svg); --m2: url(illu/hero-accent.svg); }
.cx-hero__media > .cx-illu { flex: 1; margin: 0 !important; aspect-ratio: auto; border: 0; min-height: 300px; background-color: var(--wp--preset--color--surface); }
.cx-hero__media > .cx-illu::before, .cx-hero__media > .cx-illu::after { inset: 10% 8%; }
.cx-hero__media .cx-caption span { flex: 1; text-align: center; }
.cx-illu--hmi2 { --m: url(illu/hmi2-base.svg); --m2: url(illu/hmi2-accent.svg); }
.cx-illu--plc { --m: url(illu/plc-base.svg); --m2: url(illu/plc-accent.svg); }
.cx-illu--hmi { --m: url(illu/hmi-base.svg); --m2: url(illu/hmi-accent.svg); }
.cx-illu--mech { --m: url(illu/mech-base.svg); --m2: url(illu/mech-accent.svg); }
.cx-illu--eng { --m: url(illu/eng2-base.svg); --m2: url(illu/eng2-accent.svg); }
.cx-illu::before { -webkit-mask-image: var(--m); mask-image: var(--m); }
.cx-illu::after { -webkit-mask-image: var(--m2); mask-image: var(--m2); }

.cx-service .cx-illu { aspect-ratio: 2 / 1; }
.cx-service--split > .cx-illu { margin: 0 !important; aspect-ratio: auto; min-height: 240px; border: 0; border-left: 1px solid var(--wp--preset--color--line); background-color: var(--wp--preset--color--surface); }
.cx-service--split > .cx-illu::before, .cx-service--split > .cx-illu::after { inset: 16% 12%; }
.cx-service--split.cx-service--media-left > .cx-illu { order: -1; border-left: 0; border-right: 1px solid var(--wp--preset--color--line); }
@media (max-width: 700px) {
  .cx-service--split > .cx-illu, .cx-service--split.cx-service--media-left > .cx-illu { order: -1; min-height: 190px; border: 0; border-bottom: 1px solid var(--wp--preset--color--line); }
}
.cx-service--ink .cx-illu { background-color: transparent; border-color: color-mix(in srgb, var(--wp--preset--color--bg) 22%, transparent); --cx-grid: color-mix(in srgb, var(--wp--preset--color--bg) 7%, transparent); }
.cx-service--ink .cx-illu::before { background: var(--wp--preset--color--bg); opacity: 0.55; }
.cx-service--ink .cx-illu::after { background: #9C80CC; }
:root[data-theme="dark"] .cx-service--ink .cx-illu::after { background: #614495; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cx-service--ink .cx-illu::after { background: #614495; } }

/* Tecnologie (etichette) */
.cx-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px !important; padding: 0; }
.cx-tags > * { margin: 0 !important; }
.cx-tag { font-family: var(--wp--preset--font-family--mono); font-size: 12px !important; padding: 5px 10px; border: 1px solid var(--wp--preset--color--line); border-radius: 2px; color: var(--wp--preset--color--ink) !important; background: var(--wp--preset--color--bg); white-space: nowrap; }
.cx-service--feature .cx-service__body h3 { font-size: var(--wp--preset--font-size--section-title); }
.cx-service--feature .cx-service__body > p:not(.cx-deliver) { font-size: 16px; }


/* ---------- Illustrazione hero: dal disegno al prodotto ---------- */
.cx-hero__media > .cx-hero-art { flex: 1; width: 100%; min-height: 300px; display: block; background-color: var(--wp--preset--color--surface); background-image: linear-gradient(var(--cx-grid) 1px, transparent 1px), linear-gradient(90deg, var(--cx-grid) 1px, transparent 1px); background-size: 12px 12px; }
.cx-hero-art { --paper: #FBFBF8; --f2: color-mix(in srgb, var(--wp--preset--color--surface) 88%, var(--wp--preset--color--ink)); --f3: color-mix(in srgb, var(--wp--preset--color--surface) 76%, var(--wp--preset--color--ink)); }
:root[data-theme="dark"] .cx-hero-art { --paper: #1B1A21; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cx-hero-art { --paper: #1B1A21; } }
.cx-hero-art .s { fill: none; stroke: var(--wp--preset--color--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cx-hero-art .s.m { stroke: var(--wp--preset--color--muted); }
.cx-hero-art .s.ac { stroke: var(--wp--preset--color--accent-text); }
.cx-hero-art .cxg { stroke: var(--wp--preset--color--line); stroke-width: 0.6; }
.cx-hero-art .cxpaper { fill: var(--paper); stroke: var(--wp--preset--color--line); }
.cx-hero-art .cxt { font-family: var(--wp--preset--font-family--mono); font-size: 11px; fill: var(--wp--preset--color--muted); }
.cx-hero-art .cxf1 { fill: var(--wp--preset--color--surface); }
.cx-hero-art .cxf2 { fill: var(--f2); }
.cx-hero-art .cxf3 { fill: var(--f3); }
.cx-hero-art .cxbrand { fill: var(--wp--preset--color--accent); }
.cx-hero-art .cxscreen { fill: #141317; stroke: var(--wp--preset--color--ink); stroke-width: 1.2; }
.cx-hero-art .cxread { font-family: var(--wp--preset--font-family--mono); font-size: 13px; font-weight: 700; fill: var(--wp--preset--color--ok); }
.cx-hero-art .cxled { fill: var(--wp--preset--color--ok); }
.cx-hero-art .cxpencil { fill: var(--wp--preset--color--muted); }
.cx-hero-art .cxlead { fill: var(--wp--preset--color--ink); }
.cx-hero-art .cxeraser { fill: var(--wp--preset--color--accent-text); }
@keyframes cx-led { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.cx-led { animation: cx-led 2.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .cx-led { animation: none; } }

/* Hero in un unico pannello */
.cx-hero-box { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: center; padding: clamp(24px, 4vw, 48px); }
.cx-hero-box__text > * { margin-top: 0; }
.cx-hero-box__text h1 { font-size: var(--wp--preset--font-size--display); max-width: 16ch; margin: 18px 0 16px; }
.cx-hero-box__text .cx-lead { font-size: var(--wp--preset--font-size--lead); color: var(--wp--preset--color--muted); line-height: 1.55; max-width: 46ch; }
.cx-hero-box__text .wp-block-buttons { margin-top: 28px; gap: 12px; }
.cx-hero-box > .cx-hero-art { width: 100%; height: auto; display: block; }
@media (max-width: 860px) { .cx-hero-box { grid-template-columns: minmax(0, 1fr); } .cx-hero-box > .cx-hero-art { max-width: 520px; margin: 0 auto; } }

/* ---------- Animazioni (misurate, disattivate con prefers-reduced-motion) ---------- */
@keyframes cx-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes cx-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cx-flow { to { stroke-dashoffset: -22; } }
@keyframes cx-prod { from { opacity: 0; transform: translate(18px, 10px); } to { opacity: 1; transform: none; } }
@keyframes cx-power { 0% { opacity: 0.15; } 40% { opacity: 1; } 55% { opacity: 0.4; } 100% { opacity: 1; } }
@keyframes cx-pencil { 0% { transform: translate(-46px, -40px); } 70% { transform: translate(-8px, -6px); } 100% { transform: none; } }
@keyframes cx-spark { 0%, 100% { opacity: 0; } 30%, 70% { opacity: 1; } }
.cx-hero-art .dr { stroke-dasharray: 1; animation: cx-draw 1.1s cubic-bezier(.45,.05,.3,1) var(--d, 0s) both; }
.cx-hero-art .fa { animation: cx-fade .6s ease var(--d, 0s) both; }
.cx-hero-art .cxflow { animation: cx-flow 1.6s linear infinite; }
.cx-hero-art .cxprod .s { vector-effect: non-scaling-stroke; }
.cx-hero-art .cxprod { transform-box: fill-box; animation: cx-prod .8s cubic-bezier(.2,.7,.2,1) 1.9s both; }
.cx-hero-art .cxpower { animation: cx-power .9s ease 2.6s both; }
.cx-hero-art .cx-led.cxpower { animation: cx-power .9s ease 2.6s both, cx-led 2.4s ease-in-out 3.5s infinite; }
.cx-hero-art .cxpencil-g { animation: cx-pencil 1.6s cubic-bezier(.45,.05,.3,1) .2s both; }
.cx-hero-art .cxspark { animation: cx-spark 2.4s ease-in-out 3s infinite both; }

/* Comparsa allo scorrimento: solo con JS attivo */
html.cx-js .cx-reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease var(--rd, 0s), transform .7s cubic-bezier(.2,.7,.2,1) var(--rd, 0s); }
html.cx-js .cx-reveal.is-in { opacity: 1; transform: none; }
html.cx-js .cx-illu::after { clip-path: inset(0 100% 0 0); transition: clip-path 1.2s cubic-bezier(.45,.05,.3,1) calc(var(--rd, 0s) + .35s); }
html.cx-js .is-in .cx-illu::after { clip-path: inset(0 0 0 0); }
.cx-service { transition: border-color .2s ease; }
.cx-service:hover { border-color: color-mix(in srgb, var(--wp--preset--color--ink) 35%, var(--wp--preset--color--line)); }

@media (prefers-reduced-motion: reduce) {
  .cx-hero-art *, .cx-hero-art .cxprod, .cx-hero-art .cxpencil-g { animation: none !important; }
  .cx-hero-art .dr { stroke-dasharray: none; }
  .cx-hero-art .cxspark { opacity: 1; }
  html.cx-js .cx-reveal { opacity: 1; transform: none; transition: none; }
  html.cx-js .cx-illu::after { clip-path: none; transition: none; }
}

.cx-illu--inline::before, .cx-illu--inline::after { display: none; }
.cx-illu--inline > .cx-svc-art { position: absolute; inset: 9% 7%; width: 86%; height: 82%; display: block; }
.cx-svc-art .s { stroke-width: 1.6; }
.cx-svc-art .cxknob { fill: var(--wp--preset--color--surface); }

/* ---------- Logo e filigrana ---------- */
.cx-logo a { display: block; line-height: 0; }
.cx-logo__img { display: block; position: relative; width: 168px; aspect-ratio: 1000 / 202; }
.cx-logo__img::before, .cx-logo__img::after { content: ""; position: absolute; inset: 0; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.cx-logo__img::before { --m: url(brand/logo-word.png); background: var(--wp--preset--color--ink); }
.cx-logo__img::after { --m: url(brand/logo-brain.png); background: var(--wp--preset--color--accent-text); }
.cx-logo a:hover .cx-logo__img::before { background: var(--wp--preset--color--accent-text); }
@media (max-width: 600px) { .cx-logo__img { width: 132px; } }

body::after {
  content: ""; position: fixed; z-index: -1; pointer-events: none;
  top: 50%; right: -9vw; width: min(52vw, 760px); aspect-ratio: 1; transform: translateY(-46%) rotate(-8deg);
  -webkit-mask: url(brand/brain.png) center / contain no-repeat; mask: url(brand/brain.png) center / contain no-repeat;
  background: var(--wp--preset--color--accent); opacity: 0.045;
}
:root[data-theme="dark"] body::after { background: var(--wp--preset--color--accent-text); opacity: 0.05; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body::after { background: var(--wp--preset--color--accent-text); opacity: 0.05; } }
@media (max-width: 700px) { body::after { width: 90vw; right: -40vw; opacity: 0.035; } }

/* Residui del vecchio tema */
#qodef-back-to-top { display: none !important; }

/* Disegni dei servizi affiancati: stesso riquadro grigio degli altri */
.cx-service--split > .cx-illu { margin: clamp(20px, 3vw, 32px) clamp(20px, 3vw, 32px) clamp(20px, 3vw, 32px) 0 !important; border: 1px solid var(--wp--preset--color--line) !important; background-color: var(--wp--preset--color--bg) !important; min-height: 220px; }
.cx-service--split.cx-service--media-left > .cx-illu { margin: clamp(20px, 3vw, 32px) 0 clamp(20px, 3vw, 32px) clamp(20px, 3vw, 32px) !important; }
.cx-service--split > .cx-illu::before, .cx-service--split > .cx-illu::after { inset: 12% 10%; }
@media (max-width: 700px) { .cx-service--split > .cx-illu, .cx-service--split.cx-service--media-left > .cx-illu { margin: clamp(20px, 3vw, 32px) clamp(20px, 3vw, 32px) 0 !important; min-height: 180px; } }

/* Motto */
.cx-motto { text-align: center; padding: clamp(24px, 6vw, 72px) 0 0; }
.cx-main p.cx-motto__line { max-width: none; margin: 0 auto; font-family: var(--wp--preset--font-family--brand); font-size: clamp(24px, 4.2vw, 54px); line-height: 1.2; letter-spacing: 0.02em; color: var(--wp--preset--color--ink); }
.cx-motto__accent { color: var(--wp--preset--color--accent-text); }

/* ---------- Pagina Profilo ---------- */
.cx-hero-box--profile { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.cx-hero-box > .cx-portrait-hero { margin: 0; align-self: stretch; }
.cx-hero-box > .cx-portrait-hero img { width: 100%; height: 100%; max-height: 460px; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(1) contrast(1.05); border-radius: 0; border: 1px solid var(--wp--preset--color--line); display: block; }
.cx-now { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px !important; }
.cx-now > * { margin: 0 !important; }
.cx-prose p { font-size: 16.5px; line-height: 1.7; }
.cx-prose p:first-child { font-size: var(--wp--preset--font-size--lead); color: var(--wp--preset--color--ink); }
.cx-prose p + p { margin-top: 1em; }
#percorso .cx-prose p:first-child { font-size: 16.5px; color: inherit; }
.cx-facts { display: flex; flex-direction: column; justify-content: space-between; gap: 22px; }
.cx-fact { padding-bottom: 18px; border-bottom: 1px solid var(--wp--preset--color--line); }
.cx-fact:last-child { border-bottom: 0; padding-bottom: 0; }
.cx-fact > * { margin: 0 !important; }
.cx-fact .cx-label { margin-top: 8px !important; }
.cx-timeline { padding-top: 6px; padding-bottom: 6px; }
.cx-tl__row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 24px; padding: 18px 0; border-bottom: 1px solid var(--wp--preset--color--line); margin: 0 !important; }
.cx-tl__row:last-child { border-bottom: 0; }
.cx-tl__row > * { margin: 0 !important; }
.cx-tl__year { font-family: var(--wp--preset--font-family--mono); font-size: 13px; color: var(--wp--preset--color--muted); padding-top: 3px; }
.cx-tl__row:first-child .cx-tl__year { color: var(--wp--preset--color--accent-text); font-weight: 700; }
.cx-tl__body h3 { font-size: 18px; margin: 0 0 4px; }
.cx-tl__org { margin: 0; color: var(--wp--preset--color--muted); font-size: 15px; }
.cx-pp h3 { font-size: var(--wp--preset--font-size--small-title); margin: 0 0 10px; }
.cx-pp .cx-panel__head { margin-bottom: 16px !important; }
.cx-pp__year { margin: 0; font-size: 13px; color: var(--wp--preset--color--muted); }
@media (max-width: 860px) { .cx-hero-box--profile { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .cx-tl__row { grid-template-columns: 1fr; } }
/* ---------- Mobile: niente sbordi orizzontali e profilo ripaginato ---------- */
html, body { overflow-x: clip; }
.cx-hero-box > *, .cx-panel > *, .wp-block-column { min-width: 0; }
@media (max-width: 860px) {
  .cx-hero-box--profile { gap: 22px; }
  .cx-hero-box--profile > .cx-portrait-hero { order: -1; }
  .cx-hero-box--profile > .cx-portrait-hero img { aspect-ratio: 4 / 5; max-height: 480px; object-position: center 30%; }
  .cx-hero-box--profile .cx-hero-box__text h1 { margin-top: 12px; }
}
@media (max-width: 600px) {
  .cx-hero-box { padding: 20px; }
  .cx-hero-box__text .cx-lead { font-size: 17px; line-height: 1.55; }
  .cx-hero-box__text .wp-block-buttons { margin-top: 22px; }
  .cx-hero-box__text .wp-block-button { flex: 1 1 auto; }
  .cx-hero-box__text .wp-block-button__link { width: 100%; text-align: center; padding-left: 14px; padding-right: 14px; }
  .cx-status { white-space: normal; letter-spacing: 0.1em; line-height: 1.4; }
  .cx-now { flex-direction: column; align-items: flex-start; }
  .cx-prose p { font-size: 15.5px; line-height: 1.65; }
  .cx-prose p:first-child { font-size: 17px; }
  #percorso .cx-prose p:first-child { font-size: 15.5px; }
  .cx-facts { gap: 14px; }
  .cx-fact { padding-bottom: 14px; }
  .cx-readout { font-size: 30px; }
  .cx-tl__row { padding: 14px 0; gap: 2px; }
  .cx-tl__body h3 { font-size: 16.5px; }
  .cx-panel:not(.cx-panel--flush):not(.cx-service--split) { padding: 20px; }
  .cx-panel::before { inset: -4px; --l: 7px; }
}
/* Numeri del profilo in viola */
.cx-fact p.cx-readout { color: var(--wp--preset--color--accent-text); }

/* Animazioni dei servizi */
.cx-svc-art .cxdot { fill: var(--wp--preset--color--accent-text); }
.cx-svc-art .cxnum { font-family: var(--wp--preset--font-family--mono); font-size: 17px; font-weight: 700; fill: var(--wp--preset--color--accent-text); }
.cx-svc-art .cxgap { fill: none; stroke: var(--wp--preset--color--bg); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 10; }
.cx-service--split > .cx-illu--inline > .cx-svc-art { inset: 12% 10%; width: 80%; height: 76%; }

/* ==========================================================
   Catalogo: schede prodotto, progetti, ecosistemi
   ========================================================== */
.cx-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wp--preset--color--muted); margin: 0 0 18px; }
.cx-crumbs a { color: var(--wp--preset--color--muted); text-decoration: none; }
.cx-crumbs a:hover { color: var(--wp--preset--color--accent-text); }
.cx-crumbs [aria-current] { color: var(--wp--preset--color--ink); }
.cx-crumbs__sep { opacity: .5; }

.cx-code { font-family: var(--wp--preset--font-family--mono); font-size: 13px !important; letter-spacing: 0.04em; color: var(--wp--preset--color--muted); margin: 0; }
.cx-hero-box__id { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }

.cx-hero-box--product { align-items: stretch; }
.cx-hero-box--product .cx-hero-box__text { display: flex; flex-direction: column; justify-content: center; }
.cx-hero-box--product .cx-hero-box__text h1 { margin: 14px 0 14px; }
.cx-hero-box__media { margin: 0; min-height: 300px; border: 1px solid var(--wp--preset--color--line); background: var(--wp--preset--color--bg); }
.cx-hero-box__media img { display: block; width: 100%; height: 100%; max-height: 440px; object-fit: cover; }
.cx-hero-box__media--empty { display: grid; place-items: center; background-image: repeating-linear-gradient(135deg, var(--cx-grid) 0 1px, transparent 1px 10px); }
.cx-hero-box__media--empty span { font-family: var(--wp--preset--font-family--mono); font-size: 13px; color: var(--wp--preset--color--muted); }
.cx-specs--hero { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 4px !important; }

.cx-hero-box--eco { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: end; }
.cx-hero-box--eco h1 { max-width: 20ch; }
.cx-specs--eco { grid-template-columns: 1fr 1fr; margin-top: 0 !important; }
@media (max-width: 860px) { .cx-hero-box--eco { grid-template-columns: minmax(0, 1fr); } }

/* Sezioni della scheda */
.cx-scheda > .cx-section:first-child { margin-top: var(--wp--preset--spacing--60) !important; }
.cx-overview { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.cx-overview > * { margin: 0 !important; }
@media (max-width: 860px) { .cx-overview { grid-template-columns: minmax(0, 1fr); } }

.cx-feats { list-style: none; margin: 0; padding: 0; }
.cx-feats li { position: relative; padding: 12px 0 12px 22px; border-bottom: 1px solid var(--wp--preset--color--line); font-size: 15.5px; line-height: 1.5; }
.cx-feats li:last-child { border-bottom: 0; }
.cx-feats li::before { content: ""; position: absolute; left: 0; top: 20px; width: 8px; height: 8px; background: var(--wp--preset--color--accent); }

.cx-spec-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(20px, 3vw, 40px); }
.cx-spec-groups > * { margin: 0 !important; }
.cx-spec-group h3 { font-size: 11px !important; font-weight: 650; letter-spacing: 0.16em; text-transform: uppercase; color: var(--wp--preset--color--accent-text); margin: 24px 0 4px !important; }
.cx-spec-group:nth-child(-n+2) h3 { margin-top: 0 !important; }
.cx-spec-table { margin: 0 !important; }
.cx-spec-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.cx-spec-table td { padding: 10px 12px 10px 0; border: 0; border-bottom: 1px solid var(--wp--preset--color--line); vertical-align: top; line-height: 1.45; }
.cx-spec-table td:first-child { width: 42%; color: var(--wp--preset--color--muted); }
.cx-spec-table td:last-child { padding-right: 0; font-family: var(--wp--preset--font-family--mono); font-size: 13.5px; color: var(--wp--preset--color--ink); }
@media (max-width: 760px) { .cx-spec-groups { grid-template-columns: minmax(0, 1fr); } .cx-spec-group:nth-child(2) h3 { margin-top: 24px !important; } }

.cx-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.cx-gallery > * { margin: 0 !important; }
.cx-gallery figure { margin: 0; }
.cx-gallery img { display: block; width: 100%; height: 260px; object-fit: contain; background: #fff; border: 1px solid var(--wp--preset--color--line); }
.cx-gallery figcaption { font-family: var(--wp--preset--font-family--mono); font-size: 12px; color: var(--wp--preset--color--muted); margin-top: 8px; text-align: left; }

.cx-docs .cx-status { font-size: 10px !important; }

/* Schede (card) di prodotti e progetti */
.cx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; margin-top: 24px; }
.cx-card { display: flex; flex-direction: column; padding: 0 !important; color: var(--wp--preset--color--ink); text-decoration: none; transition: border-color .15s; }
.cx-card:hover { border-color: var(--wp--preset--color--accent-text); }
.cx-card:hover h3 { color: var(--wp--preset--color--accent-text); }
.cx-card__media { aspect-ratio: 4 / 3; overflow: hidden; border-bottom: 1px solid var(--wp--preset--color--line); background: var(--wp--preset--color--bg); }
.cx-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cx-card__ph { height: 100%; display: grid; place-items: center; background-image: repeating-linear-gradient(135deg, var(--cx-grid) 0 1px, transparent 1px 10px); }
.cx-card__ph span { font-family: var(--wp--preset--font-family--mono); font-size: 14px; color: var(--wp--preset--color--muted); }
.cx-card__body { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; flex: 1; }
.cx-card__body > * { margin: 0; }
.cx-card__code { font-family: var(--wp--preset--font-family--mono); font-size: 12px; color: var(--wp--preset--color--muted); }
.cx-card h3 { font-size: 20px; transition: color .15s; }
.cx-card__text { font-size: 14.5px; color: var(--wp--preset--color--muted); line-height: 1.5; }
.cx-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto !important; padding-top: 12px; }
.cx-card__go { font-size: 12px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; margin-left: auto; }
.cx-card__go::after { content: " \2192"; }

@media (max-width: 600px) {
  .cx-hero-box__media { min-height: 220px; }
  .cx-cards { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .cx-spec-table td:first-child { width: 46%; }
}
.cx-hero-box--product .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.cx-cards .cx-card { opacity: 1; }

/* Team del progetto */
.cx-team { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; margin-top: 24px; }
.cx-team > * { margin: 0 !important; }
.cx-member { display: flex; flex-direction: column; gap: 6px; padding: 0 0 20px !important; }
.cx-member > * { margin: 0 !important; padding: 0 20px; }
.cx-member .wp-block-image { padding: 0; margin-bottom: 14px !important; border-bottom: 1px solid var(--wp--preset--color--line); }
.cx-member img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 25%; filter: grayscale(1) contrast(1.05); }
.cx-member h3 { font-size: 18px; }

.cx-member__link { margin-top: 10px !important; }
.cx-member__link a { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--wp--preset--color--ink); text-decoration: none; border-bottom: 1px solid var(--wp--preset--color--line); padding-bottom: 2px; }
.cx-member__link a::after { content: " \2197"; }
.cx-member__link a:hover { color: var(--wp--preset--color--accent-text); border-color: currentColor; }

/* ==========================================================
   3D che si scompone allo scorrimento
   ========================================================== */
.cx-eco-intro > .cx-section:first-child { margin-top: var(--wp--preset--spacing--60) !important; }
.cx-explode { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; margin-top: 24px; }
.cx-explode > * { margin: 0 !important; }
.cx-explode__stage { position: sticky; top: 88px; height: calc(100vh - 120px); min-height: 420px; max-height: 760px; background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); }
.admin-bar .cx-explode__stage { top: 120px; height: calc(100vh - 152px); }
.cx-explode__stage::before { content: ""; position: absolute; inset: -5px; pointer-events: none; --c: var(--cx-corner); --l: 9px; --w: 1.5px;
  background: linear-gradient(var(--c), var(--c)) top left / var(--l) var(--w), linear-gradient(var(--c), var(--c)) top left / var(--w) var(--l), linear-gradient(var(--c), var(--c)) top right / var(--l) var(--w), linear-gradient(var(--c), var(--c)) top right / var(--w) var(--l), linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--w), linear-gradient(var(--c), var(--c)) bottom left / var(--w) var(--l), linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--w), linear-gradient(var(--c), var(--c)) bottom right / var(--w) var(--l); background-repeat: no-repeat; }
.cx-explode__canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; opacity: 0; transition: opacity .6s; }
.cx-explode.is-ready .cx-explode__canvas { opacity: 1; }
.cx-explode__wait { position: absolute; inset: 0; display: grid; place-items: center; margin: 0 !important; font-family: var(--wp--preset--font-family--mono); font-size: 12px !important; color: var(--wp--preset--color--muted); background-image: repeating-linear-gradient(135deg, var(--cx-grid) 0 1px, transparent 1px 10px); transition: opacity .4s; }
.cx-explode.is-ready .cx-explode__wait { opacity: 0; pointer-events: none; }
.cx-explode.is-failed .cx-explode__wait::after { content: " (non disponibile su questo dispositivo)"; }
.cx-explode__hud { position: absolute; left: 16px; bottom: 14px; margin: 0 !important; font-family: var(--wp--preset--font-family--mono); font-size: 12px !important; color: var(--wp--preset--color--muted); z-index: 1; }
.cx-explode__steps { display: flex; flex-direction: column; gap: 0; }
.cx-explode__step { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; margin: 0 !important; padding: 8px 0; opacity: .38; transition: opacity .35s; }
.cx-explode__step:first-child { min-height: 52vh; justify-content: flex-start; padding-top: 12vh; }
.cx-explode__step:last-child { min-height: 60vh; }
.cx-explode__step.is-active, .cx-explode:not(.is-ready) .cx-explode__step { opacity: 1; }
.cx-explode__step > * { margin-top: 0; }
.cx-explode__num { font-family: var(--wp--preset--font-family--mono); font-size: 12px !important; color: var(--wp--preset--color--accent-text); margin: 0 0 10px !important; letter-spacing: .04em; }
.cx-explode__step h3 { font-size: clamp(22px, 2.4vw, 30px); margin: 0 0 12px; line-height: 1.15; }
.cx-explode__step p { font-size: 16.5px; line-height: 1.65; color: var(--wp--preset--color--muted); }
.cx-explode__step .cx-tags { margin-top: 16px !important; }
/* Desktop: la didascalia interna non serve */
.cx-explode__caption { display: none; }
@media (max-width: 860px) {
  .cx-explode { grid-template-columns: minmax(0, 1fr); gap: 0; }
  /* Riquadro fisso a tutta altezza: 3D sopra, testo del capitolo attivo sotto */
  .cx-explode__stage { top: 72px; height: calc(100svh - 96px); min-height: 480px; max-height: none; z-index: 2; }
  .admin-bar .cx-explode__stage { top: 118px; height: calc(100svh - 142px); }
  .cx-explode__canvas { bottom: auto !important; height: 54% !important; }
  .cx-explode__wait { bottom: 46%; }
  .cx-explode__hud { display: none; }
  .cx-explode__caption { display: block; box-sizing: border-box; position: absolute; left: 0; right: 0; bottom: 0; height: 46%; overflow: auto; padding: 18px 18px 20px; border-top: 1px solid var(--wp--preset--color--line); background: var(--wp--preset--color--surface); }
  .cx-explode__caption.is-in { animation: cx-cap-in .35s ease both; }
  @keyframes cx-cap-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  .cx-explode__caption > * { margin-top: 0; }
  .cx-explode__caption h3 { font-size: 20px; margin: 0 0 8px; line-height: 1.2; }
  .cx-explode__caption p { font-size: 15px; line-height: 1.55; color: var(--wp--preset--color--muted); margin: 0 0 10px; }
  .cx-explode__caption .cx-explode__num { margin-bottom: 8px !important; }
  .cx-explode__caption .cx-tags { margin: 8px 0 0 !important; }
  /* I capitoli originali restano nel documento (lettori di schermo, motori) ma fanno solo da guida allo scorrimento */
  .cx-explode.is-ready .cx-explode__steps { margin-top: calc(-100svh + 96px); position: relative; z-index: 1; padding: 0; }
  .cx-explode.is-ready .cx-explode__step, .cx-explode.is-ready .cx-explode__step:first-child, .cx-explode.is-ready .cx-explode__step:last-child { min-height: 70vh; margin: 0 !important; padding: 0; border: 0; background: none; opacity: 0 !important; pointer-events: none; }
  .cx-explode:not(.is-ready) .cx-explode__step { min-height: 0; padding: 16px 0; opacity: 1; }
}
@media (max-width: 860px) and (prefers-reduced-motion: reduce) { .cx-explode__caption.is-in { animation: none; } }
@media (prefers-reduced-motion: reduce) { .cx-explode__canvas, .cx-explode__step { transition: none; } }
/* Intestazione ecosistema con la scheda su piedistallo */
.cx-hero-box--eco3d { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: stretch; }
.cx-hero-box--eco3d .cx-hero-box__text { display: flex; flex-direction: column; justify-content: center; }
.cx-hero-box--eco3d .cx-specs--eco { margin-top: 28px !important; max-width: 420px; }
.cx-turntable { position: relative; min-height: 340px; margin: 0; }
.cx-turntable__poster, .cx-turntable__canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.cx-turntable__poster { object-fit: contain; transition: opacity .6s; }
:root[data-theme="dark"] .cx-turntable__poster { mix-blend-mode: multiply; opacity: .0; }
.cx-turntable__canvas { opacity: 0; transition: opacity .6s; }
.cx-turntable.is-ready .cx-turntable__canvas { opacity: 1; }
.cx-turntable.is-ready .cx-turntable__poster { opacity: 0; }
.cx-turntable__base { position: absolute; left: 14%; right: 14%; bottom: 4%; height: 1px; background: var(--wp--preset--color--line); }
@media (max-width: 860px) { .cx-hero-box--eco3d { grid-template-columns: minmax(0, 1fr); } .cx-turntable { min-height: 260px; order: -1; } }
/* Telefono: lo scorrimento si ferma su ogni capitolo; un tocco sul riquadro porta al successivo */
@media (max-width: 860px) {
  html { scroll-snap-type: y proximity; }
  .cx-explode.is-ready .cx-explode__step { scroll-snap-align: center; scroll-snap-stop: always; }
  .cx-explode.is-ready .cx-explode__stage { cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .cx-explode__caption { padding-bottom: 16px; }
  .cx-explode__caption::after { content: "Tocca per continuare \2193"; display: block; margin-top: 14px; text-align: right; font-family: var(--wp--preset--font-family--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--wp--preset--color--accent-text); }
  .cx-explode__caption[data-last="1"]::after { content: "Tocca per proseguire \2193"; }
}
/* Intestazione scheda prodotto con 3D rotante */
.cx-hero-box__media.cx-turntable { min-height: 360px; background: transparent; }
@media (max-width: 860px) { .cx-hero-box__media.cx-turntable { min-height: 280px; } }

/* ==========================================================
   Software: icona Cortex Interface e schema dell'architettura
   ========================================================== */
.cx-ci-icon .ci-net { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 1.2; }
.cx-ci-icon .ci-nodes circle { fill: #8f78bf; opacity: .75; }
.cx-ci-icon .ci-txt { font-family: var(--wp--preset--font-family--inter), Inter, sans-serif; font-weight: 700; font-size: 76px; fill: #c6aaf3; letter-spacing: -2px; }
.cx-ci-icon .ci-border { fill: none; stroke: #b9a2ea; stroke-width: 7; }
@media (prefers-reduced-motion: no-preference) { .cx-ci-icon .ci-nodes circle { animation: cx-ci-pulse 3.2s ease-in-out infinite; } .cx-ci-icon .ci-nodes circle:nth-child(2n) { animation-delay: 1.1s; } .cx-ci-icon .ci-nodes circle:nth-child(3n) { animation-delay: 2s; } }
@keyframes cx-ci-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

.cx-hero-box__media--svg { display: grid; place-items: center; min-height: 340px; background: transparent; border: 0; }
.cx-hero-box__media--svg .cx-ci-icon { width: min(260px, 70%); height: auto; filter: drop-shadow(0 0 0 transparent); }
.cx-card__svg { height: 100%; display: grid; place-items: center; background: var(--wp--preset--color--bg); }
.cx-card__svg .cx-ci-icon { width: 42%; height: auto; }

.cx-explode__stage[data-mode="svg"] .cx-arch { position: absolute; inset: 28px; width: calc(100% - 56px); height: calc(100% - 56px); }
@media (max-width: 860px) { .cx-explode__stage[data-mode="svg"] .cx-arch { inset: 14px 10px auto; height: calc(54% - 20px); width: calc(100% - 20px); } }
.cx-arch .g { transition: opacity .55s ease, filter .55s ease; }
.cx-arch .d-box { fill: var(--wp--preset--color--surface); stroke: var(--wp--preset--color--line); stroke-width: 1.5; }
.cx-arch .d-box--soft { stroke-dasharray: 4 4; }
.cx-arch .d-box--core { stroke: var(--wp--preset--color--accent-text); stroke-width: 2; }
.cx-arch .d-box--custom { stroke: var(--wp--preset--color--accent-text); stroke-width: 2; stroke-dasharray: 7 5; fill: color-mix(in srgb, var(--wp--preset--color--accent) 7%, var(--wp--preset--color--surface)); }
.cx-arch .d-t1 { font-family: var(--wp--preset--font-family--inter), Inter, sans-serif; font-weight: 650; font-size: 17px; fill: var(--wp--preset--color--ink); }
.cx-arch .d-t2 { font-family: var(--wp--preset--font-family--mono), monospace; font-size: 11.5px; fill: var(--wp--preset--color--muted); }
.cx-arch .d-link { fill: none; stroke: var(--wp--preset--color--line); stroke-width: 2; }
.cx-arch .d-flow { fill: none; stroke: var(--wp--preset--color--accent-text); stroke-width: 2; stroke-dasharray: 6 14; }
@media (prefers-reduced-motion: no-preference) { .cx-arch .d-flow { animation: cx-flow 1.6s linear infinite; } }
@keyframes cx-flow { to { stroke-dashoffset: -40; } }
.cx-arch .t-bi { opacity: 0; transition: opacity .4s; }
.cx-arch .t-gen { transition: opacity .4s; }
/* messa a fuoco per capitolo: 0 core, 1 moduli standard, 2 modulo su misura, 3 esempio, 4 tutto */
[data-step="0"] .cx-arch .g:not(.g-core),
[data-step="1"] .cx-arch .g-custom, [data-step="1"] .cx-arch .g-field,
[data-step="2"] .cx-arch .g-std,
[data-step="3"] .cx-arch .g-std { opacity: .14; filter: grayscale(1); }
[data-step="3"] .cx-arch .t-bi { opacity: 1; }
[data-step="3"] .cx-arch .t-gen { opacity: 0; }

/* Processo modulo su misura */
.cx-process { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: cxp; }
.cx-process > * { margin: 0 !important; padding: 20px 22px 4px 0; border-top: 2px solid var(--wp--preset--color--line); }
.cx-process > *:first-child { border-top-color: var(--wp--preset--color--accent-text); }
.cx-process h3 { font-size: 17px; margin: 10px 0 6px; }
.cx-process h3::before { counter-increment: cxp; content: "0" counter(cxp); display: block; font-family: var(--wp--preset--font-family--mono); font-size: 12px; font-weight: 500; color: var(--wp--preset--color--accent-text); margin-bottom: 8px; }
.cx-process p { font-size: 14.5px; color: var(--wp--preset--color--muted); line-height: 1.55; margin: 0; }
@media (max-width: 860px) { .cx-process { grid-template-columns: minmax(0, 1fr); } .cx-process > * { padding-right: 0; padding-bottom: 14px; } }

/* Moduli */
.cx-modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.cx-modules > * { margin: 0 !important; }
.cx-module h3 { font-size: 18px; margin: 10px 0 6px; }
.cx-module p { font-size: 14.5px; color: var(--wp--preset--color--muted); margin: 0; line-height: 1.55; }
.cx-module .cx-code { margin: 0 !important; }
.cx-module--custom { border-style: dashed; border-color: var(--wp--preset--color--accent-text); }
/* Cortex Suite: icone di famiglia e colore del prodotto */
.cx-suite-icon__t { font-family: var(--wp--preset--font-family--inter), Inter, 'Segoe UI', sans-serif; font-weight: 800; letter-spacing: -5px; }
.cx-hero-box__media--svg .cx-suite-icon { width: min(250px, 66%); height: auto; }
.cx-card__svg .cx-suite-icon { width: 40%; height: auto; }
@media (prefers-reduced-motion: no-preference) { .cx-hero-box__media--svg .cx-suite-icon__nodes circle { animation: cx-ci-pulse 3.2s ease-in-out infinite; } .cx-hero-box__media--svg .cx-suite-icon__nodes circle:nth-child(2n) { animation-delay: 1.1s; } .cx-hero-box__media--svg .cx-suite-icon__nodes circle:nth-child(3n) { animation-delay: 2s; } }
/* Colore del prodotto nello schema: pieno in tema scuro, piu' scuro in tema chiaro per restare leggibile */
:root { --cx-prod-ui: color-mix(in srgb, var(--cx-prod, #9C80CC) 62%, var(--wp--preset--color--ink)); }
:root[data-theme="dark"] { --cx-prod-ui: var(--cx-prod, #9C80CC); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --cx-prod-ui: var(--cx-prod, #9C80CC); } }
.cx-arch .d-box--core, .cx-arch .d-box--custom { stroke: var(--cx-prod-ui); }
.cx-arch .d-flow { stroke: var(--cx-prod-ui); }
.cx-arch .d-box--custom { fill: color-mix(in srgb, var(--cx-prod, #9C80CC) 9%, var(--wp--preset--color--surface)); }
.cx-module--custom { border-color: var(--cx-prod-ui); }
/* Cortex Suite: ruota delle app */
.cx-orbit { position: relative; margin: 0; min-height: 440px; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 84%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 84%, transparent 100%); }
.cx-orbit__ring { position: absolute; border: 1px dashed var(--wp--preset--color--line); border-radius: 50%; pointer-events: none; }
.cx-orbit__track { position: absolute; inset: 0; }
.cx-orbit__item { position: absolute; left: 0; top: 0; display: block; transform-origin: 50% 50%; will-change: transform, opacity; text-decoration: none; cursor: pointer; }
.cx-orbit__item .cx-suite-icon { display: block; width: 100%; height: 100%; }
.cx-orbit__item.is-center .cx-suite-icon { filter: drop-shadow(0 10px 24px color-mix(in srgb, var(--c) 30%, transparent)); }
.cx-orbit__item:focus-visible { outline: 2px solid var(--c); outline-offset: 6px; border-radius: 22%; }
.cx-orbit__label { position: absolute; transform: translateY(-50%); display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 4px; margin: 0; z-index: 200; }
.cx-orbit__name { white-space: nowrap; font-weight: 650; font-size: 18px; color: var(--wp--preset--color--ink); }
.cx-orbit__name::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 10px; vertical-align: middle; background: var(--cx-orbit-c, var(--wp--preset--color--accent)); }
.cx-orbit__note { font-family: var(--wp--preset--font-family--mono); font-size: 12px; color: var(--wp--preset--color--muted); min-height: 1em; }
.cx-orbit:not(.is-ready) .cx-orbit__item { opacity: 0; }
@media (max-width: 860px) { .cx-orbit { min-height: 360px; order: -1; } }
@media (min-width: 861px) { .cx-hero-box--eco3d:has(.cx-orbit) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); } }
@media (max-width: 560px) { .cx-orbit__name { font-size: 15px; } .cx-orbit__note { font-size: 11px; } }

/* Contatore a rotella (profilo) */
.cx-count { font-variant-numeric: tabular-nums; }
.cx-readout .cx-odo, .cx-readout .cx-odo i { font: inherit; color: inherit; margin: 0; letter-spacing: inherit; font-style: normal; }
.cx-readout .cx-odo { display: inline-flex; align-items: flex-start; line-height: 1; vertical-align: baseline; }
.cx-readout .cx-odo__win { display: inline-block; height: 1em; overflow: hidden; line-height: 1; -webkit-mask-image: linear-gradient(transparent 0, #000 18%, #000 82%, transparent 100%); mask-image: linear-gradient(transparent 0, #000 18%, #000 82%, transparent 100%); }
.cx-readout .cx-odo.is-done .cx-odo__win { -webkit-mask-image: none; mask-image: none; }
.cx-readout .cx-odo__col { display: block; transition-property: transform; transition-timing-function: cubic-bezier(.16,.84,.3,1); will-change: transform; }
.cx-readout .cx-odo__col i { display: block; height: 1em; line-height: 1; text-align: center; }
.cx-readout .cx-odo__suf { display: inline-block; opacity: 0; transform: translateY(-0.25em); transition: opacity .35s ease, transform .35s ease; }
.cx-readout .cx-odo.is-done .cx-odo__suf { opacity: 1; transform: none; }

/* ---------- Anatomia della scheda: richiami sul modello 3D ---------- */
.cx-anatomy { position: relative; }
.cx-anatomy__stage { display: none; }
.cx-anatomy__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 28px; counter-reset: cxa; }
.cx-anatomy__item { counter-increment: cxa; position: relative; padding-left: 30px; outline: none; transition: opacity .25s ease; }
.cx-anatomy__item::before { content: counter(cxa, decimal-leading-zero); position: absolute; left: 0; top: 2px; font-family: var(--wp--preset--font-family--mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--wp--preset--color--accent-text); }
.cx-anatomy__name { display: block; font-size: 15px; font-weight: 650; line-height: 1.3; color: var(--wp--preset--color--ink); }
.cx-anatomy__val { display: block; margin-top: 3px; font-size: 13px; line-height: 1.45; color: var(--wp--preset--color--muted); }
.cx-anatomy__item.is-hot .cx-anatomy__name { color: var(--wp--preset--color--accent-text); }
.cx-anatomy.is-ready .cx-anatomy__stage { display: block; position: relative; height: clamp(460px, 50vw, 600px); }
.cx-anatomy__canvas, .cx-anatomy__svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cx-anatomy__svg { pointer-events: none; overflow: visible; }
.cx-anatomy__mark { transition: opacity .25s ease; }
.cx-anatomy__lead { fill: none; stroke: var(--wp--preset--color--ink); stroke-opacity: .5; stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .6s cubic-bezier(.4, 0, .2, 1), stroke-opacity .2s ease; }
.cx-anatomy__dot { fill: var(--wp--preset--color--surface); stroke: var(--wp--preset--color--accent-text); stroke-width: 1.5; opacity: 0; transition: opacity .25s ease; }
.cx-anatomy__ring { fill: none; stroke: var(--wp--preset--color--accent-text); stroke-width: 1; opacity: 0; transform-box: fill-box; transform-origin: center; }
.cx-anatomy__num { fill: var(--wp--preset--color--surface); stroke: var(--wp--preset--color--accent-text); stroke-width: 1.5; display: none; }
.cx-anatomy__numtxt { fill: var(--wp--preset--color--ink); font-size: 10px; font-weight: 650; display: none; }
.cx-anatomy__mark.is-on .cx-anatomy__lead { stroke-dashoffset: 0; }
.cx-anatomy__mark.is-on .cx-anatomy__dot { opacity: 1; }
.cx-anatomy__mark.is-hot .cx-anatomy__lead { stroke: var(--wp--preset--color--accent-text); stroke-opacity: 1; }
.cx-anatomy__mark.is-hot .cx-anatomy__ring { animation: cxa-pulse 1.4s ease-out infinite; }
.cx-anatomy.has-hot .cx-anatomy__mark:not(.is-hot) { opacity: .3; }
@keyframes cxa-pulse { from { transform: scale(1); opacity: .9; } to { transform: scale(3.4); opacity: 0; } }
@media (min-width: 861px) {
  .cx-anatomy.is-ready .cx-anatomy__list { display: block; }
  .cx-anatomy.is-ready .cx-anatomy__item { position: absolute; width: var(--cxa-col, 240px); padding-left: 0; opacity: 0; transform: translateY(6px); transition: opacity .4s ease .3s, transform .4s ease .3s; }
  .cx-anatomy.is-ready .cx-anatomy__item::before { position: static; margin-right: 8px; }
  .cx-anatomy.is-ready .cx-anatomy__item.is-left { text-align: right; }
  .cx-anatomy.is-ready .cx-anatomy__item.is-on { opacity: 1; transform: none; }
  .cx-anatomy.is-ready.has-hot .cx-anatomy__item.is-on:not(.is-hot) { opacity: .4; transition-delay: 0s; }
  .cx-anatomy.is-ready .cx-anatomy__name { display: inline; }
}
@media (max-width: 860px) {
  .cx-anatomy.is-ready .cx-anatomy__stage { height: min(80vw, 380px); margin-bottom: 20px; }
  .cx-anatomy__lead, .cx-anatomy__dot { display: none; }
  .cx-anatomy__num, .cx-anatomy__numtxt { display: inline; opacity: 0; transition: opacity .3s ease; }
  .cx-anatomy__mark.is-on .cx-anatomy__num, .cx-anatomy__mark.is-on .cx-anatomy__numtxt { opacity: 1; }
  .cx-anatomy__mark.is-hot .cx-anatomy__num { fill: var(--wp--preset--color--accent-text); }
  .cx-anatomy__mark.is-hot .cx-anatomy__numtxt { fill: var(--wp--preset--color--surface); }
  .cx-anatomy__item::before { content: counter(cxa); }
}
@media (prefers-reduced-motion: reduce) {
  .cx-anatomy__lead, .cx-anatomy__item, .cx-anatomy__dot, .cx-anatomy__num, .cx-anatomy__numtxt { transition: none !important; }
  .cx-anatomy__mark.is-hot .cx-anatomy__ring { animation: none; opacity: .8; transform: scale(2); }
}
.cx-anatomy.is-picking .cx-anatomy__canvas { cursor: crosshair; }
.cx-anatomy.is-picking .cx-anatomy__item { cursor: pointer; }
.cx-anatomy__item.is-sel { outline: 1px dashed var(--wp--preset--color--accent-text); outline-offset: 4px; }
.cx-anatomy__pick { position: fixed; right: 16px; bottom: 16px; z-index: 9999; width: 340px; padding: 14px; background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); font-size: 13px; box-shadow: 0 8px 30px rgba(0,0,0,.18); }
.cx-anatomy__pick p { margin: 0 0 8px; }
.cx-anatomy__pick textarea { width: 100%; font-family: ui-monospace, monospace; font-size: 12px; margin-bottom: 8px; }
.cx-panel--download { margin-top: 16px; }
.cx-panel--download .cx-label { margin-bottom: 12px !important; }

.cx-docs .cx-doc-title a { color: inherit; text-decoration: none; }
.cx-docs .cx-doc-title a:hover { color: var(--wp--preset--color--accent-text); }
.cx-dl { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; padding: 6px 12px; border: 1px solid var(--wp--preset--color--accent-text); border-radius: 2px; color: var(--wp--preset--color--accent-text); text-decoration: none; white-space: nowrap; }
.cx-dl::before { content: ""; width: 10px; height: 10px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 0v6.5M2 4l3 3 3-3M0 9.5h10' stroke='%23000' stroke-width='1.4' fill='none'/%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 10 10'%3E%3Cpath d='M5 0v6.5M2 4l3 3 3-3M0 9.5h10' stroke='%23000' stroke-width='1.4' fill='none'/%3E%3C/svg%3E") center/contain no-repeat; }
.cx-dl:hover { background: var(--wp--preset--color--accent-text); color: var(--wp--preset--color--surface); }

/* ---------- Esploso a capitoli: richiami di anatomia dentro il riquadro 3D ---------- */
.cx-explode__svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 1; transition: none; }
.cx-explode__labels { position: absolute; inset: 0; margin: 0 !important; padding: 0; list-style: none; pointer-events: none; z-index: 2; counter-reset: cxa; }
.cx-explode__labels .cx-anatomy__item { position: absolute; width: var(--cxa-col, 180px); padding-left: 0; opacity: 0; transform: translateY(6px); transition: opacity .4s ease .3s, transform .4s ease .3s; pointer-events: auto; }
.cx-explode__labels .cx-anatomy__item::before { position: static; margin-right: 6px; }
.cx-explode__labels .cx-anatomy__item.is-left { text-align: right; }
.cx-explode__labels .cx-anatomy__item.is-on { opacity: 1; transform: none; }
.cx-explode__labels .cx-anatomy__name { display: inline; font-size: 13.5px; }
.cx-explode__labels .cx-anatomy__val { font-size: 12px; line-height: 1.4; }
.cx-explode.has-hot .cx-explode__labels .cx-anatomy__item.is-on:not(.is-hot) { opacity: .4; transition-delay: 0s; }
.cx-explode.has-hot .cx-anatomy__mark:not(.is-hot) { opacity: .3; }
@media (min-width: 861px) {
  .cx-explode.is-ready .cx-explode__step .cx-anatomy__list { display: none; }
}
@media (max-width: 860px) {
  .cx-explode__labels { display: none; }
  .cx-explode__svg { bottom: auto; height: 54%; }
  .cx-explode__caption .cx-anatomy__list { grid-template-columns: 1fr 1fr; gap: 6px 14px; margin: 4px 0 0; }
  .cx-explode__caption .cx-anatomy__item { padding-left: 22px; }
  .cx-explode__caption .cx-anatomy__item::before { top: 1px; }
  .cx-explode__caption .cx-anatomy__name { font-size: 13px; font-weight: 600; }
  .cx-explode__caption .cx-anatomy__val { display: none; }
}
@media (prefers-reduced-motion: reduce) { .cx-explode__labels .cx-anatomy__item { transition: none; } }
/* Indice ecosistema: pulsante Scopri la linea */
.cx-section__head .cx-line-cta { margin: 0; flex-shrink: 0; align-self: flex-end; }
.cx-line-cta .wp-block-button__link span { display: inline-block; margin-left: .35em; transition: transform .2s ease; }
.cx-line-cta .wp-block-button__link:hover span { transform: translateX(4px); }
@media (max-width: 781px) { .cx-section__head .cx-line-cta { align-self: flex-start; margin-top: 12px; } }


/* Tagliando "In costruzione" (cx_wip_html) */
.cx-wip__box { position: relative; padding: clamp(28px, 4vw, 44px); background: var(--wp--preset--color--surface); border: 6px solid transparent; border-image: repeating-linear-gradient(-45deg, #F2C200 0 12px, #15131A 12px 24px) 6; max-width: 760px; }
.cx-wip__tag { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.cx-wip__led { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FF8A80, #E53935 55%, #8E1A16); box-shadow: 0 0 10px 2px rgba(229, 57, 53, .65); animation: cx-wip-blink 1.1s steps(1, end) infinite; }
.cx-wip__label { font-family: var(--wp--preset--font-family--mono, monospace); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #E53935; border: 1px solid rgba(229, 57, 53, .55); background: rgba(229, 57, 53, .08); padding: 5px 10px; border-radius: 3px; }
.cx-wip__title { font-size: clamp(22px, 2.6vw, 28px); font-weight: 700; line-height: 1.2; margin: 0 0 10px; color: var(--wp--preset--color--contrast); }
.cx-wip__text { margin: 0; color: var(--wp--preset--color--muted); max-width: 60ch; }
@keyframes cx-wip-blink { 0% { opacity: 1; } 50% { opacity: .18; box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .cx-wip__led { animation: none; } }


/* Modulo contatti (cortex-contatti.php) */
.cx-contact--form { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.cx-contact--form > .cx-contact__info .wp-block-buttons { display: none; }
.cx-contact__info > :first-child { margin-top: 0; }
.cx-form { display: grid; gap: 14px; margin: 0; }
.cx-form p { margin: 0; }
.cx-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cx-form__field { display: grid; gap: 6px; }
.cx-form__field label { font-size: 11px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--wp--preset--color--bg) 65%, transparent); }
.cx-form__field label span { text-transform: none; letter-spacing: 0; font-weight: 400; }
.cx-form input[type=text], .cx-form input[type=email], .cx-form textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; color: var(--wp--preset--color--bg); background: color-mix(in srgb, var(--wp--preset--color--bg) 6%, transparent); border: 1px solid color-mix(in srgb, var(--wp--preset--color--bg) 22%, transparent); border-radius: var(--cx-radius, 4px); padding: 11px 12px; transition: border-color .15s, background-color .15s; }
.cx-form textarea { resize: vertical; min-height: 120px; }
.cx-form ::placeholder { color: color-mix(in srgb, var(--wp--preset--color--bg) 40%, transparent); }
.cx-form input:focus, .cx-form textarea:focus { outline: none; border-color: var(--wp--preset--color--accent); background: color-mix(in srgb, var(--wp--preset--color--bg) 10%, transparent); }
.cx-form .is-invalid { border-color: #E5534B !important; }
.cx-form__check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: color-mix(in srgb, var(--wp--preset--color--bg) 75%, transparent) !important; }
.cx-form__check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--wp--preset--color--accent); flex: none; }
.cx-form__check input.is-invalid { outline: 2px solid #E5534B; outline-offset: 1px; }
.cx-form__check label { color: inherit; }
.cx-form__foot { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.cx-form button[disabled] { opacity: .6; cursor: wait; }
.cx-form__status { font-size: 14px; }
.cx-form__status.is-ok { color: #6FD39B !important; }
.cx-form__status.is-err { color: #FF8A80 !important; }
.cx-form__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 860px) { .cx-contact--form { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .cx-form__row { grid-template-columns: 1fr; } }

/* Selettore lingua (cortex-i18n.php, blocco cortex/lang) */
.cx-lang { display: inline-flex; align-items: center; gap: 2px; }
.cx-lang__item { display: inline-flex; align-items: center; gap: 5px; padding: 5px 6px; border-radius: var(--cx-radius, 4px); font-family: var(--wp--preset--font-family--mono, monospace); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-decoration: none; color: var(--wp--preset--color--muted); opacity: .6; transition: opacity .15s, background-color .15s; }
.cx-lang__item svg { display: block; border-radius: 2px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--wp--preset--color--contrast) 18%, transparent); }
.cx-lang__item:hover, .cx-lang__item:focus-visible { opacity: 1; background: color-mix(in srgb, var(--wp--preset--color--contrast) 8%, transparent); }
.cx-lang__item.is-current { opacity: 1; color: var(--wp--preset--color--contrast); }
@media (max-width: 600px) { .cx-lang__item span { display: none; } .cx-lang__item { padding: 5px 4px; } }

/* Menu mobile a tutto schermo (14/11/2026). Lo sfocato dell'header sta su ::before: con backdrop-filter sull'header
   il pannello fixed del menu restava alto quanto la barra. */
.cx-header { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: transparent; isolation: isolate; }
.cx-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--cx-header-bg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.cx-nav .cx-nav__mobile { display: none; }
@media (max-width: 599px) { .cx-nav .wp-block-navigation__responsive-container-open { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--cx-radius); color: var(--wp--preset--color--ink); } }
.cx-nav .wp-block-navigation__responsive-container.is-menu-open { padding: 0; background: var(--wp--preset--color--bg) !important; color: var(--wp--preset--color--ink) !important; animation: cx-menu-in .22s ease both; }
.cx-nav .is-menu-open .wp-block-navigation__responsive-close { max-width: none; width: 100%; }
.cx-nav .is-menu-open .wp-block-navigation__responsive-dialog { min-height: 100%; }
.cx-nav .is-menu-open .wp-block-navigation__responsive-container-close { top: 12px; right: 16px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--wp--preset--color--line); border-radius: var(--cx-radius); }
.cx-nav .is-menu-open .wp-block-navigation__responsive-container-content { padding: 84px 24px 40px !important; align-items: stretch !important; justify-content: flex-start !important; gap: 0 !important; }
.cx-nav .is-menu-open .wp-block-navigation__container { flex-direction: column; align-items: stretch !important; gap: 0 !important; width: 100%; }
.cx-nav .is-menu-open .wp-block-navigation-item { width: 100%; border-bottom: 1px solid var(--wp--preset--color--line); }
.cx-nav .is-menu-open .wp-block-navigation-item:first-child { border-top: 1px solid var(--wp--preset--color--line); }
.cx-nav .is-menu-open .wp-block-navigation-item__content { box-sizing: border-box; display: flex !important; justify-content: space-between; align-items: center; width: 100%; padding: 22px 4px !important; font-size: 26px !important; font-weight: 700; letter-spacing: -0.01em; text-transform: none; color: var(--wp--preset--color--ink) !important; background: none !important; }
.cx-nav .is-menu-open .wp-block-navigation-item__content::after { content: "\2192"; font-size: 22px; font-weight: 400; color: var(--wp--preset--color--accent-text); }
.cx-nav .is-menu-open .cx-nav__mobile { display: flex; border-bottom: 0; margin-top: 32px; }
.cx-nav .is-menu-open .cx-nav__mobile .wp-block-navigation-item__content { justify-content: center; padding: 17px !important; font-size: 14px !important; letter-spacing: .12em; text-transform: uppercase; color: #fff !important; background: var(--wp--preset--color--accent) !important; border-radius: var(--cx-radius); }
.cx-nav .is-menu-open .cx-nav__mobile .wp-block-navigation-item__content::after { content: none; }
@keyframes cx-menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cx-nav .wp-block-navigation__responsive-container.is-menu-open { animation: none; } }
/* Mobile: icona del menu all'estrema destra, dopo bandierine e tema. */
@media (max-width: 599px) { .cx-header__right > .cx-nav { order: 10; } }
