/* ============================================================
   Ansygo v2 — extra styles for the new narrative sections.
   Loaded AFTER styles.css. v1 is untouched.
   ============================================================ */

/* ---- Sources → hub (channels converge into the CRM) ---- */
.src { position: relative; width: 100%; max-width: 540px; margin: 0 auto; aspect-ratio: 1 / 1; }
.src__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.src__line { stroke: var(--border-2); stroke-width: .5; fill: none; }
.src__flow { stroke: var(--accent); stroke-width: .8; fill: none; stroke-dasharray: 2.5 6; opacity: 0; transition: opacity .6s ease; }
#sourcesHub.in .src__flow { opacity: .9; animation: srcflow 1.05s linear infinite; }
@keyframes srcflow { to { stroke-dashoffset: -8.5; } }

.src__hub { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 32%; aspect-ratio: 1; border-radius: 24px; background: var(--grad-surface); border: 1px solid var(--accent); box-shadow: var(--shadow-glow); display: grid; place-items: center; text-align: center; z-index: 3; padding: 4%; }
.src__hub svg { width: 46%; height: auto; }
.src__hub b { font-family: var(--font-display); font-weight: 700; font-size: .8rem; margin-top: 5px; display: block; color: var(--text); }

.src__node { position: absolute; transform: translate(-50%, -50%) scale(.5); opacity: 0; transition: opacity .5s var(--ease), transform .55s var(--ease); z-index: 2; }
#sourcesHub.in .src__node { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.src__chip { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 12px; padding: 9px 13px; box-shadow: var(--shadow-1); white-space: nowrap; }
.src__chip svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.src__chip span { font-size: .82rem; font-weight: 600; }
#sourcesHub.in .src__node:nth-child(1) { transition-delay: .05s; }
#sourcesHub.in .src__node:nth-child(2) { transition-delay: .13s; }
#sourcesHub.in .src__node:nth-child(3) { transition-delay: .21s; }
#sourcesHub.in .src__node:nth-child(4) { transition-delay: .29s; }
#sourcesHub.in .src__node:nth-child(5) { transition-delay: .37s; }
#sourcesHub.in .src__node:nth-child(6) { transition-delay: .45s; }

/* ---- Automation: vertical scroll-built workflow (right column) ---- */
.auto-flow { max-width: 460px; margin: 0 auto; }
.auto-flow svg { width: 100%; height: auto; display: block; overflow: visible; }
/* scroll-scrubbed reveal — JS toggles .on per element as #automation scrolls */
.auto-node { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.55);
  transition: opacity .45s var(--ease), transform .45s var(--ease); }
.auto-node.on { opacity: 1; transform: scale(1); }
.auto-label { opacity: 0; transition: opacity .45s var(--ease); }
.auto-label.on { opacity: 1; }
.auto-link { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 420; stroke-dashoffset: 420;
  transition: stroke-dashoffset .55s var(--ease); }
.auto-link.on { stroke-dashoffset: 0; }
.auto-yn { fill: var(--accent); font-family: var(--font-display); font-weight: 700; font-size: 18px; text-anchor: middle; opacity: 0; transition: opacity .4s var(--ease); }
.auto-yn.on { opacity: .9; }

/* automation foreground checklist */
.auto-list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.auto-list li { display: flex; align-items: center; gap: 12px; background: var(--grad-surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; font-weight: 600; }
.auto-list li svg { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }

@media (max-width: 640px) {
  .auto-list { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .src { max-width: 340px; }
  .src__hub { width: 30%; }
  .src__chip { padding: 6px 9px; gap: 6px; }
  .src__chip span { font-size: .68rem; }
  .src__chip svg { width: 14px; height: 14px; }
  .src__hub b { font-size: .62rem; }
  /* side chips: anchor the outer edge on the line end so they stay inside the box */
  .src__node[style*="left:86%"] { transform: translate(-100%, -50%) scale(.5); transform-origin: right center; }
  #sourcesHub.in .src__node[style*="left:86%"] { transform: translate(-100%, -50%) scale(1); }
  .src__node[style*="left:14%"] { transform: translate(0, -50%) scale(.5); transform-origin: left center; }
  #sourcesHub.in .src__node[style*="left:14%"] { transform: translate(0, -50%) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  #sourcesHub.in .src__flow { animation: none; opacity: .6; }
  .auto-node, .auto-label, .auto-yn { opacity: 1 !important; transform: none !important; }
  .auto-link { stroke-dashoffset: 0 !important; }
}

/* ---- Shared spaces mock ---- */
.space { padding: 18px; }
.space__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.space__title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.space__title > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.space__icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.space__icon svg { width: 18px; height: 18px; }
.space__name { font-family: var(--font-display); font-weight: 700; font-size: .95rem; line-height: 1.25; }
.space__meta { font-size: .72rem; color: var(--text-3); }
.space__switch { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border-2); font-size: .72rem; color: var(--text-2); white-space: nowrap; }
.space__switch svg { width: 12px; height: 12px; }
.space__tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); margin-bottom: 14px; }
.space__tabs span { flex: 1; text-align: center; font-size: .75rem; padding: 6px 4px; border-radius: 8px; color: var(--text-3); }
.space__tabs span.on { background: var(--surface-2); color: var(--text); font-weight: 600; }
.space__people { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.space__who { display: inline-flex; align-items: center; gap: 7px; font-size: .72rem; color: var(--text-2); padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--border); }
.space__who i { width: 18px; height: 18px; border-radius: 50%; background: var(--c, var(--accent)); display: inline-block; flex-shrink: 0; }
.space__task { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 8px; font-size: .8rem; }
.space__task b { font-weight: 600; min-width: 0; }
.space__tag { font-size: .68rem; padding: 3px 8px; border-radius: 999px; white-space: nowrap; color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 14%, transparent); }
.space__note { display: flex; align-items: center; gap: 8px; font-size: .72rem; color: var(--text-3); margin-top: 12px; }
.space__note svg { width: 14px; height: 14px; color: var(--accent); flex-shrink: 0; }

/* ---- Deals board: drag & drop + light/dark toggle ---- */
.kanban--board .kcard { cursor: grab; transition: opacity .2s, box-shadow .2s, transform .2s; }
.kanban--board .kcard.dragging { opacity: .45; cursor: grabbing; }
.kanban--board .kanban__col.drop-target { outline: 2px dashed var(--accent); outline-offset: -5px; background: var(--accent-soft); }
.board__themes { cursor: pointer; font-family: var(--font-body); }
.board__themes .theme-sun { display: none; }
.board-wrap.is-light .board__themes .theme-moon { display: none; }
.board-wrap.is-light .board__themes .theme-sun { display: inline; }

/* board light theme — scoped to the board card only */
.board-wrap.is-light { background: #eef2f7; border-color: #d8e0ea; transition: background .3s, border-color .3s; }
.board-wrap.is-light .kanban--board .kanban__col { background: #ffffff; border-color: #e4e9f0; }
.board-wrap.is-light .kanban__head { color: #5b6675; }
.board-wrap.is-light .kanban__head > span:first-child > span:last-child { color: #2a3340; }
.board-wrap.is-light .kanban__sum { color: #8b95a4; }
.board-wrap.is-light .kcard { background: #f6f8fb; border-color: #e4e9f0; box-shadow: 0 1px 3px rgba(16,24,40,.06); }
.board-wrap.is-light .kcard__title { color: #1b2330; }
.board-wrap.is-light .kcard__amount { color: #0fae95; }
.board-wrap.is-light .kcard__owner { color: #6b7686; }
.board-wrap.is-light .board__themes { background: #ffffff; border-color: #d8e0ea; color: #2a3340; }

/* journey (scaling) arrows — scroll-scrubbed, reversible (id-scoped to override the IO .in rule) */
#scaling .jstep__arrow { opacity: 0; transform: translateY(-50%) scaleX(.3); }
#scaling .jstep__arrow.on { opacity: .75; transform: translateY(-50%) scaleX(1); }
/* prices live only in the Pricing section — hide them on the scaling journey ladder */
#scaling .jstep__price { display: none; }
