/* ==========================================================================
   Griglie animate di LeadWin: griglia della home e riquadri.
   Le figure le disegna js/griglia/kit/griglia.js, con il kit della skill Stageshow.
   ========================================================================== */

.bt {
  display: grid; gap: 20px; padding: 28px var(--gutter) 56px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: 430px 350px 350px;
  grid-template-areas: 'pipe pipe wa' 'tools rr wa' 'cal ly ly';
}
.bt-t {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--paper); overflow: hidden;
}
.bt-pipe { grid-area: pipe; background: radial-gradient(90% 90% at 12% 0%, rgba(61,126,255,0.16) 0%, transparent 60%), radial-gradient(80% 80% at 90% 8%, rgba(140,207,248,0.24) 0%, transparent 62%), #F4F7FD; }
.bt-wa { grid-area: wa; background: #DDF4E3; }
.bt-tools { grid-area: tools; background: var(--ink); border-color: var(--ink); }
.bt-rr { grid-area: rr; }
.bt-cal { grid-area: cal; container-type: inline-size; }
.bt-ly { grid-area: ly; flex-direction: row; background: var(--blue-soft); border-color: var(--blue-soft); }

.bt-copy { position: relative; z-index: 1; padding: 26px 28px 0; }
.bt-copy h3 { font-size: 1.375rem; line-height: 1.2; }
.bt-copy p { margin-top: 8px; max-width: 46ch; font-size: 0.9375rem; line-height: 1.5; color: var(--ink-3); }
.bt-wa .bt-copy p, .bt-ly .bt-copy p { color: var(--ink-2); }
.bt-pic { position: relative; flex: 1; min-height: 0; margin-top: 20px; }
.bt-tools h3 { color: #fff; font-size: 1.375rem; line-height: 1.2; }
.bt-tools h3 b { display: block; margin-bottom: 4px; font-size: 4.5rem; font-weight: 600; line-height: 1; letter-spacing: -0.04em; }
.bt-ly .bt-copy { flex: 0 0 38%; }

@media (max-width: 1120px) {
  .bt {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 430px 350px 350px 350px 340px;
    grid-template-areas: 'pipe pipe' 'wa rr' 'wa tools' 'ly ly' 'cal cal';
  }
}
@media (max-width: 720px) {
  .bt {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 470px 620px 350px 330px 340px auto;
    grid-template-areas: 'pipe' 'wa' 'rr' 'tools' 'cal' 'ly';
    gap: 14px; padding: 16px var(--gutter) 40px;
  }
  .bt-copy { padding: 22px 22px 0; }
  .bt-copy h3 { font-size: 1.25rem; }
  .bt-ly { flex-direction: column; }
  .bt-ly .bt-copy { flex: none; }
}

/* La griglia col kit. Griglia e testi restano in css/light-bento.css; qui le figure. */

/* il marchio LeadWin sui gettoni del kit */
.kg .ss-stage {
  --ss-accent: #3d7eff;
  --ss-accent-2: #3d7eff;
  --ss-accent-text: #1f5ee0;
  --ss-accent-soft: #e8f0ff;
  --ss-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ss-text-strong: #0b1322;
  --ss-text: #3a4760;
  --ss-text-faint: #5f6b85;
  --ss-surface: #fff;
  --ss-canvas: #f4f6fb;
  --ss-line: rgba(11, 19, 34, 0.09);
  --ss-line-faint: rgba(11, 19, 34, 0.06);
  background: transparent;
  overflow: hidden;
}
.kg .kg-mark { display: inline-grid; flex: none; place-items: center; width: 14px; height: 14px; color: var(--ss-accent); }
.kg .kg-mark svg { display: block; width: 14px; height: 14px; }

/* il riquadro possiede il taglio: niente maschere ereditate dalla griglia a mano */
.bt-pipe .bt-pic { margin-top: 0; -webkit-mask-image: none; mask-image: none; }
/* una card in piu' sopra il taglio, e al telefono la conversazione intera */
@media (min-width: 1121px) { .bt { grid-template-rows: 450px 350px 350px; } }
@media (max-width: 1120px) and (min-width: 721px) { .bt { grid-template-rows: 450px 390px 390px 350px 340px; } }
@media (max-width: 720px) { .bt { grid-template-rows: 450px 760px 350px 330px 340px auto; } }
.bt-pic .ss-fit { max-width: none; }
.bt-tools .bt-pic { margin-top: 0; }
.bt-cal .bt-pic { margin-top: 14px; }

/* --- pipeline --- */
.kg-pipe .kg-win { position: absolute; box-shadow: var(--ss-shadow-hero); }
.kg-pipe .kg-tools-bar { display: inline-flex; gap: 6px; }
.kg-pipe .kg-board { display: grid; grid-template-columns: repeat(4, 196px); align-items: stretch; gap: 10px; padding: 12px; background: #fff; height: 100%; }
.kg-pipe .kg-board[data-narrow] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px; }
.kg-pipe .kg-col { min-width: 0; min-height: 0; overflow: hidden; padding: 8px; border-radius: 10px; background: var(--ss-canvas); }
.kg-pipe .kg-col__head { display: flex; align-items: center; gap: 6px; padding: 2px 4px 8px; font-size: 12px; line-height: 1.3; }
.kg-pipe .kg-col__title { font-weight: 600; color: var(--ss-text); }
.kg-pipe .kg-col__n { color: var(--ss-text-faint); font-weight: 500; }
.kg-pipe .kg-col__list { display: flex; flex-direction: column; gap: 8px; }
.kg-card { display: flex; flex-direction: column; justify-content: center; gap: 8px; min-width: 0; box-sizing: border-box; height: 66px; padding: 0 12px; border-radius: 9px; background: #fff; box-shadow: 0 0 0 1px var(--ss-line), 0 1px 2px rgba(11, 19, 34, 0.04); will-change: transform; }
.kg-card--plain { height: 40px; }
.kg-card__who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kg-card__name { font-size: 13px; line-height: 1.3; font-weight: 600; color: var(--ss-text-strong); }
.kg-card--plain .kg-card__name { font-weight: 500; color: var(--ss-text); }
.kg-card__meta { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kg-card__meta .kg-mark { width: 20px; }
.kg-card__src { font-size: 11px; line-height: 1.3; color: var(--ss-text-faint); }
.kg-card__score { margin-left: auto; flex: none; font-size: 11px; }
.kg-board[data-narrow] .kg-card__src { display: none; }
.kg-board[data-narrow] .kg-card { padding: 0 10px; }
.kg-board[data-narrow] .kg-card__who .ss-avatar { display: none; }
.kg-board[data-narrow] .kg-card__meta .kg-mark { width: 14px; }
.kg-board[data-narrow] .kg-card__score { margin-left: auto; }
.kg-arrive { animation: kg-arrive 0.55s cubic-bezier(0.25, 0.8, 0.25, 1) both; }
@keyframes kg-arrive { from { opacity: 0; transform: translateY(-14px); } }
.kg-carry { position: absolute; left: 0; top: 0; z-index: 30; border-radius: 9px; rotate: 1.5deg; scale: 1.03; box-shadow: var(--ss-shadow-lift); will-change: transform; animation: kg-lift 0.18s ease-out both; }
.kg-carry[data-settle] { animation: kg-settle 0.2s ease both; }
@keyframes kg-lift { from { rotate: 0deg; scale: 1; box-shadow: 0 0 0 0 transparent; } }
@keyframes kg-settle { to { rotate: 0deg; scale: 1; box-shadow: 0 0 0 0 transparent; } }

/* --- assegnazione --- */
.kg-rr__src { position: absolute; left: 28px; top: 50%; translate: 0 -50%; z-index: 21; display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px rgba(11, 19, 34, 0.16); font-size: 12px; line-height: 1.3; font-weight: 600; color: var(--ss-text-strong); white-space: nowrap; }
.kg-rr__list { position: absolute; right: 28px; top: 50%; translate: 0 -50%; z-index: 21; display: flex; flex-direction: column; gap: 8px; width: 168px; }
.kg-rr__agent { display: flex; align-items: center; gap: 8px; height: 44px; box-sizing: border-box; padding: 0 12px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px var(--ss-line); transition: background-color 0.2s ease; }
.kg-rr__agent[data-on] { background: #eef4ff; }
.kg-rr--tight .kg-rr__src { left: 18px; }
.kg-rr--tight .kg-rr__list { right: 18px; width: 158px; }
.kg-rr--tight .kg-rr__agent .ss-avatar { display: none; }
.kg-rr__name { min-width: 0; font-size: 13px; line-height: 1.3; font-weight: 500; color: var(--ss-text-strong); }
.kg-rr__n { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--ss-text-faint); }
.kg-rr__agent[data-on] .kg-rr__n { color: var(--ss-accent-text); }
.kg-line-base .ss-connector__line { stroke: rgba(11, 19, 34, 0.14); }
.kg-line-live .ss-connector__line, .kg-line-live .ss-connector__reveal { transition-duration: 0.62s, 0.25s; }

/* --- Agente AI --- */
.kg-wa .kg-wa__phone { position: absolute; }
.kg-wa .kg-wa__phone .ss-phone__content { display: flex; flex-direction: column; padding-top: 0; }
.kg-wa__head { display: flex; align-items: center; gap: 12px; padding: 62px 18px 18px; background: #fff; border-bottom: 1px solid var(--ss-line); }
.kg-wa__ava { display: grid; flex: none; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #25d366; color: #fff; }
.kg-wa__ava svg { width: 24px; height: 24px; }
.kg-wa__who { display: flex; flex-direction: column; gap: 2px; min-width: 0; transition: opacity 0.2s ease; }
.kg-wa__who[data-faded] { opacity: 0; }
.kg-wa__name { font-size: 17px; line-height: 1.3; font-weight: 600; color: var(--ss-text-strong); }
.kg-wa__role { font-size: 14px; line-height: 1.3; color: var(--ss-text-faint); }
.kg-wa__pane { flex: 1; min-height: 0; background: #efeae2; overflow: hidden; }
.kg-wa__body { height: 100%; will-change: transform; transition: opacity 0.2s ease, translate 0.2s ease; }
.kg-wa__body[data-faded] { opacity: 0; translate: 0 8px; }
.kg-wa .kg-wa__thread { height: 100%; justify-content: flex-start; padding: 8px 14px 12px; gap: 4px; --ss-them: #fff; --ss-them-text: #0b1322; --ss-me: #d9fdd3; --ss-me-text: #0b1322; }
.kg-wa .ss-stamp { color: var(--ss-text-faint); }
.kg-wa__tag { display: block; margin-bottom: 3px; font-size: 13px; font-weight: 600; color: #128c4b; }
.kg-wa__sheet { flex: none; }
.kg-wa__times { display: flex; flex-direction: column; margin: 6px 0 6px auto; width: 82%; border-radius: 16px; background: #fff; overflow: hidden; box-shadow: 0 1px 1px rgba(11, 19, 34, 0.08); }
.kg-wa__time { display: flex; align-items: center; height: 46px; padding: 0 16px; font-size: 16px; font-weight: 500; color: #128c4b; border-top: 1px solid var(--ss-line-faint); transition: background-color 0.15s ease; }
.kg-wa__time:first-child { border-top: 0; }
.kg-wa__time[data-on] { background: #d9fdd3; }
.kg-wa__booked { display: flex; align-items: center; justify-content: center; gap: 8px; width: max-content; margin: 10px auto 4px; padding: 9px 16px; border-radius: 999px; background: #0b1322; color: #fff; font-size: 15px; line-height: 1.3; font-weight: 500; }
.kg-wa__booked .ss-check { --ss-success: #25d366; }
.kg-wa__compose { flex: none; padding: 10px 14px; background: #f6f6f6; }
.kg-wa__field { display: flex; align-items: center; height: 42px; padding: 0 16px; border-radius: 21px; background: #fff; box-shadow: 0 0 0 1px var(--ss-line); font-size: 16px; line-height: 1.3; color: var(--ss-text-faint); }

/* --- calendario --- */
.kg-cal__week { position: absolute; left: 28px; top: 0; height: 100%; will-change: transform; transition: opacity 0.22s ease, translate 0.22s ease; }
.kg-cal__week[data-layer='new'][data-swap='ready'], .kg-cal__week[data-layer='old'][data-swap='go'] { opacity: 0; }
.kg-cal__week[data-layer='new'][data-swap='ready'] { translate: 0 8px; }
.kg-cal__day { position: absolute; top: 0; height: 34px; box-sizing: border-box; padding: 8px 10px; font-size: 12px; line-height: 1.3; font-weight: 600; color: var(--ss-text); box-shadow: 0 0 0 0.5px var(--ss-line); }
.kg-cal__col { position: absolute; top: 34px; bottom: 0; background-image: linear-gradient(var(--ss-line) 1px, transparent 1px); background-size: 100% 44px; box-shadow: 0 0 0 0.5px var(--ss-line); }
.kg-cal__busy { position: absolute; border-radius: 7px; background: #e6ecf8; }
.kg-cal__event { position: absolute; z-index: 2; display: flex; flex-direction: column; justify-content: center; box-sizing: border-box; padding: 0 7px; border-radius: 7px; background: var(--ss-accent); color: #fff; font-size: 11px; line-height: 1.3; font-weight: 600; box-shadow: 0 8px 18px rgba(61, 126, 255, 0.28); will-change: transform; opacity: 0; transform: translateY(-10px) scale(0.97); transition: opacity 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); }
.kg-cal__event[data-on] { opacity: 1; transform: none; }
.kg-cal__time { font-weight: 500; }
.kg-cal__sync { position: absolute; right: 14px; bottom: 14px; z-index: 3; display: flex; align-items: center; gap: 7px; height: 34px; box-sizing: border-box; padding: 0 10px; border-radius: 10px; background: #fff; box-shadow: var(--ss-shadow-satellite); font-size: 12px; line-height: 1.3; font-weight: 500; color: var(--ss-text-strong); }

/* --- Leady: il pannello scende oltre il bordo, come la pipeline e il telefono --- */
.bt-ly .bt-pic { min-height: 0; margin: 28px 28px 0 0; }
.kg-ly__panel { position: absolute; inset: 0 0 -24px 0; display: flex; flex-direction: column; gap: 12px; box-sizing: border-box; padding: 18px 18px 42px; border-radius: 14px; background: #fff; }
.kg-ly__body { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; -webkit-mask-image: linear-gradient(#0000, #000 18px); mask-image: linear-gradient(#0000, #000 18px); }
.kg-ly .kg-ly__thread { flex: none; --ss-thread-size: 14px; --ss-them-text: #0b1322; }
.kg-ly__turn { flex: none; position: relative; top: 0; will-change: transform; transition: top var(--ss-scroll); }
.kg-ly__think { padding: 8px 12px 0; font-size: 13px; line-height: 1.3; color: var(--ss-text-faint); }
.kg-ly__answer { padding: 8px 12px 4px; font-size: 14px; line-height: 1.4; font-weight: 600; color: var(--ss-text-strong); }
.kg-ly__rows { display: flex; flex-direction: column; }
.kg-ly__field { flex: none; }
.kg-ly__field .ss-field__box { gap: 8px; }

/* --- 8 strumenti --- */
.kg-tools .ss-stage { -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent); }
.kg-tools__rows { position: absolute; left: 0; right: 0; bottom: 24px; display: flex; flex-direction: column; gap: 12px; }
.kg-tools__row { display: flex; gap: 12px; width: max-content; will-change: transform; animation: kg-ribbon-l 30s linear infinite; }
.kg-tools__row + .kg-tools__row { margin-left: -34px; animation-name: kg-ribbon-r; }
/* otto marchi da 68px: a fine giro i pixel sono gli stessi */
@keyframes kg-ribbon-l { to { transform: translateX(-544px); } }
@keyframes kg-ribbon-r { from { transform: translateX(-544px); } to { transform: none; } }
.kg-tools__mark { display: grid; flex: none; place-items: center; width: 56px; height: 56px; border-radius: 12px; background: #182338; color: #fff; }
.kg-tools__mark svg { width: 24px; height: 24px; }
.kg-tools__mark svg.woo { width: 34px; }

/* --- telefono --- */
@media (max-width: 720px) {
  .bt-ly .bt-pic { flex: none; height: 330px; margin: 18px 14px 0; }
}

/* --- i telefoni piu' stretti (320) --- */
.kg-pipe .kg-board[data-tiny] { padding: 8px; }
.kg-pipe .kg-board[data-tiny] .kg-col { padding: 6px; }
.kg-pipe .kg-board[data-tiny] .kg-card { padding: 0 7px; }
.kg-pipe .kg-board[data-tiny] .kg-card__name { font-size: 12px; }
.kg-ly--tiny .kg-ly__panel { padding: 14px 14px 38px; }
.kg-ly--tiny .ss-row__meta { display: none; }
.kg-wa--tiny .kg-wa__thread { --ss-thread-size: 18px; }
@media (max-width: 340px) { .bt { grid-template-rows: 425px 650px 350px 330px 340px auto; } }

/* ==========================================================================
   Le griglie al posto delle sezioni con le icone: composizioni e scene.
   ========================================================================== */

/* --- le composizioni: una diversa per pagina --- */
.bt.bx { grid-template-rows: none; grid-auto-rows: 372px; grid-auto-flow: dense; }
.bx-6a { grid-template-areas: 'a b b' 'a c d' 'e e f'; }
.bx-6b { grid-template-areas: 'a a b' 'c d d' 'e f f'; }
.bx-6c { grid-template-areas: 'a b c' 'd d c' 'e f f'; }
.bx-6d { grid-template-areas: 'a b b' 'c c d' 'e f f'; }
.bx-6e { grid-template-areas: 'a b b' 'c b b' 'd e f'; }
.bx-4a { grid-template-areas: 'a a b' 'c d d'; }
.bx-4b { grid-template-areas: 'a b b' 'c c d'; }
.bt.bx-3a, .bt.bx-3d { grid-template-columns: 1.3fr 1fr 1fr; grid-template-areas: 'a b c'; }
.bt.bx-3b { grid-template-columns: 1fr 1.3fr 1fr; grid-template-areas: 'a b c'; }
.bt.bx-3c { grid-template-areas: 'a b c'; grid-auto-rows: auto; }
.bt.bx-3d { grid-auto-rows: 290px; }
.bt.bx-2a { grid-template-columns: 1fr 1fr; grid-template-areas: 'a b'; }
.bx-7 { grid-template-areas: 'a a b' 'a a c'; }
.bx-8 { grid-template-areas: 'a b c' 'd d e' 'f g h'; }
.bx [data-t='a'] { grid-area: a; } .bx [data-t='b'] { grid-area: b; } .bx [data-t='c'] { grid-area: c; } .bx [data-t='d'] { grid-area: d; }
.bx [data-t='e'] { grid-area: e; } .bx [data-t='f'] { grid-area: f; } .bx [data-t='g'] { grid-area: g; } .bx [data-t='h'] { grid-area: h; }

/* --- i fondi --- */
.g-ink { background: var(--ink); border-color: var(--ink); }
.g-sky { background: var(--blue-soft); border-color: var(--blue-soft); }
.g-wa { background: #ddf4e3; }
.g-pale { background: radial-gradient(90% 90% at 12% 0%, rgba(61, 126, 255, 0.16) 0%, transparent 60%), radial-gradient(80% 80% at 90% 8%, rgba(140, 207, 248, 0.22) 0%, transparent 60%), #f4f7fd; }
.g-ink .bt-copy h3, .dk .g-ink .bt-copy h3 { color: #fff; }
.g-ink .bt-copy p, .dk .g-ink .bt-copy p { color: #b7c1d6; }
.g-sky .bt-copy p, .g-wa .bt-copy p { color: var(--ink-2); }
.bt-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; }
.bx-num h3 b { display: block; margin-bottom: 6px; font-size: 3.75rem; font-weight: 600; line-height: 1; letter-spacing: -0.04em; }
.bx-num h3 { font-size: 1.125rem; line-height: 1.25; }
.bx .plain { justify-content: flex-start; }
.bx .plain .bt-copy { padding-bottom: 26px; }

/* --- dentro le fasce scure i riquadri restano chiari --- */
.dk .bt { position: relative; z-index: 1; padding-top: 44px; }
.dk .bt-t .bt-copy h3 { color: var(--ink); }
.dk .bt-t .bt-copy p { color: var(--ink-3); }
.dk .g-sky .bt-copy p, .dk .g-wa .bt-copy p { color: var(--ink-2); }

/* --- le larghezze --- */
@media (min-width: 1121px) {
  .bx .side { flex-direction: row; }
  .bx .side .bt-copy { flex: 0 0 42%; }
  .bx .side .bt-pic { margin: 26px 0 0; }
}
@media (max-width: 1120px) {
  .bt.bx, .bt.bx-3a, .bt.bx-3b, .bt.bx-3c, .bt.bx-3d, .bt.bx-2a { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: none; }
  .bx [data-t] { grid-area: auto; }
  .bx .wide { grid-column: span 2; }
  .bx .tall { grid-row: span 2; }
  .bx .wide.tall { grid-row: span 1; }
  .bx-3a [data-t='a'], .bx-3b [data-t='b'], .bx-3d [data-t='a'] { grid-column: span 2; }
}
@media (max-width: 720px) {
  .bt.bx, .bt.bx-3a, .bt.bx-3b, .bt.bx-3c, .bt.bx-3d, .bt.bx-2a { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .bx [data-t] { grid-column: auto !important; grid-row: auto !important; }
  .bx .bt-pic { flex: none; height: 250px; }
  .bx .tall .bt-pic { height: 430px; }
}

/* --- pezzi comuni delle scene --- */
.sk { --g: 28px; }
.sk .ss-stage { font-size: 13px; line-height: 1.35; color: var(--ss-text); }
.sk--tiny { --g: 16px; }
.sk-panel { position: absolute; left: var(--g); right: var(--g); top: 0; bottom: -24px; display: flex; flex-direction: column; min-height: 0; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--ss-line), 0 10px 26px rgba(11, 19, 34, 0.07); overflow: hidden; }
.sk-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: none; padding: 12px 14px 10px; font-size: 12px; font-weight: 600; color: var(--ss-text-strong); border-bottom: 1px solid var(--ss-line-faint); }
.sk-list { display: flex; flex-direction: column; min-height: 0; padding: 2px 2px 26px; }
.sk .sk-row { flex: none; }
.sk-rowwrap { flex: none; transition: opacity 0.25s ease; }
.sk-rowwrap[data-out] { opacity: 0; }
.sk-badge { flex: none; white-space: nowrap; }
.sk-ico { display: grid; flex: none; place-items: center; width: 24px; height: 24px; color: var(--ss-accent); }
.sk-img { flex: none; width: 28px; height: 28px; border-radius: 7px; }
.sk-img--s { width: 18px; height: 18px; border-radius: 4px; }
.sk-link { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; color: var(--ss-accent-text); }

/* --- telefono --- */
.sk .sk-phone { position: absolute; }
.sk .sk-phone .ss-phone__content { display: flex; flex-direction: column; padding-top: 0; }
.sk-phone__head { display: flex; flex: none; align-items: center; gap: 12px; padding: 62px 20px 20px; background: #fff; border-bottom: 1px solid var(--ss-line); }
.sk-phone__ava { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #25d366; color: #fff; }
.sk-phone__ava svg { width: 22px; height: 22px; }
.sk-phone__who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sk-phone__title { font-size: 19px; line-height: 1.25; font-weight: 600; color: var(--ss-text-strong); }
.sk-phone__sub { font-size: 14px; line-height: 1.25; color: var(--ss-text-faint); }
.sk-phone__body { flex: 1; min-height: 0; box-sizing: border-box; background: #fff; overflow: hidden; }
.sk-phone__body .sk-list { padding: 6px 8px 0; }
.sk-phone__body .sk-badge { font-size: 13px; }
.sk-lock { padding-top: 4px; gap: 8px; }
.sk-notif-ico { display: block; width: 100%; height: 100%; border-radius: inherit; }

/* --- barre --- */
.sk-bars { position: absolute; left: var(--g); right: var(--g); top: 0; display: flex; flex-direction: column; gap: 13px; }
.sk-bars__title { margin-bottom: -6px; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 22px; font-size: 12px; font-weight: 600; color: var(--ss-text-strong); }
.sk-bar { display: flex; flex-direction: column; gap: 6px; }
.sk-bar__line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sk-bar__label { min-width: 0; font-size: 13px; font-weight: 500; color: var(--ss-text-strong); }
.sk-bar__n { flex: none; font-size: 13px; font-weight: 600; color: var(--ss-text-strong); font-variant-numeric: tabular-nums; }
.sk-meter { display: block; width: 100%; }
.g-ink .sk-bars__title, .g-ink .sk-bar__label, .g-ink .sk-bar__n { color: #fff; }

/* --- flussi --- */
.sk-flow { position: absolute; inset: 0 var(--g) 12px; z-index: 21; display: flex; align-items: center; justify-content: space-between; gap: 44px; }
.sk-flow__col { display: flex; flex: none; flex-direction: column; gap: 8px; max-width: 48%; }
.sk-flow__src { display: flex; align-items: center; gap: 6px; min-height: 36px; box-sizing: border-box; padding: 0 12px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px rgba(11, 19, 34, 0.14); font-size: 12px; font-weight: 600; color: var(--ss-text-strong); white-space: nowrap; transition: background-color 0.2s ease; }
.sk-flow__src[data-on] { background: #eef4ff; }
.sk-flow__dst { display: flex; align-items: center; gap: 10px; min-height: 44px; box-sizing: border-box; padding: 6px 12px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px var(--ss-line); transition: background-color 0.2s ease; }
.sk-flow__dst[data-on] { background: #eef4ff; }
.sk-flow__names { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sk-flow__label { font-size: 13px; font-weight: 600; color: var(--ss-text-strong); }
.sk-flow__sub { font-size: 11px; color: var(--ss-text-faint); white-space: nowrap; }
.sk-flow__n { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--ss-text-faint); }

/* --- chat --- */
.sk-chat { position: absolute; left: var(--g); right: var(--g); top: 0; bottom: -24px; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 12px 36px; border-radius: 14px; background: #efeae2; overflow: hidden; }
.sk-chat--phone { position: relative; inset: auto; height: 100%; padding: 0 14px 12px; border-radius: 0; box-sizing: border-box; }
.sk .sk-chat__thread { flex: none; gap: 4px; --ss-thread-size: 13.5px; --ss-them: #fff; --ss-them-text: #0b1322; --ss-me: #d9fdd3; --ss-me-text: #0b1322; }
.sk-chat--phone .sk-chat__thread { --ss-thread-size: 17px; }
.sk-voice { display: inline-flex; align-items: center; gap: 8px; height: 22px; }
.sk-voice__wave { display: inline-flex; align-items: center; gap: 2px; }
.sk-voice__wave i { display: block; width: 3px; border-radius: 2px; background: #128c4b; }
.sk-voice__wave[data-play] i { animation: sk-wave 0.9s ease-in-out infinite alternate; }
@keyframes sk-wave { to { transform: scaleY(0.45); opacity: 0.6; } }
.sk-confirm { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.sk-confirm__t { font-weight: 500; }
.sk-chat__thread .sk-tag { font-size: 11px; color: #128c4b; font-weight: 600; }
.sk-chat--phone .sk-chat__thread .sk-tag { font-size: 14px; }
.ss-stage[data-still] .sk-voice__wave i { animation: none; }

/* --- domanda e risposta --- */
.sk-panel--ask { padding: 0; }
.sk-ask { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 38px; }
.sk-phone__body .sk-ask { height: 100%; box-sizing: border-box; padding: 10px 14px 12px; }
.sk .kg-ly__body { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; -webkit-mask-image: linear-gradient(#0000, #000 16px); mask-image: linear-gradient(#0000, #000 16px); }
.sk .kg-ly__thread { flex: none; --ss-thread-size: 13.5px; --ss-them-text: #0b1322; }
.sk .kg-ly__turn { flex: none; position: relative; top: 0; will-change: transform; transition: top var(--ss-scroll); }
.sk .kg-ly__think { display: block; padding: 4px 2px 0; font-size: 13px; color: var(--ss-text-faint); }
.sk .kg-ly__answer { padding: 4px 2px 4px; font-size: 13.5px; line-height: 1.4; font-weight: 500; color: var(--ss-text-strong); }
.sk .kg-ly__field { flex: none; }
.sk .kg-ly__field .ss-field__box { gap: 8px; }

/* --- schede --- */
.sk-tabs { position: absolute; left: var(--g); right: var(--g); top: 0; bottom: 0; display: flex; flex-direction: column; gap: 12px; }
.sk .sk-seg { flex: none; align-self: flex-start; }
.sk-tabs__stat { flex: none; font-family: var(--font-heading); font-size: 22px; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; color: var(--ss-text-strong); }
.g-ink .sk-tabs__stat { color: #fff; }
.sk-tabs__chart { flex: 1; min-height: 0; }
.sk-tabs__pages { position: relative; flex: 1; min-height: 0; }
.sk-tabs__page { position: absolute; inset: 0; opacity: 0; translate: 0 8px; will-change: transform; transition: opacity 0.22s ease, translate 0.22s ease; }
.sk-tabs__page[data-on] { opacity: 1; translate: 0 0; }
.sk .sk-win { position: absolute; box-shadow: var(--ss-shadow-hero); }
.sk-win__body { display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 12px; box-sizing: border-box; background: #fff; }
.sk-words { display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
.sk-words__t { font-family: var(--font-heading); font-size: 22px; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; color: var(--ss-text-strong); }
.sk-words__s { font-size: 14px; color: var(--ss-text-faint); }
.g-ink .sk-words__t { color: #fff; }
.g-ink .sk-words__s { color: #b7c1d6; }
.sk-stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.sk-stages__col { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 8px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px var(--ss-line-faint); }
.sk-stages__h { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ss-text-strong); white-space: nowrap; }
.sk-stages__h b { font-weight: 500; color: var(--ss-text-faint); }
.sk-kb { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; align-items: start; }
.sk-kb__col { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 8px; border-radius: 10px; background: var(--ss-canvas); }
.sk-kb__h { padding: 0 0 2px; font-size: 12px; font-weight: 600; color: var(--ss-text); }
.sk-kb__c { display: flex; align-items: center; gap: 7px; min-width: 0; height: 36px; padding: 0 9px; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1px var(--ss-line); font-size: 12px; font-weight: 500; color: var(--ss-text-strong); white-space: nowrap; overflow: hidden; }
.sk-ml { display: flex; flex-direction: column; }
.sk-ml__r { display: flex; align-items: center; gap: 10px; min-height: 40px; border-bottom: 1px solid var(--ss-line-faint); }
.sk-ml__n { min-width: 0; font-size: 13px; font-weight: 500; color: var(--ss-text-strong); white-space: nowrap; }
.g-ink .sk-ml__n, .g-ink .sk-ml__v { color: #fff; }
.g-ink .sk-ml__r { border-color: rgba(255, 255, 255, 0.12); }
.sk-ml__r .sk-badge { margin-left: auto; }
.sk-ml__v { flex: none; min-width: 42px; text-align: right; font-size: 13px; color: var(--ss-text-strong); font-variant-numeric: tabular-nums; }
.sk-mt { display: flex; flex-direction: column; }
.sk-mt__r { display: grid; gap: 12px; align-items: center; min-height: 40px; border-bottom: 1px solid var(--ss-line-faint); font-size: 13px; color: var(--ss-text-strong); }
.sk-mt__r--h { min-height: 30px; font-size: 12px; font-weight: 600; color: var(--ss-text-faint); }

/* --- numero grande --- */
.sk-stat { position: absolute; left: var(--g); right: var(--g); top: 0; bottom: 0; display: flex; flex-direction: column; }
.sk .sk-stat__n { font-family: var(--font-heading); font-size: 44px; font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; color: var(--ss-text-strong); }
.sk-stat__l { margin-top: 4px; font-size: 13px; color: var(--ss-text-faint); }
.sk-stat__chart { flex: 1; min-height: 0; margin-top: 10px; overflow: hidden; }
.g-ink .sk .sk-stat__n, .g-ink .sk-stat__n { color: #fff; }
.g-ink .sk-stat__l { color: #b7c1d6; }

/* --- campo e risultato --- */
.sk-form { position: absolute; left: var(--g); right: var(--g); top: 0; bottom: 0; display: flex; flex-direction: column; gap: 10px; }
.sk-form__results { flex: 1; display: flex; flex-direction: column; min-height: 0; margin-bottom: -24px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--ss-line), 0 6px 18px rgba(11, 19, 34, 0.06); overflow: hidden; }
.sk-form__results .sk-card { border-radius: 0; background: transparent; box-shadow: none; border-bottom: 1px solid var(--ss-line-faint); }
.sk-form__field { flex: none; }
.sk-card { display: flex; align-items: center; gap: 12px; box-sizing: border-box; padding: 14px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--ss-line), 0 6px 18px rgba(11, 19, 34, 0.06); }
.sk-card__names { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sk-card__t { font-size: 14px; line-height: 1.3; font-weight: 600; color: var(--ss-text-strong); }
.sk-card__s { font-size: 12px; line-height: 1.3; color: var(--ss-text-faint); }
.sk-card__b { margin-left: auto; }
.sk-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sk .sk-chip { font-size: 13px; }

/* --- conferma --- */
.sk-confirmwrap { position: absolute; inset: 0 var(--g) var(--g); display: flex; align-items: flex-end; }
.sk-confirmstack { position: relative; width: 100%; }
.sk-confirmgroup { display: grid; gap: 12px; will-change: transform; transition: opacity 0.22s ease, translate 0.22s ease; }
.sk-confirmgroup[data-pair] { grid-template-columns: 1fr 1fr; gap: 0; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--ss-line), 0 10px 26px rgba(11, 19, 34, 0.07); }
.sk-confirmgroup[data-pair] .sk-confirmcard { border-radius: 0; background: transparent; box-shadow: none; }
.sk-confirmgroup[data-pair] .sk-confirmcard + .sk-confirmcard { border-left: 1px solid var(--ss-line-faint); }
.sk-confirmgroup[data-layer='old'] { position: absolute; inset: 0 0 auto; }
.sk-confirmgroup[data-layer='old'][data-swap='go'], .sk-confirmgroup[data-layer='new'][data-swap='ready'] { opacity: 0; }
.sk-confirmgroup[data-layer='new'][data-swap='ready'] { translate: 0 8px; }
.sk-confirmcard { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; box-sizing: border-box; padding: 16px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--ss-line), 0 10px 26px rgba(11, 19, 34, 0.07); }
.sk-confirmcard__top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sk-confirmcard__top .kg-mark { width: 18px; height: 18px; }
.sk-confirmcard__top .kg-mark svg { width: 18px; height: 18px; }
.sk-confirmcard__reveal { padding-top: 2px; }

/* --- tabella --- */
.sk-table { display: flex; flex-direction: column; min-height: 0; padding: 4px 8px 8px; background: #fff; }
.sk-table__row { display: grid; gap: 10px; align-items: center; min-height: 40px; padding: 0 8px; border-radius: 8px; font-size: 13px; color: var(--ss-text-strong); transition: background-color 0.2s ease; }
.sk-table__row[data-on] { background: #eef4ff; }
.sk-table__row--head { min-height: 32px; font-size: 12px; font-weight: 600; color: var(--ss-text-faint); }
.sk-table__num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sk-table__name { min-width: 0; font-weight: 500; }

/* --- doppioni --- */
.sk-dedupe__stack { position: relative; flex: 1; min-height: 0; }
.sk-dedupe { padding: 4px 8px 0; will-change: transform; transition: opacity 0.22s ease, translate 0.22s ease; }
.sk-dedupe[data-layer='old'] { position: absolute; inset: 0 0 auto; }
.sk-dedupe[data-layer='old'][data-swap='go'], .sk-dedupe[data-layer='new'][data-swap='ready'] { opacity: 0; }
.sk-dedupe[data-layer='new'][data-swap='ready'] { translate: 0 8px; }
.sk-dedupe__row { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 8px; transition: background-color 0.2s ease; }
.sk-dedupe__row[data-dup] { background: #fff4dc; }
.sk-dedupe__n { flex: none; font-size: 13px; font-weight: 500; color: var(--ss-text-strong); }
.sk-dedupe__m { min-width: 0; font-size: 12px; color: var(--ss-text-faint); }
.sk-dedupe__b { display: none; margin-left: auto; }
.sk-dedupe__row[data-dup] .sk-dedupe__b { display: inline-flex; }
.sk-dedupe__row[data-dup] .sk-dedupe__m { display: none; }

/* --- orari --- */
.sk-slotswrap { position: absolute; left: var(--g); right: var(--g); top: 0; }
.sk-slots { will-change: transform; transition: opacity 0.22s ease, translate 0.22s ease; }
.sk-slots[data-layer='old'] { position: absolute; inset: 0 0 auto; }
.sk-slots[data-layer='old'][data-swap='go'], .sk-slots[data-layer='new'][data-swap='ready'] { opacity: 0; }
.sk-slots[data-layer='new'][data-swap='ready'] { translate: 0 8px; }
.sk-slots__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 5px; font-size: 14px; font-weight: 600; color: var(--ss-text-strong); }
.sk-slots__note { font-size: 12px; font-weight: 500; color: var(--ss-text-faint); }
.sk-slots__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.sk-slot { display: grid; place-items: center; height: 38px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px var(--ss-line); font-size: 13px; font-weight: 500; color: var(--ss-text-strong); transition: background-color 0.2s ease, color 0.2s ease; }
.sk-slot[data-busy] { background: #eef1f6; box-shadow: none; color: #8a94a8; text-decoration: line-through; }
.sk-slot[data-on] { background: var(--ss-accent); box-shadow: none; color: #fff; }

/* --- due agende --- */
.sk-sync { position: absolute; left: var(--g); right: var(--g); top: 0; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sk-sync__col { display: flex; flex-direction: column; min-width: 0; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--ss-line); overflow: hidden; }
.sk-sync__head { display: flex; flex: none; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-bottom: 1px solid var(--ss-line-faint); font-size: 12px; font-weight: 600; color: var(--ss-text-strong); }
.sk-sync__img { width: 16px; height: 16px; }
.sk-sync__grid { position: relative; flex: 1; background-image: linear-gradient(var(--ss-line-faint) 1px, transparent 1px); background-size: 100% 40px; }
.sk-sync__busy { position: absolute; left: 8px; right: 8px; border-radius: 7px; background: #e6ecf8; }
.sk-sync__ev { position: absolute; left: 8px; right: 8px; z-index: 2; display: flex; align-items: center; padding: 0 9px; border-radius: 7px; background: var(--ss-accent); color: #fff; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; will-change: transform; transition: top 0.45s cubic-bezier(0.45, 0, 0.1, 1), box-shadow 0.2s ease, scale 0.2s ease, rotate 0.2s ease; }
.sk-sync__ev[data-held] { z-index: 3; scale: 1.03; rotate: 1deg; box-shadow: var(--ss-shadow-lift); transition: box-shadow 0.2s ease, scale 0.2s ease, rotate 0.2s ease; }
.sk-sync__top { display: none; }

/* --- API --- */
.sk-code { position: absolute; left: var(--g); right: var(--g); top: 0; bottom: -24px; display: flex; gap: 14px; align-items: flex-start; }
.sk-code__block { align-self: stretch; flex: 1; min-width: 0; padding: 12px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--ss-line); font-size: 12px; overflow: hidden; }
.sk-code__res { display: flex; flex: none; align-items: center; gap: 8px; align-self: center; padding: 10px 12px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--ss-line); font-size: 12px; font-weight: 600; color: var(--ss-text-strong); opacity: 0.45; transition: opacity 0.25s ease; }
.sk-code__res[data-on] { opacity: 1; }

/* --- segni --- */
.sk-dots { position: absolute; left: var(--g); right: var(--g); top: 0; display: grid; gap: 8px; align-items: center; }
.sk-dot { display: block; aspect-ratio: 1; border-radius: 50%; background: rgba(120, 136, 170, 0.28); transition: background-color 0.25s ease; }
.sk-dot[data-on] { background: var(--blue-soft); }
.bt-t:not(.g-ink) .sk-dot[data-on] { background: var(--ss-accent); }
.sk-dots__end { grid-column: -3 / -1; justify-self: end; font-size: 12px; font-weight: 600; color: var(--ss-text-strong); }

/* --- a turno --- */
.sk-turns { position: absolute; left: var(--g); right: var(--g); top: 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.sk-turns__row { display: flex; flex: 1; justify-content: space-around; gap: 8px; }
.sk-turn { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sk-turn__n { font-size: 12px; font-weight: 500; color: var(--ss-text-strong); }
.sk-turn__c { font-size: 13px; font-weight: 600; color: var(--ss-text-faint); }
.sk-turn[data-on] .sk-turn__c { color: var(--ss-accent-text); }
.sk-token { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--ss-accent); box-shadow: 0 4px 10px rgba(61, 126, 255, 0.4); }
.sk-scope { display: flex; flex-direction: column; gap: 10px; }

/* --- riquadri stretti: gli schemi si stringono, il giro a turno va in colonna --- */
.sk--narrow { --g: 20px; }
.sk--narrow .sk-flow { gap: 20px; }
.sk--narrow .sk-flow__col { max-width: none; min-width: 0; }
.sk--narrow .sk-flow__src { min-height: 34px; padding: 0 8px; font-size: 11px; }
.sk--narrow .sk-flow__dst { padding: 5px 8px; }
.sk--narrow .sk-flow__label { font-size: 12px; }
.sk--narrow .sk-flow__sub { font-size: 10px; }
.sk--narrow .sk-turns { flex-direction: column; align-items: stretch; gap: 10px; }
.sk--narrow .sk-turns > .sk-flow__src { align-self: flex-start; }
.sk--narrow .sk-turns__row { justify-content: space-between; }
.sk--narrow .sk-kb { grid-auto-columns: 128px; }
.sk-form:has(.sk-chips__cols) { bottom: -24px; }
.sk-chips__cols { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; min-height: 0; overflow: hidden; }
.sk-chips__col { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 8px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px var(--ss-line-faint); }
