/* Home page: "scattered tools vs one Echo" toggle section. */
.ch-section {
    width: 100%;
    background: #ffffff;
    padding: 5rem 1.5rem 5.5rem;
    display: flex;
    justify-content: center;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.ch-inner { width: 100%; max-width: 1180px; }

.ch-head { text-align: center; max-width: 60rem; margin: 0 auto 2.2rem; }
.ch-title {
    margin: 0;
    /* identical to the home hero heading (.ed-title) */
    font-family: 'Inter Tight', 'Inter', system-ui, sans-serif;
    font-size: clamp(26px, min(4.3vw, 6.2vh), 46px);
    font-weight: 500;
    color: #0f172a;
    letter-spacing: -0.022em;
    line-height: 1.08;
    text-wrap: balance;
}
.ch-title span { color: inherit; white-space: nowrap; }
.ch-title { font-size: clamp(24px, min(3.6vw, 5.4vh), 42px); }
@media (max-width: 760px) { .ch-title br { display: none; } .ch-title span { white-space: normal; } .ch-title span::before { content: ' '; } }
.ch-sub { margin: 1rem auto 0; max-width: 38rem; font-size: 1.04rem; line-height: 1.6; color: #475569; }

/* ── Stage ── */
.ch-stage {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 20px;
    padding: 20px;
    border-radius: 20px;
    background: #f1f3f6;
    border: 1px solid #e2e8f0;
    transition: background .5s, border-color .5s;
}


/* ── Board: where the tools live ── */
.ch-board {
    position: relative;
    aspect-ratio: 16 / 11;
    border-radius: 14px;
    overflow: hidden;
    --t: 84px;
    background:
        linear-gradient(rgba(71, 85, 105, .06) 1px, transparent 1px) center / 44px 44px,
        linear-gradient(90deg, rgba(71, 85, 105, .06) 1px, transparent 1px) center / 44px 44px,
        #fbfcfd;
    border: 1px solid #e8edf3;
}
.ch-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.ch-line { fill: none; stroke-linecap: round; }
.ch-line--tangle { stroke: #fb7185; stroke-width: 1.2; stroke-dasharray: 2 6; opacity: .42; transition: opacity .12s; }
.ch-line--tangle.is-light { opacity: .2; }
.ch-stage.is-on .ch-line--tangle { opacity: 0; }

/* organised state: circuit wires with glowing ends and data pulses */
.ch-wire { opacity: 0; transition: opacity .12s; }   /* off: gone at once */
.ch-stage.is-on .ch-wire { opacity: 1; transition: opacity .6s; transition-delay: calc(var(--i, 0) * 70ms + .45s); }
.ch-line--halo { stroke: #00A896; stroke-width: 7; opacity: .12; }
.ch-line--clean { stroke: #00A896; stroke-width: 1.8; stroke-dasharray: 5 7; animation: ch-flow 1.4s linear infinite; }
@keyframes ch-flow { to { stroke-dashoffset: -24; } }
.ch-dot { fill: #00A896; }
.ch-dot-halo { fill: rgba(0, 168, 150, .22); animation: ch-dotpulse 2.4s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -300ms); transform-box: fill-box; transform-origin: center; }
@keyframes ch-dotpulse { 50% { transform: scale(1.5); opacity: .4; } }
.ch-pulse { fill: #fff; stroke: #00A896; stroke-width: 2; filter: drop-shadow(0 0 5px rgba(0, 168, 150, .9)); }

/* backdrop: faint grid + rings fade in with the orb */
.ch-grid, .ch-ring { position: absolute; pointer-events: none; opacity: 0; transition: opacity .15s; }
.ch-grid {
    inset: 0;
    background-image:
        linear-gradient(rgba(71, 85, 105, .11) 1px, transparent 1px),
        linear-gradient(90deg, rgba(71, 85, 105, .11) 1px, transparent 1px);
    background-size: 44px 44px;
    background-position: center;
    -webkit-mask-image: radial-gradient(ellipse 55% 60% at 50% 50%, #000 0%, transparent 100%);
    mask-image: radial-gradient(ellipse 55% 60% at 50% 50%, #000 0%, transparent 100%);
}
.ch-ring { left: 50%; top: 50%; border-radius: 50%; border: 1px solid rgba(71, 85, 105, .16); transform: translate(-50%, -50%) scale(.85); transition: opacity .15s, transform .15s; }
.ch-ring--1 { width: 88%; aspect-ratio: 1; }
.ch-ring--2 { width: 66%; aspect-ratio: 1; border-color: rgba(71, 85, 105, .12); }
.ch-stage.is-on .ch-grid { opacity: 1; transition: opacity .8s .2s; }
.ch-stage.is-on .ch-ring { opacity: 1; transform: translate(-50%, -50%) scale(1); transition: opacity .8s .3s, transform 1s .3s cubic-bezier(.2, .8, .3, 1); }
.ch-board::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .15s;
    background: radial-gradient(circle at 50% 50%, rgba(11, 107, 203, .12), transparent 46%);
}
.ch-stage.is-on .ch-board::before { opacity: 1; transition: opacity .8s; }

/* the Echo orb */
.ch-hub {
    position: absolute; left: 50%; top: 50%;
    width: calc(var(--t) * 1.6); height: calc(var(--t) * 1.6);
    margin: calc(var(--t) * -.8) 0 0 calc(var(--t) * -.8);
    border-radius: 50%;
    opacity: 0; transform: scale(.4);
    transition: opacity .15s, transform .15s;
    z-index: 2;
}
.ch-stage.is-on .ch-hub { opacity: 1; transform: scale(1); transition: opacity .5s .25s, transform .7s .25s cubic-bezier(.2, 1.3, .4, 1); }
.ch-hub i { position: absolute; border-radius: 50%; display: block; }
.ch-orb-glow { inset: -34%; background: radial-gradient(circle, rgba(25, 200, 182, .55), rgba(25, 200, 182, 0) 66%); animation: ch-breathe 3.6s ease-in-out infinite; }
@keyframes ch-breathe { 50% { transform: scale(1.12); opacity: .75; } }
.ch-orb-swirl {
    inset: 0;
    background:
        radial-gradient(circle at 32% 28%, #9af5ea 0%, rgba(154, 245, 234, 0) 38%),
        conic-gradient(from 210deg, #00A896, #0b7f8f, #19c8b6, #5eead4, #008f82, #00A896);
    box-shadow: inset -10px -14px 30px rgba(0, 70, 80, .45), inset 8px 8px 22px rgba(255, 255, 255, .45), 0 18px 40px -12px rgba(0, 127, 114, .65);
    animation: ch-spin 14s linear infinite;
}
@keyframes ch-spin { to { transform: rotate(360deg); } }
.ch-orb-shine {
    inset: 6% 10% 44% 12%;
    background: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0));
    border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%;
    filter: blur(1px);
}
.ch-orb-gl {
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    filter: drop-shadow(0 12px 22px rgba(73, 22, 168, .35));
    pointer-events: none;
}
.ch-hub.has-gl .ch-orb-swirl, .ch-hub.has-gl .ch-orb-shine { display: none; }
.ch-hub.has-gl .ch-orb-glow { background: radial-gradient(circle, rgba(11, 107, 203, .3), rgba(11, 107, 203, 0) 66%); }
.ch-hub.has-gl::after { border-color: rgba(11, 107, 203, .3); }
.ch-hub-label {
    position: absolute; left: 50%; top: calc(100% + 14px); transform: translateX(-50%);
    font-size: .7rem; font-weight: 700; letter-spacing: .24em; color: #0f766e; white-space: nowrap;
}
.ch-stage.is-on .ch-hub::after {
    content: ""; position: absolute; inset: -6px; border-radius: 50%;
    border: 2px solid rgba(0, 168, 150, .35);
    animation: ch-pulse 2.6s ease-out infinite;
}
@keyframes ch-pulse { from { transform: scale(.95); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }

/* tools */
.ch-tool {
    position: absolute;
    left: var(--cx); top: var(--cy);
    width: var(--t);
    transform: translate(-50%, -50%) rotate(var(--cr));
    transition: left .8s cubic-bezier(.3, .9, .3, 1), top .8s cubic-bezier(.3, .9, .3, 1), transform .8s cubic-bezier(.3, .9, .3, 1);
    transition-delay: calc(var(--i, 0) * 45ms);
    text-align: center;
    z-index: 3;
}
.ch-stage.is-on .ch-tool { left: var(--ox); top: var(--oy); transform: translate(-50%, -50%) rotate(0deg); }
.ch-tile {
    width: var(--t); height: var(--t);
    border-radius: 20px;
    background: #fff;
    display: grid; place-items: center;
    box-shadow: 0 8px 20px -10px rgba(15, 23, 42, .28), 0 0 0 1px rgba(15, 23, 42, .06);
}
.ch-tile svg.ico-brand { width: 46%; height: 46%; }
.ch-tile svg.ico-app { width: 62%; height: 62%; filter: drop-shadow(0 3px 5px rgba(15, 23, 42, .22)); }
.ch-tile { transition: background .5s, box-shadow .5s, border-color .5s; border: 1px solid transparent; }
.ch-stage.is-on .ch-tile {
    background: rgba(255, 255, 255, .72);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-color: rgba(0, 168, 150, .32);
    box-shadow: 0 14px 30px -14px rgba(0, 127, 114, .45), 0 0 0 4px rgba(0, 168, 150, .08), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.ch-stage.is-on .ch-owner { opacity: 0; height: 0; margin: 0; padding: 0; overflow: hidden; }
.ch-owner { transition: opacity .3s; }
.ch-name { margin-top: 7px; font-size: .74rem; font-weight: 600; color: #1e293b; letter-spacing: -.005em; white-space: nowrap; }
.ch-owner {
    display: inline-flex; align-items: center; gap: 5px;
    margin-top: 4px; padding: 2px 8px 2px 3px; border-radius: 999px;
    font-size: .62rem; font-weight: 600; color: #475569;
    background: #fff; border: 1px solid #e2e8f0;
    box-shadow: 0 2px 6px -3px rgba(15, 23, 42, .25);
    transition: background .4s, color .4s, border-color .4s;
}
.ch-owner i {
    width: 14px; height: 14px; border-radius: 50%;
    display: grid; place-items: center;
    font-style: normal; font-size: .52rem; font-weight: 700; color: #fff;
    background: var(--oc);
}
.ch-owner b { font-weight: 600; }
.ch-owner .off::after { content: "\2019s"; }
.ch-owner .on { display: none; }
.ch-stage.is-on .ch-owner { background: #00A896; color: #fff; border-color: #00A896; }
.ch-stage.is-on .ch-owner .off { display: none; }
.ch-stage.is-on .ch-owner .on { display: inline; }

/* handwritten notes */
.ch-note {
    position: absolute;
    left: calc(100% + 10px); top: 12%;
    transform: rotate(-4deg);
    font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.2rem; line-height: 1;
    color: #e11d48; white-space: nowrap;
    transition: opacity .3s;
    pointer-events: none;
}
.ch-note::before {
    content: ""; position: absolute; right: 100%; top: 55%; width: 14px; height: 10px; margin-right: 2px;
    border-left: 1.5px solid #e11d48; border-bottom: 1.5px solid #e11d48; border-radius: 0 0 0 8px; opacity: .7;
}
.ch-stage.is-on .ch-note { opacity: 0; }
.ch-tool[data-up] .ch-note { left: auto; right: calc(100% + 10px); top: 12%; transform: rotate(4deg); }
.ch-tool[data-up] .ch-note::before { right: auto; left: 100%; margin: 0 0 0 2px; border-left: 0; border-right: 1.5px solid #e11d48; border-radius: 0 0 8px 0; }
/* note below the tile (pointing up at it) */
.ch-tool[data-down] .ch-note { left: -6px; top: calc(100% + 30px); transform: rotate(-4deg); }
.ch-tool[data-down] .ch-note::before { right: auto; left: 10px; top: auto; bottom: 100%; width: 10px; height: 14px; margin: 0 0 2px; border-left: 1.5px solid #e11d48; border-bottom: 0; border-top: 1.5px solid #e11d48; border-radius: 8px 0 0 0; }
/* note to the right, slightly raised */
.ch-tool[data-right] .ch-note { left: calc(100% + 14px); top: 58%; transform: rotate(3deg); }

/* ── Right panel: who knows? / one thread ── */
.ch-side {
    display: grid; grid-template-columns: minmax(0, 1fr);
    position: relative;
    min-height: 100%;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 18px 16px;
    overflow: hidden;
}
.ch-side h3 {
    margin: 0 0 12px;
    font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #64748b;
}
.ch-pane { grid-area: 1 / 1; display: flex; flex-direction: column; transition: opacity .4s, transform .5s cubic-bezier(.2, .8, .3, 1); }
.ch-pane--on { opacity: 0; transform: translateY(12px); pointer-events: none; }
.ch-stage.is-on .ch-pane--off { opacity: 0; transform: translateY(-12px); pointer-events: none; }
.ch-stage.is-on .ch-pane--on { opacity: 1; transform: none; pointer-events: auto; }

.ch-q { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.ch-q li {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 9px 11px; border-radius: 11px;
    background: #fff7f7; border: 1px solid #fde4e4;
    font-size: .82rem; line-height: 1.35; color: #0f172a;
}
.ch-q li::before {
    content: "?"; flex-shrink: 0;
    width: 20px; height: 20px; border-radius: 50%; margin-top: 1px;
    display: grid; place-items: center;
    background: #fee2e2; color: #dc2626; font-size: .74rem; font-weight: 700;
}
.ch-q small { display: block; margin-top: 2px; font-size: .71rem; color: #b45353; }

.ch-feed { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 8px; }
.ch-feed::before { content: ""; position: absolute; left: 13px; top: 8px; bottom: 8px; width: 2px; background: #ccfbf1; }
.ch-feed li {
    position: relative; display: flex; gap: 10px; align-items: flex-start;
    padding: 8px 10px 8px 0; font-size: .82rem; line-height: 1.35; color: #0f172a;
    opacity: 0; transform: translateX(10px);
}
.ch-stage.is-on .ch-feed li { animation: ch-feedin .45s ease forwards; animation-delay: calc(.7s + var(--i, 0) * 150ms); }
@keyframes ch-feedin { to { opacity: 1; transform: none; } }
.ch-feed .ic {
    position: relative; z-index: 1; flex-shrink: 0;
    width: 28px; height: 28px; border-radius: 50%;
    display: grid; place-items: center;
    background: #00A896; color: #fff;
}
.ch-feed .ic svg { width: 14px; height: 14px; }
.ch-feed b { display: block; font-weight: 600; }
.ch-feed small { color: #64748b; font-size: .72rem; }
.ch-feed-foot { margin: 12px 0 0; font-size: .74rem; color: #00877a; font-weight: 600; }

/* customer card pinned to the bottom of the panel */
.ch-cust {
    margin-top: auto; padding: 12px 14px; border-radius: 14px;
    display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center;
}
.ch-cust .av {
    grid-row: span 2; width: 38px; height: 38px; border-radius: 50%;
    display: grid; place-items: center; font-weight: 700; color: #fff;
}
.ch-cust .who b { display: block; font-size: .88rem; color: #0f172a; }
.ch-cust .who small { font-size: .72rem; color: #64748b; }
.ch-cust .chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ch-cust .chips i {
    font-style: normal; font-size: .68rem; font-weight: 600; padding: 3px 9px; border-radius: 999px;
}
.ch-cust--off { background: #f8fafc; border: 1px dashed #cbd5e1; }
.ch-cust--off .av { background: #94a3b8; }
.ch-cust--off .chips i { background: #fee2e2; color: #b91c1c; }
.ch-cust--on { background: #f0fdfa; border: 1px solid #ccfbf1; }
.ch-cust--on .av { background: #00A896; }
.ch-cust--on .chips i { background: #ccfbf1; color: #0f766e; }
.ch-feed-foot { margin-bottom: 14px; }

/* ── Toggle bar ── */
.ch-bar {
    margin: 0 0 1.4rem;
    display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
}
.ch-sw {
    display: inline-flex; align-items: center; gap: 12px;
    padding: 8px 16px 8px 10px; border-radius: 999px;
    background: #fff; border: 1px solid #cbd5e1;
    font: inherit; font-size: .92rem; font-weight: 600; color: #0b1020; cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}
.ch-sw:hover { border-color: #0b1020; }
.ch-sw:focus-visible { outline: 3px solid #00A896; outline-offset: 3px; }
.ch-sw[aria-checked="true"] { border-color: #00A896; box-shadow: 0 10px 26px -14px rgba(0, 168, 150, .6); }
.ch-track {
    position: relative; width: 46px; height: 26px; border-radius: 999px;
    background: #cbd5e1; transition: background .3s; flex-shrink: 0;
}
.ch-track::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
    background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .25);
    transition: transform .3s cubic-bezier(.3, 1.4, .5, 1);
}
.ch-sw[aria-checked="true"] .ch-track { background: #00A896; }
.ch-sw[aria-checked="true"] .ch-track::after { transform: translateX(20px); }
.ch-hint { font-family: 'Caveat', cursive; font-size: 1.3rem; font-weight: 700; color: #00877a; transition: opacity .3s; }
.ch-hint::before { content: "\2190\00a0"; }
.ch-hint.is-gone { opacity: 0; }
.ch-sw:not([data-used]) .ch-track { animation: ch-nudge 2.2s ease-in-out infinite; }
@keyframes ch-nudge { 0%, 70%, 100% { box-shadow: 0 0 0 0 rgba(0, 168, 150, 0); } 85% { box-shadow: 0 0 0 7px rgba(0, 168, 150, .25); } }


@media (max-width: 900px) {
    .ch-stage { grid-template-columns: 1fr; padding: 14px; }
    .ch-stage > .ch-bar { margin: 2px 0; }
    .ch-head { margin-bottom: 1.6rem; }
    .ch-side { min-height: 270px; }
    .ch-board { aspect-ratio: 4 / 3.6; --t: 70px; }
}
@media (max-width: 520px) {
    .ch-section { padding: 3.25rem 1rem 3.5rem; }
    .ch-board { aspect-ratio: 1 / 1.18; --t: 58px; }
    .ch-note { display: none; }          /* no room beside the tiles at phone width */
    .ch-tile { border-radius: 15px; }
    .ch-owner { font-size: .58rem; padding: 2px 7px; }
    .ch-name { font-size: .68rem; }
    .ch-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .ch-tool, .ch-hub, .ch-pane, .ch-line, .ch-stage { transition: none !important; }
    .ch-stage.is-on .ch-feed li { animation: none; opacity: 1; transform: none; }
    .ch-stage.is-on .ch-hub::after, .ch-sw:not([data-used]) .ch-track { animation: none; }
}
