/*
 * Kwital WhatsApp-inspired theme and interactive components.
 * Loaded after site.css by site/pages/home.blade.php and site/layouts/feature.blade.php.
 *
 * Reusable components (feature pages may use these; page-specific styles go in css/features/<slug>.css):
 *   Hero        .kh-hero (doodle background) + .kh-hero-glow, .kh-hero-grid, .kh-hero-copy, .kh-badge, .kh-stats (dl > div > dt + dd)
 *   Floating    .kh-float (+ .kh-float-icon.is-green|is-teal|is-violet, .kh-pulse), positioned by the page
 *   Phone       .kh-phone > .kh-phone-screen > .kh-wa-head (.kh-wa-avatar, .kh-wa-name) + .kh-wa-body + .kh-wa-input
 *   Chat        .kh-wa-wall, .kh-msg.is-in|is-out[.is-card] (p, time, i.ti-checks.is-read), .kh-msg-media, .kh-msg-buttons,
 *               .kh-msg-event, .kh-msg-doc, .kh-day, .kh-typing (3 spans), .kh-pop (entry animation)
 *   Screens     .kh-screen > .kh-screen-head.is-wa|is-sms|is-mail|is-inbox + .kh-screen-body; .kh-sms.is-in|is-out;
 *               .kh-mail-meta/.kh-mail-from/.kh-mail-banner/.kh-mail-line/.kh-mail-btn; .kh-inbox-item + .kh-dot.is-wa|is-sms|is-mail
 *   Window      .kh-builder-window > .kh-builder-bar (span dots, strong, em[.is-sending|.is-done]) + .kh-builder-body
 *   Tabs        [data-kh-tabs][data-kh-autoplay=ms] with [role=tab][aria-controls] and [role=tabpanel].kh-panel
 *               card tabs: .kh-switch > .kh-switch-tabs > .kh-tab.is-wa|is-sms|is-mail|is-inbox (+ .kh-tab-icon, .kh-tab-bar), .kh-switch-stage
 *               pill tabs: .kh-ind-tabs > .kh-ind-tab (+ .kh-tab-bar), .kh-ind-stage > .kh-panel
 *   Controls    .kh-chips > .kh-chip[aria-pressed]; .kh-seg > button[data-kh-seg][data-value] + [data-kh-seg-panel="group:value"]
 *   Sections    .kh-dark (WhatsApp dark), .kh-teal (green band), .kh-glass cards, .kh-grad-light, .ks-grad
 *   Motion      [data-kh-count] count-up, [data-kh-tilt] hero tilt, .ks-reveal, [data-ks-spotlight] on .ks-card-glow/.kh-glass,
 *               .ks-steps.is-timeline.kh-timeline
 *   Homepage-only hooks (do not reuse): [data-kh-chat], [data-kh-builder], [data-kh-flow], [data-kh-leads]
 */

:root {
    --ks-primary: #0f7c6b;
    --ks-primary-600: #0b6a5b;
    --ks-primary-700: #075e54;
    --ks-primary-50: #e9f8f1;
    --ks-primary-100: #d3f3e3;
    --ks-accent: #25d366;
    --ks-ink: #0b1f1a;
    --ks-text: #2f403b;
    --ks-muted: #5d6f69;
    --ks-line: #e1ebe6;
    --ks-soft: #f4f9f6;
    --ks-shadow: 0 1px 2px rgba(11, 31, 26, .04), 0 8px 24px rgba(11, 31, 26, .06);
    --ks-shadow-lg: 0 24px 60px rgba(7, 94, 84, .14);
    --kh-wa: #25d366;
    --kh-wa-teal: #128c7e;
    --kh-wa-dark: #075e54;
    --kh-wa-bubble: #d9fdd3;
    --kh-wa-wall: #efeae2;
    --kh-tick: #53bdeb;
    --kh-doodle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160' fill='none' stroke='%23128C7E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' opacity='.16'%3E%3Cpath d='M18 24h26a6 6 0 0 1 6 6v12a6 6 0 0 1-6 6H30l-8 7v-7h-4a6 6 0 0 1-6-6V30a6 6 0 0 1 6-6z'/%3E%3Cpath d='M96 30l6 6 12-12M106 36l2 2 12-12'/%3E%3Ccircle cx='132' cy='92' r='9'/%3E%3Cpath d='M132 87v5l3 3'/%3E%3Cpath d='M36 108c-5-6-14-1-9 6l9 9 9-9c5-7-4-12-9-6z'/%3E%3Cpath d='M84 120l4 8 9 1-7 6 2 9-8-5-8 5 2-9-7-6 9-1z'/%3E%3Cpath d='M70 70h20v14H70zM70 70l10 8 10-8'/%3E%3C/svg%3E");
}

/* ---------- Theme overrides for shared components ---------- */
:focus-visible { outline-color: rgba(18, 140, 126, .5); }
.ks-grad { background: linear-gradient(100deg, var(--kh-wa-dark) 0%, var(--kh-wa-teal) 45%, #1faa59 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ks-btn-glow { background: linear-gradient(100deg, #075e54, #128c7e 55%, #139a5c); color: #fff; box-shadow: 0 10px 28px rgba(18, 140, 126, .35); transition: box-shadow .2s, transform .2s, filter .2s; }
.ks-btn-glow:hover { color: #fff; filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 16px 36px rgba(18, 140, 126, .45); }
.ks-checklist li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f7c6b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E"); }
.ks-card-link:hover { border-color: #a7dcc8; }
.ks-card-glow .ks-card-icon { background: linear-gradient(135deg, var(--kh-wa-dark), var(--kh-wa-teal)); box-shadow: 0 10px 22px rgba(18, 140, 126, .25); }
.ks-card-glow::before { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(37, 211, 102, .12), transparent 45%); }
.ks-steps.is-timeline::before { background: linear-gradient(90deg, var(--ks-primary-100), var(--kh-wa-teal), var(--kh-wa), var(--ks-primary-100)); }
.ks-steps.is-timeline li::before { background: linear-gradient(135deg, var(--kh-wa-dark), var(--kh-wa-teal)); box-shadow: 0 0 0 6px var(--ks-soft), 0 12px 26px rgba(18, 140, 126, .3); }
.ks-price-card.is-featured { background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, var(--kh-wa-dark), var(--kh-wa)) border-box; }
.ks-price-card .ks-badge { background: linear-gradient(100deg, var(--kh-wa-dark), var(--kh-wa-teal)); }
.ks-footer-contact i { color: var(--kh-wa); }
.ks-marquee-item i { color: var(--kh-wa-teal); }
.kh-route[hidden] { display: none !important; }
.kh-switch-stage > .kh-panel[hidden] { display: block !important; visibility: hidden; }
.kh-ind-stage > .kh-panel[hidden] { display: grid !important; visibility: hidden; }

/* ---------- Scroll progress ---------- */
.kh-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 3px; pointer-events: none; }
.kh-progress span { display: block; height: 100%; transform: scaleX(0); transform-origin: 0 50%; background: linear-gradient(90deg, var(--kh-wa-teal), var(--kh-wa)); }

/* ---------- Hero ---------- */
.kh-hero { position: relative; overflow: hidden; isolation: isolate; padding: 72px 0 0; background: linear-gradient(180deg, #ecf9f2 0%, #f7fcf9 55%, #fff 100%); }
.kh-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--kh-doodle) 0 0 / 160px 160px; -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 30%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 80% 70% at 60% 30%, #000 20%, transparent 75%); }
.kh-hero-glow { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.kh-hero-glow span { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .35; animation: ks-drift 16s ease-in-out infinite alternate; }
.kh-hero-glow span:nth-child(1) { width: 540px; height: 540px; top: -200px; right: -120px; background: #5eead4; }
.kh-hero-glow span:nth-child(2) { width: 420px; height: 420px; top: 40%; left: -220px; background: #86efac; animation-delay: -6s; }

.kh-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; }
.kh-badge { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 24px; padding: 5px 14px 5px 5px; border-radius: 999px; background: rgba(255, 255, 255, .85); border: 1px solid var(--ks-line); box-shadow: var(--ks-shadow); font-size: 13.5px; font-weight: 600; color: var(--ks-ink); }
.kh-badge b { padding: 3px 10px; border-radius: 999px; background: linear-gradient(100deg, var(--kh-wa-dark), var(--kh-wa-teal)); color: #fff; font-size: 12px; }
.kh-badge i { color: var(--kh-wa-teal); transition: transform .2s; }
.kh-badge:hover { color: var(--ks-ink); border-color: #a7dcc8; }
.kh-badge:hover i { transform: translateX(3px); }
.kh-hero h1 { font-size: clamp(2.4rem, 5vw, 4.1rem); letter-spacing: -.035em; line-height: 1.06; }
.kh-rotator { display: grid; justify-items: start; }
.kh-rotator > span { grid-area: 1 / 1; padding-bottom: .08em; background: linear-gradient(100deg, var(--kh-wa-dark) 0%, var(--kh-wa-teal) 45%, #1faa59 100%); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: 0; transform: translateY(.35em); animation: ks-rotate 7.5s ease-in-out infinite; }
.kh-rotator > span:nth-child(2) { animation-delay: 2.5s; }
.kh-rotator > span:nth-child(3) { animation-delay: 5s; }

.kh-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 32px 0 0; padding-top: 24px; border-top: 1px solid var(--ks-line); }
.kh-stats dt { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; color: var(--ks-ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.kh-stats dd { margin: 4px 0 0; font-size: 13px; line-height: 1.4; color: var(--ks-muted); }

/* Phone */
.kh-hero-stage { position: relative; display: flex; justify-content: center; padding: 24px 0 64px; perspective: 1400px; }
.kh-phone { position: relative; width: 320px; padding: 11px; border-radius: 48px; background: #0b1f1a; box-shadow: inset 0 0 0 2px #24463d, 0 40px 80px -24px rgba(7, 94, 84, .5), 0 18px 36px rgba(11, 31, 26, .22); transform: rotateY(var(--ry, -6deg)) rotateX(var(--rx, 3deg)); transition: transform .4s ease; }
.kh-phone::before { content: ""; position: absolute; top: 19px; left: 50%; z-index: 3; width: 92px; height: 24px; border-radius: 20px; background: #0b1f1a; transform: translateX(-50%); }
.kh-phone-screen { display: flex; flex-direction: column; height: 580px; border-radius: 38px; overflow: hidden; background: var(--kh-wa-wall); }
.kh-phone-hint { position: absolute; top: calc(100% + 16px); left: 0; right: 0; display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; color: var(--ks-muted); }
.kh-phone-hint i { font-size: 17px; color: var(--kh-wa-teal); }

.kh-wa-head { display: flex; align-items: center; gap: 10px; padding: 42px 14px 12px; background: var(--kh-wa-dark); color: #fff; font-size: 19px; }
.kh-wa-name { flex: 1; min-width: 0; line-height: 1.25; }
.kh-wa-name strong { display: flex; align-items: center; gap: 4px; font-size: 14.5px; color: #fff; }
.kh-wa-name strong i { font-size: 15px; color: var(--kh-wa); }
.kh-wa-name small { display: block; font-size: 11.5px; opacity: .8; }
.kh-wa-avatar { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #dff5ea; color: var(--kh-wa-dark); font-size: 19px; }
.kh-wa-avatar.is-sm { width: 34px; height: 34px; font-size: 18px; }
.kh-wa-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 14px 12px; overflow-y: auto; scrollbar-width: none; background: var(--kh-doodle) 0 0 / 160px 160px, var(--kh-wa-wall); scroll-behavior: smooth; }
.kh-wa-body::-webkit-scrollbar { display: none; }
.kh-wa-input { display: flex; align-items: center; gap: 8px; padding: 8px 10px 16px; background: var(--kh-wa-wall); }
.kh-wa-input span { flex: 1; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 22px; background: #fff; color: #8696a0; font-size: 14px; }
.kh-wa-input span i { font-size: 20px; }
.kh-wa-input b { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #00a884; color: #fff; font-size: 19px; }

/* Chat messages (shared by hero, channel screens, industries) */
.kh-wa-wall { background: var(--kh-doodle) 0 0 / 160px 160px, var(--kh-wa-wall); }
.kh-msg { position: relative; max-width: 84%; padding: 7px 10px 6px; border-radius: 10px; font-size: 13.5px; line-height: 1.42; color: #111b21; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); }
.kh-msg p { margin: 0; }
.kh-msg time { display: block; margin-top: 2px; text-align: right; font-size: 10.5px; color: #667781; }
.kh-msg time i { font-size: 15px; vertical-align: -3px; color: #8696a0; transition: color .3s; }
.kh-msg time i.is-read { color: var(--kh-tick); }
.kh-msg.is-in { align-self: flex-start; background: #fff; border-top-left-radius: 2px; }
.kh-msg.is-out { align-self: flex-end; background: var(--kh-wa-bubble); border-top-right-radius: 2px; }
.kh-msg.is-card { width: 84%; }
.kh-msg-media { display: flex; align-items: center; justify-content: center; gap: 8px; height: 96px; margin: -3px -6px 8px; border-radius: 8px; background: linear-gradient(135deg, var(--kh-wa-teal), var(--kh-wa)); color: #fff; font-size: 15px; font-weight: 700; }
.kh-msg-media i { font-size: 28px; }
.kh-msg-buttons { display: grid; margin: 8px -10px -6px; border-top: 1px solid #e9edef; }
.kh-msg-buttons > * { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 9px 8px; border: 0; background: none; color: #027eb5; font: 500 13.5px/1.2 var(--ks-font); }
.kh-msg-buttons > * + * { border-top: 1px solid #e9edef; }
.kh-msg-buttons i { font-size: 16px; }
.kh-msg-buttons button { cursor: pointer; transition: background .15s; }
.kh-msg-buttons button:hover:not(:disabled) { background: #f5f6f6; }
.kh-msg-buttons button:last-child { border-radius: 0 0 10px 10px; }
.kh-msg-buttons button:disabled { color: #8696a0; cursor: default; }
.kh-msg-buttons button.is-chosen { color: var(--kh-wa-teal); font-weight: 600; }
.kh-msg-event { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: #f0f2f5; font-size: 12.5px; }
.kh-msg-event i { font-size: 22px; color: var(--kh-wa-teal); }
.kh-msg-event strong { display: block; font-size: 13px; }
.kh-msg-doc { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; background: #f0f2f5; }
.kh-msg-doc i { font-size: 30px; color: #e5484d; }
.kh-msg-doc strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.kh-msg-doc small { display: block; color: #667781; font-size: 11.5px; }
.kh-day { align-self: center; margin-bottom: 4px; padding: 4px 10px; border-radius: 8px; background: #fff; color: #54656f; font-size: 11.5px; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); }
.kh-typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; border-radius: 10px; border-top-left-radius: 2px; background: #fff; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); }
.kh-typing span { width: 7px; height: 7px; border-radius: 50%; background: #8696a0; animation: kh-typing 1.2s infinite; }
.kh-typing span:nth-child(2) { animation-delay: .15s; }
.kh-typing span:nth-child(3) { animation-delay: .3s; }
.kh-pop { animation: kh-pop .32s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes kh-typing { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes kh-pop { from { opacity: 0; transform: translateY(8px) scale(.96); } }

/* Floating cards */
.kh-float { position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border: 1px solid var(--ks-line); border-radius: 16px; background: rgba(255, 255, 255, .96); box-shadow: 0 20px 44px -12px rgba(7, 94, 84, .28); font-size: 13px; color: var(--ks-ink); animation: ks-bob 6s ease-in-out infinite; }
.kh-float strong { display: block; font-size: 13.5px; line-height: 1.3; }
.kh-float small { display: flex; align-items: center; gap: 4px; color: var(--ks-muted); font-size: 12px; }
.kh-float small b { color: var(--ks-ink); }
.kh-float small i { font-size: 16px; color: var(--kh-tick); }
.kh-float-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; font-size: 18px; }
.kh-float-icon.is-green { background: linear-gradient(135deg, var(--kh-wa), var(--kh-wa-teal)); }
.kh-float-icon.is-teal { background: var(--kh-wa-dark); }
.kh-float-icon.is-violet { background: linear-gradient(135deg, #6d28d9, #a21caf); }
.kh-float-campaign { top: 14%; left: -2%; }
.kh-float-auto { top: 3%; right: -3%; animation-delay: -2s; }
.kh-float-leads { bottom: 18%; left: -5%; animation-delay: -4s; }
.kh-float-ai { bottom: 7%; right: -2%; animation-delay: -3s; }
.kh-pulse { position: relative; flex: none; width: 10px; height: 10px; margin: 0 4px; border-radius: 50%; background: var(--kh-wa); }
.kh-pulse::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--kh-wa); animation: ks-pulse 1.8s ease-out infinite; }

.kh-marquee-block { padding: 48px 0 56px; }
.kh-marquee-title { margin: 0 0 18px; text-align: center; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ks-muted); }

/* ---------- Tabs (shared) ---------- */
.kh-tab-bar { position: absolute; left: 0; bottom: 0; width: 0; height: 3px; background: var(--tone, var(--kh-wa-teal)); }
.is-playing > .kh-tab-bar { animation: kh-bar var(--kh-dur, 6s) linear forwards; }
@keyframes kh-bar { to { width: 100%; } }
.kh-panel:not([hidden]) { animation: kh-panel-in .45s ease both; }
@keyframes kh-panel-in { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Channel switcher ---------- */
.kh-switch { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.kh-switch-tabs { display: grid; gap: 12px; }
.kh-tab { --tone: var(--kh-wa-teal); --tone-soft: #dcf5ea; position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: 16px; width: 100%; padding: 18px 20px; border: 1px solid var(--ks-line); border-radius: 18px; background: #fff; color: var(--ks-text); font: inherit; text-align: left; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s; }
.kh-tab.is-sms { --tone: #2563eb; --tone-soft: #dbeafe; }
.kh-tab.is-mail { --tone: #ea580c; --tone-soft: #ffedd5; }
.kh-tab.is-inbox { --tone: #7c3aed; --tone-soft: #ede9fe; }
.kh-tab:hover { border-color: var(--tone-soft); transform: translateX(2px); }
.kh-tab[aria-selected="true"] { border-color: var(--tone); box-shadow: 0 18px 40px -24px var(--tone); }
.kh-tab strong { display: block; color: var(--ks-ink); font-size: 1.05rem; }
.kh-tab small { display: block; margin-top: 2px; color: var(--ks-muted); font-size: 14px; line-height: 1.5; }
.kh-tab-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--tone-soft); color: var(--tone); font-size: 22px; transition: background .2s, color .2s; }
.kh-tab[aria-selected="true"] .kh-tab-icon { background: var(--tone); color: #fff; }

.kh-switch-stage { display: grid; grid-template-columns: minmax(0, 1fr); }
.kh-switch-stage .kh-panel { grid-area: 1 / 1; }
.kh-screen { max-width: 440px; margin: 0 auto; overflow: hidden; border: 1px solid var(--ks-line); border-radius: 28px; background: #fff; box-shadow: 0 30px 70px -30px rgba(7, 94, 84, .4); }
.kh-screen-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; color: #fff; font-size: 20px; line-height: 1.25; }
.kh-screen-head strong { display: block; font-size: 14.5px; color: #fff; }
.kh-screen-head small { display: block; font-size: 12px; opacity: .8; }
.kh-screen-head.is-wa { background: var(--kh-wa-dark); }
.kh-screen-head.is-sms { background: #2563eb; }
.kh-screen-head.is-mail { background: #ea580c; }
.kh-screen-head.is-inbox { background: linear-gradient(100deg, #5b21b6, #7c3aed); }
.kh-screen-body { display: flex; flex-direction: column; gap: 8px; min-height: 340px; padding: 16px; }
.kh-sms-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .2); font-size: 12px; font-weight: 700; }
.kh-sms-day { margin: 0 0 4px; text-align: center; font-size: 12px; color: var(--ks-muted); }
.kh-sms { max-width: 80%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.45; }
.kh-sms.is-in { align-self: flex-start; background: #e9e9eb; color: #111; border-bottom-left-radius: 6px; }
.kh-sms.is-out { align-self: flex-end; background: #2563eb; color: #fff; border-bottom-right-radius: 6px; }
.kh-sms-route { display: flex; align-items: center; justify-content: center; gap: 6px; margin: auto 0 0; font-size: 12px; color: var(--ks-muted); }
.kh-sms-route i { font-size: 16px; color: #16a34a; }
.kh-mail-meta { display: flex; align-items: center; gap: 10px; line-height: 1.3; font-size: 14px; color: var(--ks-ink); }
.kh-mail-meta small { display: block; color: var(--ks-muted); font-size: 12px; }
.kh-mail-from { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #ffedd5; color: #c2410c; font-size: 13px; font-weight: 700; }
.kh-screen-mail h4 { margin: 8px 0 2px; font-size: 1.05rem; }
.kh-mail-banner { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 14px; background: linear-gradient(135deg, #fff7ed, #ffedd5); color: #9a3412; font-size: 14px; line-height: 1.4; }
.kh-mail-banner i { font-size: 34px; color: #ea580c; }
.kh-mail-line { margin: 4px 0; font-size: 14px; }
.kh-mail-btn { align-self: flex-start; padding: 9px 16px; border-radius: 10px; background: #ea580c; color: #fff; font-size: 13.5px; font-weight: 600; }
.kh-mail-foot { margin: auto 0 0; text-align: center; font-size: 12px; color: var(--ks-muted); }
.kh-inbox-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px; font-size: 14px; color: var(--ks-ink); }
.kh-inbox-item.is-active { background: var(--ks-soft); }
.kh-inbox-item > span:nth-child(2) { flex: 1; min-width: 0; line-height: 1.35; }
.kh-inbox-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ks-muted); font-size: 12.5px; }
.kh-inbox-item em { font-style: normal; font-size: 12px; color: var(--ks-muted); }
.kh-inbox-item b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--kh-wa); color: #fff; font-size: 11px; }
.kh-dot { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; font-size: 18px; }
.kh-dot.is-wa { background: var(--kh-wa); }
.kh-dot.is-sms { background: #2563eb; }
.kh-dot.is-mail { background: #ea580c; }
.kh-inbox-reply { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 6px 6px 6px 16px; border: 1px solid var(--ks-line); border-radius: 999px; color: var(--ks-muted); font-size: 13.5px; }
.kh-inbox-reply span { flex: 1; min-width: 0; }
.kh-inbox-reply b { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--kh-wa-teal); color: #fff; font-size: 17px; }
.kh-panel-link { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; font-size: 14.5px; font-weight: 600; }

/* ---------- Campaign builder ---------- */
.kh-builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: center; padding: 36px; border: 1px solid var(--ks-line); border-radius: 28px; background: #fff; box-shadow: var(--ks-shadow-lg); }
.kh-step + .kh-step { margin-top: 26px; }
.kh-step-title { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-weight: 700; color: var(--ks-ink); }
.kh-step-title span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ks-primary); color: #fff; font-size: 13px; }
.kh-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.kh-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 16px; border: 1.5px solid var(--ks-line); border-radius: 999px; background: #fff; color: var(--ks-ink); font: 600 14px/1.2 var(--ks-font); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.kh-chip i { font-size: 18px; color: var(--ks-primary); }
.kh-chip.is-wa i { color: #1faa59; }
.kh-chip.is-sms i { color: #2563eb; }
.kh-chip.is-mail i { color: #ea580c; }
.kh-chip small { padding: 3px 7px; border-radius: 999px; background: var(--ks-soft); color: var(--ks-muted); font-size: 12px; }
.kh-chip:hover { border-color: #9fdcc4; }
.kh-chip[aria-pressed="true"] { border-color: var(--ks-primary); background: var(--ks-primary-50); color: var(--ks-primary-700); box-shadow: 0 0 0 4px rgba(18, 140, 126, .1); }
.kh-chip[aria-pressed="true"] small { background: #fff; }
.kh-chip:disabled { cursor: not-allowed; opacity: .6; }
.kh-send { width: 100%; }
.kh-send:disabled { cursor: progress; filter: saturate(.7); transform: none; }

.kh-builder-window, .kh-leads-window { overflow: hidden; border: 1px solid var(--ks-line); border-radius: 20px; background: var(--ks-soft); }
.kh-builder-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--ks-line); background: #fff; font-size: 13px; }
.kh-builder-bar > span { flex: none; width: 10px; height: 10px; margin-right: 34px; border-radius: 50%; background: #f87171; box-shadow: 16px 0 0 #fbbf24, 32px 0 0 #34d399; }
.kh-builder-bar strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ks-ink); font-weight: 600; }
.kh-builder-bar em { margin-left: auto; padding: 3px 10px; border-radius: 999px; background: #e9edef; color: #54656f; font-size: 12px; font-style: normal; font-weight: 700; white-space: nowrap; }
.kh-builder-bar em.is-sending { background: #fef3c7; color: #92400e; }
.kh-builder-bar em.is-done { background: #dcfce7; color: #15803d; }
.kh-builder-body { display: grid; gap: 18px; padding: 22px; }
.kh-builder-msg { padding: 14px 16px; border: 1px solid var(--ks-line); border-radius: 16px; background: #fff; transition: background .3s, border-color .3s, color .3s; }
.kh-builder-msg-label { display: flex; align-items: center; gap: 6px; color: var(--ks-muted); font-size: 12.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.kh-builder-msg-label i { font-size: 17px; }
.kh-builder-msg p { margin: 8px 0 0; color: var(--ks-ink); font-size: 15px; transition: color .3s; }
.kh-builder-msg[data-kh-builder-channel="whatsapp"] { background: var(--kh-wa-bubble); border-color: #bfe9b8; border-top-right-radius: 4px; }
.kh-builder-msg[data-kh-builder-channel="sms"] { background: #2563eb; border-color: #2563eb; border-bottom-right-radius: 4px; }
.kh-builder-msg[data-kh-builder-channel="sms"] p, .kh-builder-msg[data-kh-builder-channel="sms"] .kh-builder-msg-label { color: #fff; }
.kh-builder-msg[data-kh-builder-channel="email"] { border-left: 4px solid #ea580c; }
.kh-builder-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kh-builder-stats div { padding: 14px 8px; border: 1px solid var(--ks-line); border-radius: 14px; background: #fff; text-align: center; transition: border-color .3s, box-shadow .3s; }
.kh-builder-stats strong { display: block; color: var(--ks-ink); font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kh-builder-stats span { color: var(--ks-muted); font-size: 12.5px; }
.kh-builder.is-done .kh-builder-stats div { border-color: #a7dcc8; box-shadow: 0 10px 24px -14px rgba(18, 140, 126, .5); }
.kh-builder-meter { height: 10px; overflow: hidden; border-radius: 999px; background: #dfeae5; }
.kh-builder-meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--kh-wa-teal), var(--kh-wa)); }
.kh-builder-note { margin: 0; text-align: center; font-size: 13.5px; color: var(--ks-muted); }

/* ---------- Automation flow ---------- */
.kh-dark { position: relative; overflow: hidden; background: radial-gradient(700px 420px at 10% 8%, rgba(37, 211, 102, .16), transparent 60%), radial-gradient(640px 420px at 92% 92%, rgba(18, 140, 126, .35), transparent 60%), #0b141a; color: rgba(255, 255, 255, .75); }
.kh-dark h2, .kh-dark h3 { color: #fff; }
.kh-dark .ks-section-head p { color: rgba(255, 255, 255, .68); }
.kh-dark .ks-eyebrow { color: var(--kh-wa); }
.kh-grad-light { background: linear-gradient(100deg, var(--kh-wa), #a7f3d0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kh-flow { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr); gap: 48px; align-items: center; }
.kh-flow-track { display: flex; flex-direction: column; align-items: center; margin: 0; padding: 0; list-style: none; }
.kh-flow-track > li { position: relative; display: flex; justify-content: center; width: 100%; }
.kh-flow-track > li + li { padding-top: 34px; }
.kh-flow-track > li + li::before, .kh-flow-lane .kh-node + .kh-node::before { content: ""; position: absolute; top: 0; left: 50%; width: 2px; height: 34px; transform: translateX(-50%); background: repeating-linear-gradient(180deg, rgba(37, 211, 102, .75) 0 6px, transparent 6px 12px); animation: kh-flowline .8s linear infinite; }
@keyframes kh-flowline { to { background-position: 0 12px; } }
.kh-flow-track > li.kh-flow-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-top: 58px; }
.kh-flow-split::after { content: ""; position: absolute; top: 34px; left: 25%; right: 25%; height: 2px; background: rgba(37, 211, 102, .5); }
.kh-flow-lane { position: relative; display: flex; flex-direction: column; align-items: center; gap: 30px; }
.kh-flow-lane::before { content: ""; position: absolute; top: -24px; left: 50%; width: 2px; height: 24px; transform: translateX(-50%); background: rgba(37, 211, 102, .5); }
.kh-flow-lane .kh-node + .kh-node::before { top: -30px; height: 30px; }
.kh-lane-label { position: absolute; top: -22px; left: calc(50% + 8px); padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.kh-lane-label.is-yes { background: rgba(37, 211, 102, .18); color: #4ade80; }
.kh-lane-label.is-no { background: rgba(248, 113, 113, .16); color: #fca5a5; }
.kh-node { position: relative; display: inline-flex; align-items: center; gap: 12px; min-width: 260px; padding: 12px 18px 12px 12px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; background: rgba(255, 255, 255, .05); color: #fff; font: 600 14.5px/1.3 var(--ks-font); text-align: left; cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: border-color .25s, background .25s, box-shadow .25s, transform .25s; }
.kh-flow-lane .kh-node { width: 100%; min-width: 0; max-width: 260px; }
.kh-node > i { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: rgba(255, 255, 255, .08); color: var(--kh-wa); font-size: 20px; transition: background .25s, color .25s; }
.kh-node.is-trigger > i { color: #fbbf24; }
.kh-node.is-condition > i { color: #60a5fa; }
.kh-node small { display: block; color: rgba(255, 255, 255, .5); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.kh-node:hover { border-color: rgba(37, 211, 102, .5); }
.kh-node.is-active { border-color: var(--kh-wa); background: rgba(37, 211, 102, .12); box-shadow: 0 0 0 4px rgba(37, 211, 102, .15), 0 18px 40px -16px rgba(37, 211, 102, .55); transform: scale(1.03); }
.kh-node.is-active > i { background: var(--kh-wa); color: #0b141a; }
.kh-flow-detail { padding: 32px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 24px; background: rgba(255, 255, 255, .05); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.kh-flow-detail-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; background: var(--kh-wa); color: #0b141a; font-size: 26px; }
.kh-flow-detail-step { margin: 18px 0 6px; color: var(--kh-wa); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.kh-flow-detail h3 { font-size: 1.35rem; }
.kh-flow-detail p { color: rgba(255, 255, 255, .72); }
.kh-flow-detail.is-swap h3, .kh-flow-detail.is-swap [data-kh-flow-desc], .kh-flow-detail.is-swap .kh-flow-detail-icon { animation: kh-panel-in .4s ease both; }
.kh-flow-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 24px; }
.kh-flow-meta span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .82); font-size: 12.5px; }
.kh-flow-meta i { font-size: 15px; color: var(--kh-wa); }

/* ---------- Industries ---------- */
.kh-ind-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 36px; }
.kh-ind-tab { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 7px; height: 46px; padding: 0 14px; border: 1.5px solid var(--ks-line); border-radius: 999px; background: #fff; color: var(--ks-ink); font: 600 14px/1 var(--ks-font); white-space: nowrap; cursor: pointer; transition: border-color .2s, background .2s, color .2s, box-shadow .2s; }
.kh-ind-tab i { font-size: 19px; color: var(--ks-primary); }
.kh-ind-tab:hover { border-color: #9fdcc4; }
.kh-ind-tab[aria-selected="true"] { border-color: transparent; background: linear-gradient(100deg, var(--kh-wa-dark), var(--kh-wa-teal)); color: #fff; box-shadow: 0 12px 26px -10px rgba(7, 94, 84, .55); }
.kh-ind-tab[aria-selected="true"] i { color: #fff; }
.kh-ind-tab .kh-tab-bar { --tone: rgba(255, 255, 255, .6); }
.kh-ind-stage { display: grid; grid-template-columns: minmax(0, 1fr); }
.kh-ind-stage > .kh-panel { grid-area: 1 / 1; }
.kh-ind-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 40px; border: 1px solid var(--ks-line); border-radius: 28px; background: linear-gradient(135deg, #f1faf5, #fff 70%); }
.kh-ind-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 18px; border-radius: 16px; background: linear-gradient(135deg, var(--kh-wa-dark), var(--kh-wa-teal)); color: #fff; font-size: 28px; box-shadow: 0 12px 26px -8px rgba(7, 94, 84, .5); }
.kh-ind-copy h3 { font-size: 1.6rem; }
.kh-ind-copy > p { color: var(--ks-muted); font-size: 1.02rem; }
.kh-ind-copy .ks-checklist { margin-bottom: 26px; }
.kh-ind-chat { width: 100%; max-width: 400px; margin: 0 auto; overflow: hidden; border: 1px solid var(--ks-line); border-radius: 24px; background: var(--kh-wa-wall); box-shadow: 0 30px 60px -28px rgba(7, 94, 84, .45); }
.kh-ind-chat .kh-screen-body { min-height: 250px; justify-content: flex-end; }

/* ---------- Route picker ---------- */
.kh-seg-group { margin-top: 22px; }
.kh-seg-label { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--ks-muted); font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.kh-seg-label i { font-size: 17px; color: var(--ks-primary); }
.kh-seg { display: inline-flex; padding: 4px; border: 1px solid var(--ks-line); border-radius: 14px; background: #fff; box-shadow: var(--ks-shadow); }
.kh-seg button { height: 40px; padding: 0 18px; border: 0; border-radius: 10px; background: none; color: var(--ks-text); font: 600 14px/1 var(--ks-font); cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.kh-seg button:hover { color: var(--ks-primary); }
.kh-seg button[aria-pressed="true"] { background: var(--ks-primary); color: #fff; box-shadow: 0 8px 18px -8px rgba(7, 94, 84, .6); }
.kh-routes { display: grid; gap: 18px; }
.kh-route { padding: 24px; border: 1px solid var(--ks-line); border-radius: 22px; background: #fff; box-shadow: var(--ks-shadow-lg); animation: kh-panel-in .4s ease both; }
.kh-route-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; line-height: 1.3; }
.kh-route-head small { display: block; color: var(--ks-muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.kh-route-head strong { display: block; color: var(--ks-ink); font-size: 1.1rem; }
.kh-route-icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: #fff; font-size: 24px; }
.kh-route-icon.is-wa { background: linear-gradient(135deg, var(--kh-wa), var(--kh-wa-teal)); }
.kh-route-icon.is-meta { background: #0866ff; }
.kh-route-icon.is-android { background: #16a34a; }
.kh-route-icon.is-api { background: #0f766e; }
.kh-route-tag { margin-left: auto; padding: 4px 10px; border-radius: 999px; background: #dcfce7; color: #15803d; font-size: 12px; font-style: normal; font-weight: 700; white-space: nowrap; }
.kh-route-tag.is-blue { background: #dbeafe; color: #1d4ed8; }
.kh-route dl { display: grid; gap: 10px; margin: 0; }
.kh-route dl div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding-top: 10px; border-top: 1px dashed var(--ks-line); }
.kh-route dt { color: var(--ks-muted); font-size: 13px; font-weight: 600; }
.kh-route dd { margin: 0; color: var(--ks-ink); font-size: 14.5px; }

/* ---------- Lead search ---------- */
.kh-leads-window { background: #fff; box-shadow: var(--ks-shadow-lg); }
.kh-leads-body { display: grid; gap: 12px; padding: 20px; }
.kh-leads-search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border: 1.5px solid var(--ks-primary); border-radius: 12px; box-shadow: 0 0 0 4px rgba(18, 140, 126, .1); color: var(--ks-ink); font-size: 15px; }
.kh-leads-search i { font-size: 20px; color: var(--ks-primary); }
.kh-caret { width: 2px; height: 20px; margin-left: -8px; background: var(--ks-primary); animation: kh-blink 1s steps(1) infinite; }
@keyframes kh-blink { 50% { opacity: 0; } }
.kh-leads-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.kh-leads-list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--ks-line); border-radius: 12px; font-size: 14px; opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s; }
.kh-leads-list li.is-in { opacity: 1; transform: none; }
.kh-leads-list li > i { font-size: 20px; color: #ea4335; }
.kh-leads-list li > span { min-width: 0; line-height: 1.35; }
.kh-leads-list strong { display: block; color: var(--ks-ink); }
.kh-leads-list small { display: flex; align-items: center; gap: 3px; color: var(--ks-muted); font-size: 12.5px; }
.kh-leads-list small i { font-size: 12px; color: #f59e0b; }
.kh-leads-list em, .kh-leads-import em { margin-left: auto; font-style: normal; white-space: nowrap; }
.kh-leads-list em { padding: 3px 9px; border-radius: 999px; background: #dcfce7; color: #15803d; font-size: 12px; font-weight: 600; }
.kh-leads-import { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--ks-soft); font-size: 14px; opacity: .45; transition: opacity .3s; }
.kh-leads-import.is-ready { opacity: 1; }
.kh-leads-import > i { font-size: 20px; color: var(--ks-primary); }
.kh-leads-import > span { min-width: 0; line-height: 1.35; }
.kh-leads-import strong { display: block; color: var(--ks-ink); }
.kh-leads-import small { display: block; color: var(--ks-muted); font-size: 12.5px; }
.kh-leads-import em { padding: 6px 12px; border-radius: 8px; background: var(--ks-primary); color: #fff; font-size: 12.5px; font-weight: 700; transition: background .3s; }
.kh-leads-import.is-done em { background: #15803d; }
.kh-replay { display: flex; align-items: center; gap: 6px; margin: 14px auto 0; padding: 8px 14px; border: 0; border-radius: 10px; background: none; color: var(--ks-primary); font: 600 14px/1 var(--ks-font); cursor: pointer; }
.kh-replay:hover { background: var(--ks-primary-50); }

/* ---------- Teal AI band ---------- */
.kh-teal { position: relative; overflow: hidden; background: radial-gradient(640px 400px at 88% 0%, rgba(37, 211, 102, .35), transparent 60%), radial-gradient(520px 360px at 0% 100%, rgba(52, 183, 241, .18), transparent 60%), linear-gradient(135deg, #075e54, #0a7466 60%, #0f8a78); color: rgba(255, 255, 255, .85); }
.kh-teal h2, .kh-teal h3 { color: #fff; }
.kh-teal .ks-section-head p { color: rgba(255, 255, 255, .8); }
.kh-teal .ks-eyebrow { color: #b9f6d0; }
.kh-glass { overflow: hidden; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: rgba(255, 255, 255, .85); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.kh-glass::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .14), transparent 45%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.kh-glass:hover::before { opacity: 1; }
.kh-glass p { color: rgba(255, 255, 255, .78) !important; }
.kh-glass .ks-card-icon { background: var(--kh-wa); color: #073b33; }
.kh-glass .ks-card-more { color: #b9f6d0; }
.ks-card-link.kh-glass:hover { border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .85); box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .45); }

/* ---------- Timeline fill ---------- */
.kh-timeline::before { transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.4s ease .2s; }
.kh-timeline.is-visible::before { transform: scaleX(1); }
.kh-timeline li::before { opacity: 0; transform: scale(.4); transition: opacity .4s ease, transform .4s cubic-bezier(.2, .9, .3, 1.3); }
.kh-timeline.is-visible li::before { opacity: 1; transform: none; }
.kh-timeline li:nth-child(2)::before { transition-delay: .35s; }
.kh-timeline li:nth-child(3)::before { transition-delay: .7s; }
.kh-timeline li:nth-child(4)::before { transition-delay: 1.05s; }

/* ---------- Feature page hero and switcher ---------- */
.kh-fhero { padding-top: 56px; }
.kh-fhero .kh-hero-grid { align-items: center; }
.kh-fhero .kh-hero-grid.is-single { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.kh-fhero h1 { font-size: clamp(2.2rem, 4.2vw, 3.4rem); letter-spacing: -.03em; line-height: 1.08; }
.kh-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 22px; font-size: 13.5px; color: var(--ks-muted); }
.kh-crumbs a { color: var(--ks-muted); }
.kh-crumbs a:hover { color: var(--ks-primary); }
.kh-crumbs i { font-size: 13px; }
.kh-crumbs [aria-current] { color: var(--ks-ink); font-weight: 600; }
.kh-fhero-tag { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 5px 14px 5px 5px; border: 1px solid var(--ks-line); border-radius: 999px; background: rgba(255, 255, 255, .85); box-shadow: var(--ks-shadow); color: var(--ks-ink); font-size: 14px; font-weight: 700; }
.kh-fhero-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--kh-wa-dark), var(--kh-wa-teal)); color: #fff; font-size: 17px; }
.kh-fhero-visual { position: relative; min-width: 0; }

.kh-fnav { padding: 40px 0 28px; }
.kh-fnav-track { position: relative; display: flex; gap: 8px; padding: 6px; overflow-x: auto; scrollbar-width: none; border: 1px solid var(--ks-line); border-radius: 18px; background: rgba(255, 255, 255, .75); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: var(--ks-shadow); }
.kh-fnav-track::-webkit-scrollbar { display: none; }
.kh-fnav-item { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 12px; color: var(--ks-text); font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: background .15s, color .15s; }
.kh-fnav-item i { font-size: 17px; color: var(--ks-primary); }
.kh-fnav-item:hover { background: var(--ks-primary-50); color: var(--ks-primary-700); }
.kh-fnav-item.is-active { background: linear-gradient(100deg, var(--kh-wa-dark), var(--kh-wa-teal)); color: #fff; box-shadow: 0 8px 18px -8px rgba(7, 94, 84, .6); }
.kh-fnav-item.is-active i { color: #fff; }

.ks-btn:disabled, .ks-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; filter: none; }

/* ---------- Features index ---------- */
.kh-launcher { position: relative; background: radial-gradient(420px 320px at 80% 0%, rgba(37, 211, 102, .35), transparent 60%), linear-gradient(180deg, #075e54 0%, #0b4f47 45%, #0b1f1a 100%); color: #fff; }
.kh-launcher-head { padding: 42px 18px 14px; }
.kh-launcher-time { position: absolute; top: 18px; left: 26px; font-size: 12px; font-weight: 700; opacity: .85; }
.kh-launcher-head strong { display: block; margin-bottom: 10px; font-size: 1.3rem; letter-spacing: -.02em; }
.kh-launcher-search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 12px; background: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .75); font-size: 13px; }
.kh-launcher-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 6px; padding: 8px 12px; }
.kh-app { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; color: #fff; text-align: center; animation: kh-app-in .5s cubic-bezier(.2, .9, .3, 1.2) both; animation-delay: calc(var(--i) * 45ms + .2s); }
.kh-app:hover { color: #fff; }
.kh-app-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; background: var(--app, var(--kh-wa)); box-shadow: 0 8px 18px -6px rgba(0, 0, 0, .45); color: #fff; font-size: 25px; transition: transform .2s; }
.kh-app:hover .kh-app-icon, .kh-app:focus-visible .kh-app-icon { transform: translateY(-3px) scale(1.06); }
.kh-app-name { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600; line-height: 1.2; }
.kh-app.is-channels { --app: linear-gradient(135deg, #25d366, #128c7e); }
.kh-app.is-audience { --app: linear-gradient(135deg, #38bdf8, #2563eb); }
.kh-app.is-engagement { --app: linear-gradient(135deg, #fb923c, #ea580c); }
.kh-app.is-automation { --app: linear-gradient(135deg, #a78bfa, #6d28d9); }
.kh-app.is-operations { --app: linear-gradient(135deg, #2dd4bf, #0f766e); }
.kh-launcher-dock { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; justify-content: space-around; padding: 10px; border-radius: 22px; background: rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.kh-launcher-dock span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, .16); font-size: 22px; }
@keyframes kh-app-in { from { opacity: 0; transform: translateY(14px) scale(.8); } }

.kh-filter-chips { justify-content: center; margin-bottom: 32px; }
.kh-filter-grid > [hidden] { display: none !important; }
.kh-filter-grid > .kh-module:not([hidden]) { animation: kh-panel-in .4s ease both; }
.kh-module { --tone: var(--kh-wa-teal); }
.kh-module.is-audience { --tone: #2563eb; }
.kh-module.is-engagement { --tone: #ea580c; }
.kh-module.is-automation { --tone: #7c3aed; }
.kh-module.is-operations { --tone: #0f766e; }
.kh-module-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.kh-module-top .ks-card-icon { margin: 0; background: var(--tone); box-shadow: 0 10px 22px -8px var(--tone); }
.kh-module-group { padding: 3px 10px; border-radius: 999px; background: var(--ks-soft); color: var(--ks-muted); font-size: 12px; font-weight: 700; }
.kh-module .ks-card-more { color: var(--tone); }
.kh-module .ks-card-more i { transition: transform .2s; }
.kh-module:hover .ks-card-more i { transform: translateX(4px); }

.kh-journey-step { margin: 0 0 6px; color: var(--ks-primary); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.kh-journey-links { display: grid; gap: 12px; }
.kh-journey-link { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--ks-line); border-radius: 16px; background: #fff; color: var(--ks-text); transition: border-color .2s, box-shadow .2s, transform .2s; }
.kh-journey-link:hover { border-color: #a7dcc8; box-shadow: var(--ks-shadow); transform: translateX(3px); color: var(--ks-text); }
.kh-journey-link > span:nth-child(2) { flex: 1; min-width: 0; line-height: 1.35; }
.kh-journey-link strong { display: block; color: var(--ks-ink); }
.kh-journey-link small { display: block; color: var(--ks-muted); font-size: 13px; }
.kh-journey-link > i { color: var(--ks-primary); font-size: 18px; }
.kh-journey-icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--ks-primary-50); color: var(--ks-primary); font-size: 21px; }

.kh-band { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; }
.kh-band p { color: rgba(255, 255, 255, .8); font-size: 1.05rem; }
.kh-band-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; }
.kh-band-stats div { padding: 22px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 18px; background: rgba(255, 255, 255, .08); }
.kh-band-stats dt { color: #fff; font-size: 2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.kh-band-stats dd { margin: 4px 0 0; color: rgba(255, 255, 255, .75); font-size: 14px; }

/* ---------- Feature tour (homepage) ---------- */
.kh-fx .is-channels { --grad: linear-gradient(135deg, #25d366, #128c7e); --tone: #128c7e; }
.kh-fx .is-audience { --grad: linear-gradient(135deg, #38bdf8, #2563eb); --tone: #2563eb; }
.kh-fx .is-engagement { --grad: linear-gradient(135deg, #fb923c, #ea580c); --tone: #ea580c; }
.kh-fx .is-automation { --grad: linear-gradient(135deg, #a78bfa, #6d28d9); --tone: #6d28d9; }
.kh-fx .is-operations { --grad: linear-gradient(135deg, #2dd4bf, #0f766e); --tone: #0f766e; }
.kh-fx { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 28px; align-items: start; }
.kh-fx-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kh-fx-tile { position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 56px; padding: 8px 10px; border: 1.5px solid var(--ks-line); border-radius: 14px; background: #fff; color: var(--ks-ink); font: 600 13.5px/1.2 var(--ks-font); text-align: left; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s, background .2s, color .2s; }
.kh-fx-tile:hover { border-color: #9fdcc4; transform: translateY(-1px); }
.kh-fx-tile[aria-selected="true"] { border-color: transparent; background: linear-gradient(110deg, var(--kh-wa-dark), var(--kh-wa-teal)); color: #fff; box-shadow: 0 14px 28px -14px rgba(7, 94, 84, .7); }
.kh-fx-tile .kh-tab-bar { --tone: rgba(255, 255, 255, .7); }
.kh-fx-tile-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--grad); color: #fff; font-size: 19px; box-shadow: 0 6px 14px -6px var(--tone); }
.kh-fx-tile[aria-selected="true"] .kh-fx-tile-icon { box-shadow: 0 0 0 2px rgba(255, 255, 255, .55); }
.kh-fx-tile-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.kh-fx-stage { display: grid; grid-template-columns: minmax(0, 1fr); }
.kh-fx-stage > .kh-panel { grid-area: 1 / 1; }
.kh-fx-stage > .kh-panel[hidden] { display: grid !important; visibility: hidden; }
.kh-fx-panel { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 28px; align-items: center; padding: 32px; border: 1px solid var(--ks-line); border-radius: 26px; background: radial-gradient(520px 260px at 100% 0%, color-mix(in srgb, var(--tone) 12%, transparent), transparent 70%), #fff; box-shadow: var(--ks-shadow); }
.kh-fx-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.kh-fx-icon { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--grad); color: #fff; font-size: 27px; box-shadow: 0 12px 24px -10px var(--tone); }
.kh-fx-meta { display: block; color: var(--tone); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.kh-fx-head h3 { margin: 2px 0 0; font-size: 1.55rem; letter-spacing: -.02em; }
.kh-fx-copy > p { margin: 0 0 16px; color: var(--ks-muted); }
.kh-fx-points { display: grid; gap: 9px; margin: 0 0 24px; padding: 0; list-style: none; }
.kh-fx-points li { display: flex; align-items: flex-start; gap: 8px; color: var(--ks-text); font-size: 15px; line-height: 1.4; }
.kh-fx-points i { flex: none; margin-top: 1px; color: var(--tone); font-size: 18px; }
.kh-fx-preview { min-width: 0; padding: 14px; border-radius: 20px; background: var(--kh-doodle), var(--kh-wa-wall); }
.kh-fx-window { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 0 4px; color: var(--ks-ink); font-size: 13px; }
.kh-fx-dots { display: flex; gap: 5px; }
.kh-fx-dots i { width: 9px; height: 9px; border-radius: 50%; background: #f87171; }
.kh-fx-dots i:nth-child(2) { background: #fbbf24; }
.kh-fx-dots i:nth-child(3) { background: #34d399; }
.kh-fx-rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.kh-fx-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(11, 31, 26, .08), 0 8px 18px -12px rgba(11, 31, 26, .25); }
.kh-fx-panel:not([hidden]) .kh-fx-row { animation: kh-pop .5s ease both; animation-delay: calc(var(--i) * .12s + .15s); }
.kh-fx-row-text { min-width: 0; line-height: 1.3; }
.kh-fx-row-text small { display: block; color: var(--ks-muted); font-size: 12px; }
.kh-fx-row-text strong { display: block; overflow: hidden; color: var(--ks-ink); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.kh-fx-pill { flex: none; padding: 4px 10px; border-radius: 999px; background: #eef2f1; color: #3d5751; font-size: 12px; font-weight: 700; white-space: nowrap; }
.kh-fx-pill.is-ok { background: var(--kh-wa-bubble); color: #0b6a5b; }
.kh-fx-pill.is-wait { background: #fff4d6; color: #8a5a00; }
.kh-fx-note { margin: 10px 4px 0; color: var(--ks-muted); font-size: 12px; text-align: right; }
.kh-fx-more { margin-top: 32px; text-align: center; }
@media (max-width: 1100px) {
    .kh-fx { grid-template-columns: 300px minmax(0, 1fr); }
    .kh-fx-panel { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
    .kh-fx { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .kh-fx-list { display: flex; margin: 0 -18px; padding: 0 18px 6px; overflow-x: auto; scrollbar-width: none; }
    .kh-fx-list::-webkit-scrollbar { display: none; }
    .kh-fx-tile { flex: none; min-height: 50px; }
    .kh-fx-tile-name { overflow: visible; }
}
@media (max-width: 640px) {
    .kh-fx-panel { gap: 20px; padding: 20px; border-radius: 22px; }
    .kh-fx-icon { width: 46px; height: 46px; border-radius: 14px; font-size: 23px; }
    .kh-fx-head h3 { font-size: 1.3rem; }
    .kh-fx-copy .ks-btn { width: 100%; justify-content: center; }
    .kh-fx-row-text strong { white-space: normal; }
}

/* ---------- WhatsApp floating button ---------- */
.kh-wa-fab { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px 0 16px; border-radius: 999px; background: linear-gradient(135deg, #25d366, #128c7e); color: #fff; font-size: 15px; font-weight: 700; box-shadow: 0 14px 30px -8px rgba(18, 140, 126, .6); transition: transform .2s, box-shadow .2s; }
.kh-wa-fab i { font-size: 28px; }
.kh-wa-fab::before { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid #25d366; animation: kh-ring 2.4s ease-out infinite; pointer-events: none; }
.kh-wa-fab:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 18px 36px -8px rgba(18, 140, 126, .7); }
@keyframes kh-ring { from { opacity: .8; transform: scale(1); } to { opacity: 0; transform: scale(1.25, 1.5); } }

@media (prefers-reduced-motion: reduce) {
    .kh-rotator > span:first-child { opacity: 1; transform: none; }
    .kh-phone { transform: none; }
    .kh-leads-list li { opacity: 1; transform: none; }
    .kh-timeline::before, .kh-timeline li::before { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .kh-float-ai { display: none; }
    .kh-float-campaign { left: -6%; }
    .kh-float-leads { left: -8%; }
}
@media (max-width: 960px) {
    .kh-hero { padding-top: 56px; }
    .kh-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .kh-hero-stage { max-width: 560px; width: 100%; margin: 0 auto; }
    .kh-phone { transform: none; }
    .kh-float-ai { display: flex; }
    .kh-float-campaign { left: 0; }
    .kh-float-leads { left: 0; }
    .kh-switch { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .kh-switch-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .kh-tab { flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px; text-align: center; }
    .kh-tab small { display: none; }
    .kh-tab:hover { transform: none; }
    .kh-builder, .kh-flow, .kh-ind-panel, .ks-split, .kh-band { grid-template-columns: minmax(0, 1fr); }
    .kh-builder { padding: 24px; }
    .kh-ind-panel { padding: 28px; }
}
@media (max-width: 640px) {
    .kh-hero { padding-top: 40px; }
    .kh-hero h1 { font-size: clamp(2.1rem, 9.5vw, 2.7rem); }
    .kh-fhero { padding-top: 32px; }
    .kh-fhero h1 { font-size: clamp(2rem, 8.6vw, 2.5rem); }
    .kh-fnav { padding: 28px 0 20px; }
    .kh-launcher-grid { gap: 12px 4px; padding: 6px 8px; }
    .kh-app-icon { width: 44px; height: 44px; border-radius: 13px; font-size: 22px; }
    .kh-app-name { font-size: 10px; }
    .kh-filter-chips { flex-wrap: nowrap; justify-content: flex-start; margin: 0 -18px 24px; padding: 0 18px 6px; overflow-x: auto; scrollbar-width: none; }
    .kh-filter-chips .kh-chip { flex: none; }
    .kh-band-stats div { padding: 16px; }
    .kh-band-stats dt { font-size: 1.6rem; }
    .kh-fnav .ks-container { padding: 0; }
    .kh-fnav-track { border-radius: 0; border-left: 0; border-right: 0; padding: 6px 18px; }
    .kh-hero-glow span { opacity: .2; }
    .kh-hero-glow span:nth-child(1) { width: 340px; height: 340px; top: -140px; right: -160px; }
    .kh-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .kh-hero-stage { padding: 12px 0 60px; }
    .kh-phone { width: 286px; border-radius: 44px; }
    .kh-phone-screen { height: 540px; border-radius: 34px; }
    .kh-float { padding: 8px 10px 8px 8px; font-size: 12px; }
    .kh-float strong { font-size: 12.5px; }
    .kh-float small { font-size: 11px; }
    .kh-float-icon { width: 28px; height: 28px; font-size: 15px; border-radius: 8px; }
    .kh-float-leads, .kh-float-ai, .kh-float-auto { display: none; }
    .kh-float-campaign { top: auto; bottom: 64px; left: -4px; }
    .kh-marquee-block { padding: 28px 0 40px; }
    .kh-switch-tabs { display: flex; gap: 8px; margin: 0 -18px; padding: 0 18px 6px; overflow-x: auto; scrollbar-width: none; }
    .kh-switch-tabs::-webkit-scrollbar, .kh-ind-tabs::-webkit-scrollbar { display: none; }
    .kh-tab { flex: none; flex-direction: row; width: auto; padding: 8px 14px 8px 8px; border-radius: 999px; }
    .kh-tab-icon { width: 30px; height: 30px; border-radius: 50%; font-size: 17px; }
    .kh-tab strong { font-size: 14.5px; }
    .kh-screen { border-radius: 22px; }
    .kh-screen-body { min-height: 300px; }
    .kh-builder { padding: 18px; border-radius: 22px; }
    .kh-builder-body { padding: 16px; }
    .kh-builder-stats strong { font-size: 1.3rem; }
    .kh-node { min-width: 0; width: 100%; max-width: 320px; }
    .kh-flow-track > li.kh-flow-split { gap: 12px; }
    .kh-flow-lane .kh-node { padding: 10px; gap: 8px; font-size: 13px; }
    .kh-flow-lane .kh-node > i { width: 32px; height: 32px; font-size: 17px; }
    .kh-flow-detail { padding: 24px; }
    .kh-ind-tabs { flex-wrap: nowrap; justify-content: flex-start; margin: 0 -18px 24px; padding: 0 18px 6px; overflow-x: auto; scrollbar-width: none; }
    .kh-ind-tab { flex: none; }
    .kh-ind-panel { gap: 28px; padding: 20px; border-radius: 22px; }
    .kh-seg { display: flex; }
    .kh-seg button { flex: 1; padding: 0 10px; font-size: 13.5px; }
    .kh-route { padding: 18px; }
    .kh-route-head { gap: 12px; }
    .kh-route-head > span:nth-child(2) { min-width: 0; }
    .kh-route-icon { width: 40px; height: 40px; border-radius: 12px; font-size: 20px; }
    .kh-route-tag { padding: 3px 8px; font-size: 11px; }
    .kh-route dl div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .kh-wa-fab { right: 16px; bottom: 16px; width: 56px; padding: 0; justify-content: center; }
    .kh-wa-fab span { display: none; }
}
