/* E-commerce sector page (IT v2, 26 Nov): hero system card, search reel styles (chapter 1), «Oggi/Dopo» path, chapters 2–3, «Si misura», end build-up, asks.
   The reel engine and the support app have their own files (ecom-reel, ecom-assist-app). */
.page-ecom {
  --ec-line: color-mix(in srgb, var(--ink) 12%, var(--white));
  --ec-tint: color-mix(in srgb, var(--blue) 7%, var(--white));
  --ec-ok: color-mix(in srgb, var(--ok) 55%, var(--ink));
  --ec-ok-soft: color-mix(in srgb, var(--ok) 10%, var(--white));
  --ec-ok-bar: color-mix(in srgb, var(--ok) 38%, var(--white));
  --ec-sea-ink: color-mix(in srgb, var(--sea) 76%, var(--ink));
}
.ec-symbols { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.ec-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.page-ecom main :focus-visible { outline: 3px solid var(--blue-dark); outline-offset: 3px; }
.no-js .page-ecom main .vf-cta { display: none; }

/* Product line drawings (demo catalogue palette). */
.ec-art-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ec-art-shade { fill: #E8CFA2; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.ec-art-paper { fill: #FFF8EA; stroke: var(--ink); stroke-width: 1.6; }
.ec-art-glow { fill: #FFE2A6; opacity: .6; }
.ec-art-wood { fill: #DDBB8A; stroke: var(--ink); stroke-width: 1.6; }
.ec-art-ash { fill: #EBD9BC; stroke: var(--ink); stroke-width: 1.6; }
.ec-art-bulb { fill: #FFE7B0; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }

/* Hero */
.ec-hero { padding-block: var(--space-32) var(--space-64); }
.ec-hero-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: var(--space-64); }
.ec-hero h1 { font-size: clamp(var(--type-44), 4.4vw, var(--type-56)); }
.ec-hero h1 .thin { display: block; }
.ec-hero .lead { max-width: 34ch; margin-top: var(--space-24); }
.ec-hero .vf-cta { margin-top: var(--space-32); }

/* Search reel (chapter 1, v3 30 Nov): a mini reel on the ecom-reel engine. Elena tries three phrases and today's search
   fails each time (sofas, nothing, «Grande» bulbs); a full-frame card brings in Via Foundry AI; the same phrases then find
   the right lamp, ticks on the top row; the end is a statement, not a figure.
   One search box stays in place across scenes (graphics start at the top); insight lines use the engine's pop style. */
.es-reel .er-graphic { align-content: start; }
.es-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 10px 14px;
  border: 1.5px solid var(--blue-dark);
  border-radius: var(--radius-16);
  background: var(--white);
  font-size: var(--type-17);
  font-weight: 700;
  line-height: 1.3;
  text-align: start;
}
.es-field svg.er-i { margin-top: 1px; color: var(--blue-dark); stroke-width: 2.2; }
.es-count { margin: var(--space-8) 0 0; color: var(--muted); font-size: var(--type-13); font-weight: 700; }
.es-results { display: grid; gap: var(--er-gap); margin: 0; padding: 0; list-style: none; }
.es-reel .es-row { grid-template-columns: 32px minmax(0, 1fr) auto; padding: calc(var(--space-8) / 2) var(--space-8) calc(var(--space-8) / 2) calc(var(--space-8) / 2); border: 1px solid var(--er-line); border-radius: var(--radius-16); background: var(--white); line-height: 1.25; }
.es-reel .es-row .er-thumb { width: 32px; }
.es-reel .es-row .er-thumb svg { width: 26px; height: 26px; }
/* One line per result: the name, then the kind of lamp in grey. */
.es-results .es-row > span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.es-results .es-row :is(b, small) { display: inline; }
.es-results .es-row small { margin-left: .4em; }
.es-hit { display: grid; gap: 2px; padding: 0 0 calc(var(--space-8) / 2); border: 1.5px solid color-mix(in srgb, var(--ok) 45%, var(--white)); border-radius: var(--radius-16); background: var(--white); }
.es-hit .es-row { border: 0; background: none; }
.es-ticks { display: flex; flex-wrap: wrap; gap: calc(var(--space-8) / 2) var(--space-8); margin: 0; padding: 0 var(--space-8); list-style: none; color: var(--er-ok); font-size: var(--type-13); font-weight: 800; line-height: 1.25; }
.es-ticks li { display: flex; align-items: center; gap: calc(var(--space-8) / 2); }
.es-ticks svg.er-i { width: 16px; height: 16px; stroke-width: 2.6; }
.es-empty { display: grid; place-content: center; gap: 4px; margin: var(--space-8) 0 0; padding: clamp(var(--space-16), 4cqh, var(--space-32)) var(--er-inset); border: 1px solid var(--er-line); border-radius: var(--radius-16); background: var(--white); color: var(--muted); text-align: center; }
.es-empty b { color: var(--text-2); font-size: max(var(--type-24), min(5.4cqh, var(--type-32))); font-weight: 900; letter-spacing: -.02em; }
.es-field .es-q { flex: 1; min-width: 0; }
.es-field.is-ai { position: relative; border-color: var(--blue); }
/* The tag sits on the box's top edge, like a fieldset legend, so the phrase keeps the whole width. */
.es-ai-tag { position: absolute; top: -.75em; right: var(--space-16); display: inline-flex; align-items: center; gap: calc(var(--space-8) / 2); padding: 0 calc(var(--space-8) / 2); background: linear-gradient(var(--paper) 50%, var(--white) 50%); line-height: 1.4; color: var(--blue-dark); font-size: var(--type-13); font-weight: 800; white-space: nowrap; }
.es-ai-tag svg { width: 12px; height: 12px; fill: var(--blue); }
/* The beat after the third failed try: the line alone, centred. */
.es-reel .es-beat { align-content: center; align-items: center; }
.es-reel .es-beat .er-insight { font-size: clamp(var(--type-24), 5cqh, var(--type-32)); }
/* «Ora, con Via Foundry AI»: a full-frame title card like the opener, over the header line. */
.er-reel.has-opener .er-stage > .es-ai { grid-row: 1 / -1; z-index: 2; display: grid; place-items: center; padding: var(--er-inset); }
.es-ai .demo-opener.is-title { font-size: clamp(var(--type-24), 5cqh, var(--type-32)); }
/* End: a short statement in the kit's green figure, wrapping to two lines at most (about 40px on a 390 phone). */
.es-reel .es-end .demo-end-figure { max-width: 14ch; font-size: clamp(var(--type-32), 7cqh, var(--type-56)); line-height: 1.05; letter-spacing: -.035em; white-space: normal; text-wrap: balance; }
/* Cover: the opener, the hook, Elena's phrase with the lamp it finds, play. */
.es-cover-card { display: grid; gap: var(--er-gap); width: min(100%, 300px); padding: var(--er-inset); border: 1px solid var(--er-line); border-radius: var(--radius-16); background: var(--white); box-shadow: var(--shadow-1); text-align: start; }
.es-cover-card .es-field { padding: 8px 10px; border-radius: var(--radius-8); font-size: var(--type-15); }
.es-cover-card .es-field svg.er-i { width: 16px; height: 16px; }
.es-cover-card .es-row { padding: 0; border: 0; }

.ec-hook { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 14px var(--space-16); border-top: 1px solid var(--ec-line); background: var(--ec-ok-soft); }
.ec-hook-num { font-size: var(--type-32); font-weight: 900; letter-spacing: -.03em; white-space: nowrap; }
.ec-hook-num span { color: var(--text-2); }
.ec-hook-num strong { color: var(--ec-ok); }
.ec-hook-text { color: var(--text-2); font-weight: 650; }
.ec-hook-text b { color: var(--ink); font-weight: 850; }

/* Hero system card: what the AI reads → the AI (proposes, you approve) → four outcomes, lit one at a time. */
.ec-sys {
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.ec-sys-bar { display: flex; align-items: center; gap: var(--space-8); padding: 10px var(--space-16); border-bottom: 1px solid var(--ec-line); font-size: var(--type-13); }
.ec-sys-bar > span:nth-child(3) { color: var(--muted); font-weight: 700; }
.ec-sys-live { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--ec-ok); font-weight: 800; }
.ec-sys-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.ec-sys svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ec-sys-body { --flow: color-mix(in srgb, var(--blue) 45%, var(--white)); display: grid; padding: var(--space-24) var(--space-16) var(--space-16); background: radial-gradient(120% 70% at 50% 50%, var(--ec-tint), var(--white) 70%); }
.ec-sys-in, .ec-sys-out { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-8); margin: 0; padding: 0; list-style: none; }
.ec-sys-in li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 4px;
  border: 1px solid var(--ec-line);
  border-radius: var(--radius-16);
  background: var(--white);
  color: var(--text-2);
  font-size: var(--type-13);
  font-weight: 800;
}
.ec-sys-in svg { width: 20px; height: 20px; color: var(--ink); }
/* Connectors: short flowing lines from each source into the core, and from the core to each outcome. */
.ec-sys-in li::after, .ec-sys-out li::before {
  content: "";
  position: absolute;
  left: calc(50% - 1px);
  width: 2px;
  height: var(--space-24);
  background: repeating-linear-gradient(to bottom, var(--flow) 0 5px, transparent 5px 10px);
  background-size: 2px 20px;
  animation: ec-flow 1s linear infinite;
}
.ec-sys-in li::after { top: 100%; }
.ec-sys-out li::before { bottom: 100%; }
@keyframes ec-flow { to { background-position: 0 20px; } }
.ec-sys-core {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 12px;
  margin-block: var(--space-24);
  padding: 14px var(--space-16);
  border-radius: var(--radius-16);
  background: var(--blue-dark);
  color: var(--white);
  box-shadow: 0 10px 28px -10px color-mix(in srgb, var(--blue-dark) 70%, transparent);
}
.ec-sys-core-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--white) 18%, transparent); }
.ec-sys-core-mark svg { width: 16px; height: 16px; fill: var(--white); stroke: none; animation: ec-spin 8s linear infinite; }
@keyframes ec-spin { to { transform: rotate(360deg); } }
.ec-sys-core b { font-size: var(--type-17); font-weight: 900; }
.ec-sys-core > span:last-child { font-weight: 650; }
.ec-sys-core strong { font-weight: 900; }
.ec-sys-out { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-24) 12px; }
.ec-sys-out li {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  gap: 2px 10px;
  padding: 12px;
  border: 1px solid var(--ec-line);
  border-radius: var(--radius-16);
  background: var(--white);
  box-shadow: var(--shadow-1);
  animation: ec-lit 8s ease-in-out calc(var(--n) * 2s) infinite;
}
.ec-sys-out li:nth-child(odd)::before { left: 75%; }
.ec-sys-out li:nth-child(even)::before { left: 25%; }
.ec-sys-out li:nth-child(n+3)::before { display: none; }
.ec-sys-ico { grid-row: 1 / 3; align-self: start; display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-8); background: var(--ec-tint); color: var(--blue-dark); }
.ec-sys-ico svg { width: 18px; height: 18px; }
.ec-sys-out b { font-size: var(--type-15); font-weight: 900; line-height: 1.2; }
.ec-sys-out span:not(.ec-sys-ico) { color: var(--text-2); font-size: var(--type-13); font-weight: 650; line-height: 1.35; }
.ec-sys-out strong { grid-column: 1 / -1; align-self: end; margin-top: 6px; color: var(--ec-ok); font-size: var(--type-20); font-weight: 900; letter-spacing: -.02em; }
@keyframes ec-lit {
  0%, 22% { border-color: var(--blue-dark); box-shadow: 0 0 0 1px var(--blue-dark), var(--shadow-2); }
  25%, 100% { border-color: var(--ec-line); box-shadow: var(--shadow-1); }
}
.ec-sys .ec-hook { border-top: 1px solid var(--ec-line); }

/* Between chapters 1 and 2: the customer journey copy (the chart itself is further down, «Il percorso del cliente» v2). */
.ec-path-next { margin-top: var(--space-32); font-size: var(--type-20); font-weight: 750; }
.ec-path-next a { display: inline-flex; align-items: center; gap: 4px; color: var(--blue-dark); font-weight: 850; text-decoration: underline; text-underline-offset: 3px; }
.ec-path-next svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ec-path-note { margin-top: var(--space-8); color: var(--muted); font-size: var(--type-13); }

/* Sections */
.ec-section { padding-block: var(--space-96); border-top: 1px solid var(--line); scroll-margin-top: var(--space-24); }
.ec-section-alt { background: var(--paper-2); }
.ec-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .96fr); align-items: center; gap: var(--space-64); }
.ec-head h2 { max-width: 20ch; }
.ec-head .lead { max-width: 44ch; margin-top: var(--space-24); }
.ec-head-wide { margin-bottom: var(--space-48); }
.ec-head-wide h2 { max-width: none; }
.ec-head-wide .lead { max-width: 64ch; }
.ec-section .kicker { color: var(--blue-dark); }
.ec-result-line { max-width: 44ch; margin-top: var(--space-24); padding: 12px var(--space-16); border-left: 3px solid var(--ok); border-radius: 0 var(--radius-8) var(--radius-8) 0; background: var(--ec-ok-soft); color: var(--ink); font-weight: 700; line-height: 1.45; }
.ec-result-line strong { color: var(--ec-ok); font-weight: 900; white-space: nowrap; }

/* «Si misura» card + the AI's weekly category proposal */
.ec-measure {
  display: grid;
  gap: var(--space-16);
  margin-top: var(--space-48);
  padding: var(--space-16);
  border: 1px solid var(--ec-line);
  border-radius: var(--radius-16);
  background: color-mix(in srgb, var(--paper) 55%, var(--white));
  box-shadow: var(--shadow-2);
  font-variant-numeric: tabular-nums;
}
.ec-measure-card, .ec-ask-ai { padding: var(--space-24); border: 1px solid var(--ec-line); border-radius: var(--radius-16); background: var(--white); box-shadow: var(--shadow-1); }
.ec-measure h3 { font-size: var(--type-20); line-height: 1.2; letter-spacing: -.02em; }
.ec-measure-note { margin-top: 4px; color: var(--muted); font-size: var(--type-15); }
.ec-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-8); margin: var(--space-16) 0 0; }
.ec-kpis > div { display: grid; align-content: start; gap: 4px; min-width: 0; padding: var(--space-16); border: 1px solid var(--ec-line); border-radius: var(--radius-16); }
.ec-kpis .is-key { border-color: color-mix(in srgb, var(--sea) 24%, var(--white)); background: color-mix(in srgb, var(--sea) 9%, var(--white)); }
.ec-kpis dt, .ec-kpis dd { margin: 0; color: var(--muted); font-size: var(--type-13); font-weight: 700; }
.ec-kpis dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; }
.ec-kpis strong { color: var(--ink); font-size: calc(var(--type-24) + var(--space-8) / 2); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; white-space: nowrap; }
.ec-kpis .is-key strong { color: var(--ec-sea-ink); }
.ec-kpis svg { flex-basis: 100%; width: min(100%, 128px); height: 24px; margin-top: 4px; fill: none; stroke: var(--ec-ok); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ec-kpis path { vector-effect: non-scaling-stroke; }
.ec-ask-ai { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-16) var(--space-32); align-items: center; }
.ec-ask-ai-title { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-weight: 800; }
.ec-ask-ai-title svg { width: 14px; height: 14px; fill: var(--blue); }
.ec-ask-ai ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ec-ask-ai li { display: flex; justify-content: space-between; gap: var(--space-16); padding: 6px 10px; border-radius: var(--radius-8); background: var(--paper); color: var(--text-2); font-weight: 650; }
.ec-ask-ai li b { color: var(--ink); font-variant-numeric: tabular-nums; }
.ec-ask-ai-proposal { display: grid; gap: 12px; padding: var(--space-16); border: 1px solid color-mix(in srgb, var(--blue) 25%, var(--white)); border-radius: var(--radius-16); background: var(--ec-tint); }
.ec-ask-ai-proposal p { line-height: 1.45; }
.ec-tag { display: inline-block; margin-right: 4px; padding: 1px 8px; border: 1px solid color-mix(in srgb, var(--blue) 30%, var(--white)); border-radius: var(--radius-pill); background: var(--white); color: var(--blue-dark); font-size: var(--type-13); font-weight: 800; }
.ec-approve { min-height: 44px; display: flex; align-items: center; }
.ec-secondary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-24);
  border: 1px solid var(--blue-dark);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--blue-dark);
  font: 800 var(--type-15)/1 var(--sans);
  cursor: pointer;
}
.ec-secondary:hover { background: var(--blue-soft); }
.no-js .ec-secondary { display: none; }
.ec-approved { display: flex; align-items: center; gap: 6px; color: var(--ec-ok); font-weight: 850; }
.ec-approved svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ec-ask-ai-line { grid-column: 1 / -1; padding-top: 12px; border-top: 1px solid var(--ec-line); color: var(--text-2); font-weight: 650; }
.ec-ask-ai-line strong { color: var(--ink); }

/* Chapter 2 reel */
.ec-reel-figure { display: grid; justify-items: center; margin: 0; }
.ec-reel-caption { margin-top: var(--space-16); color: var(--muted); font-size: var(--type-15); text-align: center; }

/* Asks */
.ec-ask { padding-block: var(--space-96); background: color-mix(in srgb, var(--blue) 13%, var(--paper)); }
.ec-ask .vf-cta { margin-top: var(--space-32); }
/* The close sits on the shared sector ask surface (problem-cards.css .sector-close / .sector-ask). */
.ec-close { scroll-margin-top: var(--space-24); }
.ec-close .lead { max-width: 56ch; margin-top: var(--space-16); }
.ec-chips { display: flex; flex-wrap: wrap; gap: var(--space-8); margin: var(--space-24) 0 0; padding: 0; list-style: none; }
.ec-chips li a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-16); border: 1px solid color-mix(in srgb, var(--blue) 30%, var(--white)); border-radius: var(--radius-pill); background: var(--white); color: var(--blue-dark); font-weight: 750; text-decoration: none; }
.ec-chips li a:hover { border-color: var(--blue-dark); }

/* Chapter 3 app */
.ec-app-wrap { width: min(100%, 1056px); margin-inline: auto; }

/* «Una visita, € 860» (30 Nov): the section's one principal graphic in the kit frame. Kit bars, no tracks: the start a
   neutral tick, the AI steps blue, the total soft green and € 860 the one highlighted figure. The kept € 540 is text only. */
.ec-build-section { background: var(--paper); }
.ec-build { margin: var(--space-48) 0 0; padding: var(--space-48); }
.ec-build-rows { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; font-variant-numeric: tabular-nums; }
.ec-build-rows li { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr) 8.5em; align-items: center; gap: var(--space-16); min-height: 28px; }
.ec-build-label { color: var(--text-2); font-weight: 750; }
.ec-build-lane { --demo-bar-h: 28px; display: flex; align-items: center; min-height: var(--demo-bar-h); }
.ec-build-lane .demo-bar { --w: calc((var(--to) - var(--from)) / 860 * 100%); margin-left: calc(var(--from) / 860 * 100%); transform-origin: left; }
.ec-build-note { margin-left: calc(var(--from) / 860 * 100%); color: var(--text-2); font-size: var(--type-15); font-weight: 750; white-space: nowrap; }
.ec-build-rows b { color: var(--text-2); font-size: var(--type-17); font-weight: 800; text-align: right; white-space: nowrap; }
.is-total { padding-top: 10px; border-top: 1px solid var(--line-soft); }
.is-total .ec-build-label { color: var(--ink); font-weight: 900; }
.is-total .ec-build-lane { --demo-bar-h: 40px; }
.is-total b { color: var(--ec-ok); font-size: var(--type-32); font-weight: 900; }
.ec-build figcaption { margin-top: var(--space-16); color: var(--muted); font-size: var(--type-13); }
.ec-build-line { margin-top: var(--space-32); font-size: var(--type-24); font-weight: 750; line-height: 1.3; letter-spacing: -.01em; max-width: 36ch; }
.ec-build-line span { color: var(--text-2); }
.ec-build-line strong { color: var(--ec-ok); font-weight: 900; }
.ec-build.is-waiting .demo-bar, .ec-build.is-waiting b, .ec-build.is-waiting .ec-build-note { opacity: 0; }
.ec-build.is-drawing .demo-bar { animation: ec-grow .55s cubic-bezier(.2,.7,.2,1) var(--d, 0s) both; }
.ec-build.is-drawing :is(b, .ec-build-note) { animation: ec-fade .3s ease calc(var(--d, 0s) + .35s) both; }
@keyframes ec-grow { from { transform: scaleX(0); } }
@keyframes ec-fade { from { opacity: 0; } }

@media (max-width: 1099px) and (min-width: 900px) {
  .ec-hero-grid { gap: var(--space-32); }
}
@media (max-width: 899px) {
  .ec-hero-grid, .ec-split, .ec-ask-ai { grid-template-columns: minmax(0, 1fr); }
  .ec-hero-grid { gap: var(--space-32); }
  .ec-split { gap: var(--space-32); }
  .ec-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ec-section, .ec-ask { padding-block: var(--space-64); }
  .ec-hero .vf-cta, .ec-ask .vf-cta { width: 100%; }
  .ec-build-rows li { grid-template-columns: minmax(0, 1fr) auto; gap: 4px var(--space-16); }
  .ec-build-lane { --demo-bar-h: 22px; grid-column: 1 / -1; grid-row: 2; }
  .is-kept .ec-build-lane { min-height: 0; }
  .is-total .ec-build-lane { --demo-bar-h: 32px; }
  .ec-build-line { font-size: var(--type-20); }
  .ec-build { margin-top: var(--space-32); padding: var(--space-24) var(--space-16); }
}
@media (max-width: 599px) {
  .ec-hero { padding-top: var(--space-16); }
  .ec-hook-num { font-size: var(--type-24); }
  .ec-measure { padding: var(--space-8); }
  .ec-measure-card, .ec-ask-ai { padding: var(--space-16); }
  .ec-kpis > div { padding: 10px; }
  .ec-kpis strong { font-size: var(--type-20); }
  .ec-sys-body { padding: var(--space-16) 12px 12px; }
  .ec-sys-in { gap: 6px; }
  .ec-sys-in li { padding: 8px 2px; }
  .ec-sys-out { gap: var(--space-24) var(--space-8); }
  .ec-sys-out li { grid-template-columns: minmax(0, 1fr); padding: 10px; }
  .ec-sys-out li { grid-template-rows: auto auto 1fr auto; }
  .ec-sys-ico { grid-row: auto; width: 30px; height: 30px; margin-bottom: 4px; }
  .ec-sys-out strong { font-size: var(--type-17); }
  .ec-path-next { font-size: var(--type-17); }
}
@media (prefers-reduced-motion: reduce) {
  .ec-sys-out li, .ec-sys-core-mark svg, .ec-sys-in li::after, .ec-sys-out li::before { animation: none; }
  .ec-build .demo-bar, .ec-build b, .ec-build-note { animation: none !important; opacity: 1 !important; }
}

/* 27 Nov (Michael): hero is just the AI band and four result cards, in pop colours; no inputs, no connectors. */
.ec-sys-body { padding-top: var(--space-16); }
.ec-sys-core { margin-top: 0; }
.ec-sys-out li::before { display: none; }
.ec-sys-ico { width: 40px; height: 40px; border-radius: var(--radius-8); }
.ec-sys-out li:nth-child(1) .ec-sys-ico { background: color-mix(in srgb, var(--blue) 14%, var(--white)); color: var(--blue-dark); }
.ec-sys-out li:nth-child(2) .ec-sys-ico { background: color-mix(in srgb, var(--sea) 14%, var(--white)); color: var(--sea); }
.ec-sys-out li:nth-child(3) .ec-sys-ico { background: color-mix(in srgb, var(--sunset) 22%, var(--white)); color: color-mix(in srgb, var(--sunset) 55%, var(--ink)); }
.ec-sys-out li:nth-child(4) .ec-sys-ico { background: color-mix(in srgb, var(--ok) 14%, var(--white)); color: color-mix(in srgb, var(--ok) 72%, var(--ink)); }

/* «Il percorso del cliente» v2 (30 Nov): the journey as it is today in pale blue, each drop written plainly in grey.
   Green is «what we did and what it brings back» (Michael, 30 Nov): the two interventions, and on the rows they improve a
   green extension joined to the end of the pale bar, with its gain beside it; 840 is the one big green figure. */
.ec-path-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-48); align-items: center; }
.ec-path-copy .ec-head { margin-bottom: 0; }
.ec-path-copy .ec-path-next { margin-top: var(--space-24); font-size: var(--type-17); }
.ec-journey { width: 100%; max-width: 620px; justify-self: end; margin: 0; padding: var(--space-24); font-variant-numeric: tabular-nums; }
.ec-journey figcaption { margin-bottom: var(--space-16); font-size: var(--type-17); font-weight: 850; }
.ej-rows { display: grid; margin: 0; padding: 0; list-style: none; }
.ej-row, .ej-drop { display: grid; grid-template-columns: minmax(0, 10rem) minmax(0, 1fr) minmax(0, 7.5rem); align-items: center; gap: var(--space-16); }
.ej-row { min-height: 36px; }
.ej-label { font-size: var(--type-15); font-weight: 800; line-height: 1.25; }
.ej-bar { --demo-bar-h: 22px; display: flex; align-items: center; min-width: 0; transform-origin: left; }
.ej-bar .demo-bar { flex: none; min-width: 4px; }
.ej-bar .demo-bar.is-soft:not(:last-child) { border-radius: var(--radius-pill) 0 0 var(--radius-pill); }
.ej-bar .demo-bar.is-result { border-radius: 0 var(--radius-pill) var(--radius-pill) 0; }
.ej-gain { flex: none; margin-left: var(--space-8); color: var(--demo-result-ink); font-size: var(--type-13); font-weight: 900; white-space: nowrap; }
.ej-num { justify-self: end; font-size: var(--type-20); font-weight: 900; letter-spacing: -.02em; white-space: nowrap; }
.ej-num .ej-was { color: var(--text-2); }
.ej-num .ej-now { color: var(--demo-result-ink); }
.ej-drop { min-height: 26px; color: var(--text-2); font-size: var(--type-13); font-weight: 700; }
.ej-drop > :last-child { grid-column: 2; }
.ej-fix { grid-column: 1; color: var(--demo-result-ink); font-size: var(--type-13); font-weight: 800; line-height: 1.25; }
.ej-foot { margin-top: var(--space-16); padding-top: var(--space-16); border-top: 1px solid var(--line-soft); color: var(--text-2); font-weight: 700; line-height: 1.45; }
.ej-foot strong { color: var(--ink); font-weight: 900; white-space: nowrap; }
.ec-journey.is-waiting .ej-bar { transform: scaleX(0); }
.ec-journey.is-drawing .ej-bar { transition: transform .9s cubic-bezier(.2, .7, .2, 1) calc(var(--i, 0) * .12s); }
@media (max-width: 960px) {
  .ec-path-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-32); }
  .ec-journey { justify-self: stretch; max-width: none; }
}
@media (max-width: 599px) {
  .ec-journey { padding: var(--space-16); }
  .ej-row { grid-template-columns: minmax(0, 1fr) auto; gap: calc(var(--space-8) / 2) var(--space-16); padding-top: var(--space-8); }
  .ej-bar { grid-column: 1 / -1; grid-row: 2; --demo-bar-h: 18px; }
  .ej-num { grid-column: 2; grid-row: 1; font-size: var(--type-17); }
  .ej-drop { grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-16); }
  .ej-drop > :last-child { grid-column: 2; justify-self: end; }
}
@media (prefers-reduced-motion: reduce) { .ec-journey .ej-bar { transform: none !important; transition: none !important; } }

/* Hero, calm (30 Nov): the AI is a white pill with blue text and a still sparkle; the four tiles are quiet (no cycling
   outline, figures in ink, no icon discs) and «600 → 840» is the one green result. */
.ec-sys-body { background: var(--white); }
.ec-sys-core { justify-self: center; gap: 4px var(--space-8); padding: 10px var(--space-24); border: 1px solid var(--line-soft); border-radius: var(--radius-pill); background: var(--white); color: var(--blue-dark); box-shadow: var(--shadow-1); }
.ec-sys-core-mark { width: auto; height: auto; background: none; }
.ec-sys-core-mark svg { width: 14px; height: 14px; fill: var(--blue); animation: none; }
.ec-sys-out li { grid-template-columns: minmax(0, 1fr); animation: none; }
.ec-sys-out strong { color: var(--ink); font-weight: 800; }
/* Icon discs stay (Michael, 30 Nov: friendlier than text only); the subtitles went instead. */
.ec-sys-out li { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: center; }
.ec-sys-ico { grid-row: 1; }
@media (max-width: 599px) { .ec-sys-core { flex-wrap: nowrap; padding: 8px var(--space-16); white-space: nowrap; } .ec-sys-core b { font-size: var(--type-15); } .ec-sys-core > span:last-child { font-size: var(--type-13); }
  .ec-sys-out li { grid-template-columns: auto minmax(0, 1fr); } .ec-sys-ico { width: 30px; height: 30px; margin: 0; } }
