/* Indicatori di sentiment: racconto dimostrativo, isolato dal widget e dall'app. */
.sentiment-detail { background: #fff; }
.sentiment-detail__figure { margin: 48px 0 0; }
.sentiment-flow .lead-flow__steps,
.sentiment-flow .lead-flow__screens { grid-template-columns: minmax(0, .95fr) minmax(0, 1fr) minmax(0, 1.16fr); gap: 24px; }
.sentiment-flow .lead-flow__screen { padding: 20px; }
.sentiment-flow .lead-flow__screen + .lead-flow__screen::before { left: -23px; }
.sentiment-flow__eyebrow { margin-bottom: 8px; color: #666; font: 500 10px/1.5 'JetBrains Mono', monospace; letter-spacing: .06em; text-transform: uppercase; }
.sentiment-flow__description { margin: 0 0 22px; color: #555; font: 400 13px/1.65 'Montserrat', sans-serif; }
.sentiment-flow__field-label { display: block; margin: 0 0 8px; font: 500 12px/1.5 'JetBrains Mono', monospace; }
.sentiment-flow__add-row { display: flex; align-items: center; gap: 7px; }
.sentiment-flow__input { flex: 1; min-width: 0; padding: 12px 10px; border: 1px solid #bbb; border-radius: 7px; background: #f6f6f6; font: 400 14px/1.5 'Montserrat', sans-serif; }
.sentiment-flow__typed { display: inline-block; }
.sentiment-flow__add { flex-shrink: 0; padding: 13px 8px; border-radius: 7px; background: #111; color: #fff; font: 500 11px/1.5 'JetBrains Mono', monospace; }
.sentiment-flow__indicator { margin-top: 24px; padding: 17px; border: 1px solid #111; border-radius: 9px; background: #fff; }
.sentiment-flow__indicator-name { display: flex; justify-content: space-between; gap: 12px; font: 600 19px/1.4 'JetBrains Mono', monospace; }
.sentiment-flow__active { display: block; margin-top: 10px; font: 400 11px/1.5 'Montserrat', sans-serif; color: #555; }
.sentiment-flow__scope { margin-top: 26px; padding-top: 20px; border-top: 1px solid #ddd; font: 400 12px/1.65 'Montserrat', sans-serif; }
.sentiment-flow__scope strong { display: block; margin-bottom: 9px; font: 500 12px/1.5 'JetBrains Mono', monospace; }
.sentiment-flow__scope-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.sentiment-flow__scope-tags span { border: 1px solid #ddd; background: #f5f5f5; border-radius: 4px; padding: 5px 7px; font-size: 11px; }
.sentiment-flow__chat { overflow: hidden; border: 1px solid #222; border-radius: 15px; background: #fff; }
.sentiment-flow__crop { position: relative; overflow: hidden; filter: grayscale(1); background: #fff; }
.sentiment-flow__crop img { display: block; width: 100%; height: auto; }
.sentiment-flow__crop--header { aspect-ratio: 457 / 72; background: #000; }
.sentiment-flow__crop--header img { transform: translateY(-1.5625%); }
.sentiment-flow__crop--footer { aspect-ratio: 457 / 116; border-top: 1px solid #ddd; container-type: inline-size; }
.sentiment-flow__crop--footer img { position: absolute; bottom: 0; }
.sentiment-flow__chat-placeholder { position: absolute; left: 7%; right: 24%; top: 26%; height: 25%; display: flex; align-items: center; padding-left: 1%; background: #fff; color: #808080; font: 400 3.94cqi/1.25 Arial, sans-serif; }
.sentiment-flow__messages { padding: 18px 12px; min-height: 250px; font: 400 13px/1.65 'Montserrat', sans-serif; }
.sentiment-flow__visitor { margin: 0 0 20px 12px; padding: 13px; border-radius: 13px 13px 2px 13px; background: #111; color: #fff; }
.sentiment-flow__reply { margin: 0 16px 0 0; padding: 13px; border-radius: 13px 13px 13px 2px; background: #f0f0f0; }
.sentiment-flow__reading { margin-top: 20px; padding-top: 16px; border-top: 1px solid #ddd; font: 400 12px/1.6 'Montserrat', sans-serif; }
.sentiment-flow__reading-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; font: 500 12px/1.5 'JetBrains Mono', monospace; }
.sentiment-flow__mixed { padding: 4px 8px; border: 1px solid #999; border-radius: 4px; background: #eee; }
.sentiment-flow__reason { display: flex; gap: 8px; margin: 5px 0; }
.sentiment-flow__reason b { width: 15px; text-align: center; font-family: 'JetBrains Mono', monospace; }
.sentiment-flow__period { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 18px; }
.sentiment-flow__period strong { font: 600 18px/1.5 'JetBrains Mono', monospace; }
.sentiment-flow__period span { font: 400 10px/1.5 'Montserrat', sans-serif; color: #666; }
.sentiment-flow__chart { display: block; width: 100%; height: auto; overflow: visible; }
.sentiment-flow__chart text { fill: #666; font: 400 11px 'Montserrat', sans-serif; }
.sentiment-flow__plot { fill: none; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.sentiment-flow__plot--positive { stroke: #111; }
.sentiment-flow__plot--negative { stroke: #777; stroke-dasharray: 7 4; }
.sentiment-flow__plot--mixed { stroke: #aaa; stroke-dasharray: 2 4; }
.sentiment-flow__lines { clip-path: inset(0); }
.sentiment-flow__distribution { display: flex; height: 10px; overflow: hidden; border-radius: 3px; margin-top: 18px; }
.sentiment-flow__distribution span:nth-child(1) { width: 60%; background: #111; }
.sentiment-flow__distribution span:nth-child(2) { width: 25%; background: #777; }
.sentiment-flow__distribution span:nth-child(3) { width: 15%; background: #d3d3d3; }
.sentiment-flow__legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 10px 0 18px; font: 400 10px/1.5 'Montserrat', sans-serif; }
.sentiment-flow__legend b { display: block; margin-bottom: 3px; font: 600 20px/1.4 'JetBrains Mono', monospace; }
.sentiment-flow__sample { padding: 12px 0; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; color: #555; font: 400 11px/1.6 'Montserrat', sans-serif; }
.sentiment-flow__sample strong { color: #111; font-weight: 600; }
.sentiment-flow__evidence { margin-top: 18px; font: 400 12px/1.65 'Montserrat', sans-serif; }
.sentiment-flow__evidence strong { display: block; margin-bottom: 8px; font: 500 12px/1.5 'JetBrains Mono', monospace; }
.sentiment-flow__evidence blockquote { margin: 0; padding: 10px 12px; border-left: 3px solid #111; background: #f4f4f4; }
.sentiment-flow__evidence-link { display: block; margin-top: 12px; font: 500 11px/1.5 'JetBrains Mono', monospace; }
.sentiment-flow__progress { position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: #111; transform: scaleX(0); transform-origin: left; }
.sentiment-flow[data-enhanced][data-phase="0"] .sentiment-flow__typed { animation: sentiment-type 1.2s .3s steps(5, end) both; }
.sentiment-flow[data-enhanced][data-phase="0"] .sentiment-flow__add { animation: sentiment-press .5s 1.7s both; }
.sentiment-flow[data-enhanced][data-phase="0"] .sentiment-flow__indicator { animation: sentiment-arrive .5s 2.3s both; }
.sentiment-flow[data-enhanced]:not([data-phase="2"]) .sentiment-flow__chart-result { opacity: .25; }
.sentiment-flow[data-enhanced][data-phase="0"] .sentiment-flow__visitor,
.sentiment-flow[data-enhanced][data-phase="0"] .sentiment-flow__reply,
.sentiment-flow[data-enhanced][data-phase="0"] .sentiment-flow__reading { opacity: 0; }
.sentiment-flow[data-enhanced][data-phase="1"] .sentiment-flow__visitor { animation: sentiment-arrive .65s .3s both; }
.sentiment-flow[data-enhanced][data-phase="1"] .sentiment-flow__reply { animation: sentiment-arrive .65s 1.8s both; }
.sentiment-flow[data-enhanced][data-phase="1"] .sentiment-flow__reading { animation: sentiment-arrive .65s 3s both; }
.sentiment-flow[data-enhanced][data-phase="2"] .sentiment-flow__lines { animation: sentiment-type 1.6s .2s ease-out both; }
.sentiment-flow[data-enhanced][data-phase="2"] .sentiment-flow__distribution { animation: sentiment-type 1.2s .5s ease-out both; }
.sentiment-flow[data-enhanced][data-phase="2"] .sentiment-flow__evidence { animation: sentiment-arrive .65s 1.6s both; }
.sentiment-flow[data-enhanced] .lead-flow__step[aria-current="step"] .sentiment-flow__progress { animation: sentiment-progress var(--sentiment-duration, 7s) linear both; }
.sentiment-flow[data-enhanced] .lead-flow__step[aria-current="step"] { border-bottom-color: #ccc; }
.sentiment-flow[data-manual="true"] * { animation: none !important; }
.sentiment-flow[data-manual="true"] .lead-flow__step[aria-current="step"] .sentiment-flow__progress { transform: scaleX(1); }
.sentiment-detail__captions { margin-top: 28px; }
@keyframes sentiment-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@keyframes sentiment-arrive { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes sentiment-press { 50% { transform: scale(.96); background: #555; } }
@keyframes sentiment-progress { to { transform: scaleX(1); } }
@media (min-width: 1100px) and (max-width: 1279px) {
  .sentiment-flow .lead-flow__steps, .sentiment-flow .lead-flow__screens { gap: 20px; padding-inline: 18px; }
  .sentiment-flow .lead-flow__screen { padding: 14px; }
  .sentiment-flow .lead-flow__screen + .lead-flow__screen::before { left: -20px; }
  .sentiment-flow__messages { font-size: 12px; padding-inline: 9px; }
}
@media (max-width: 1099px) {
  .sentiment-flow .lead-flow__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .sentiment-flow .lead-flow__screens { grid-template-columns: 1fr; gap: 28px; }
  .sentiment-flow .lead-flow__screen { padding: 24px; }
  .sentiment-flow .lead-flow__screen + .lead-flow__screen::before { left: calc(50% - 8px); }
  .sentiment-flow__chat { max-width: 360px; margin-inline: auto; }
  .sentiment-flow__chart { max-height: 240px; }
}
@media (max-width: 639px) {
  .sentiment-detail__figure { margin-top: 32px; }
  .sentiment-flow .lead-flow__screen { padding: 16px; }
  .sentiment-flow .lead-flow__step { font-size: 11px; }
  .sentiment-flow .lead-flow__screens { padding-inline: 12px; }
  .sentiment-flow__messages { min-height: 220px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .sentiment-flow * { animation: none !important; transition: none !important; }
  .sentiment-flow .sentiment-flow__progress { transform: scaleX(1); }
}
