/* ==========================================================================
   BENTO GRID REDESIGN - GUPSHUP.AI QUALITY
   Deep visual mockups for each card - no static emoji-only sections
   ========================================================================== */

/* CARD THEME VARIANTS */
.gc-dark {
  background: linear-gradient(150deg, #FFFFFF 0%, #F4FBF6 100%);
  border-color: var(--green-100) !important;
}
.gc-dark .bento-badge-category { background: var(--green-50); color: var(--green-2); border-color: var(--green-100); }
.gc-dark h3 { color: var(--ink); font-size: 1.45rem; }
.gc-dark > p { color: var(--text); }

.gc-tall  { grid-row: span 2; }
.gc-omni  { grid-column: span 2; display: flex; gap: 44px; align-items: center; background: linear-gradient(130deg, #F8FAFC 0%, #EFF7F3 100%); }

/* ===== CARD 1: SMS JOURNEY (LIGHT MODE MATCHING CARD 2) ===== */
.sms-journey-visual {
  margin-top: 22px;
  background: linear-gradient(135deg, #F0FDF4, #EAF7ED);
  border: 1px solid #D7EFDC;
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sms-journey-title {
  font-size: .68rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--green-2); text-align: center;
}

.sms-node-row { display: flex; gap: 8px; }

.sj-node {
  flex: 1; background: #fff; border: 1px solid #D7EFDC;
  border-radius: 14px; padding: 12px 8px; text-align: center;
  box-shadow: 0 2px 8px rgba(15,27,44,.03);
}
.sj-icon  { font-size: 1.3rem; }
.sj-label { font-size: .64rem; font-weight: 800; color: var(--ink); margin-top: 4px; }
.sj-sub   { font-size: .56rem; color: var(--muted); margin-top: 2px; }

.sj-success { background: #EAF7ED !important; border-color: var(--green-100) !important; }
.sj-success .sj-label { color: var(--green-2); }
.sj-success .sj-sub   { color: var(--green); }

/* SVG traveling dot above nodes */
.sms-track-wrap { position: relative; height: 24px; margin-bottom: -4px; }
.sms-track-wrap svg { width: 100%; height: 24px; }
.sms-tline { stroke: rgba(47,168,79,.3); stroke-width: 2; stroke-dasharray: 6 5; }

/* TPS meter (Light Mode with Vibrant Orange Fill & Text) */
.tps-meter {
  background: #fff; border: 1px solid #D7EFDC;
  border-radius: 14px; padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(15,27,44,.03);
}
.tps-top   { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tps-title { font-size: .68rem; color: var(--muted); font-weight: 700; }
.tps-val   { font-size: .84rem; font-weight: 900; color: #F0602F; }
.tps-track { height: 7px; background: #FEECE4; border-radius: 999px; overflow: hidden; }
.tps-fill  { height: 100%; background: linear-gradient(90deg, #F0602F, #FF8A5B); border-radius: 999px; animation: tpsFill 3s ease-in-out infinite alternate; }
@keyframes tpsFill { 0% { width: 18%; } 100% { width: 92%; } }
.tps-badge { font-size: .64rem; color: var(--green-2); font-weight: 700; margin-top: 7px; }

/* SMS live preview */
.sms-preview-msg {
  background: #fff; border: 1px solid #D7EFDC;
  border-radius: 14px; padding: 12px 14px;
  box-shadow: 0 2px 8px rgba(15,27,44,.03);
}
.spm-row  { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.spm-dot  { width: 7px; height: 7px; border-radius: 50%; background: #40B050; flex-shrink: 0; animation: ring 1.5s infinite; }
.spm-from { font-size: .68rem; color: var(--green-2); font-weight: 800; flex: 1; }
.spm-t    { font-size: .6rem; color: var(--muted); }
.spm-body { font-size: .76rem; color: var(--ink); line-height: 1.5; margin-bottom: 6px; }
.spm-body b { color: var(--green-2); }
.spm-ok   { font-size: .64rem; color: var(--green-2); font-weight: 800; }

/* ===== CARD 2: OTP 2FA ANIMATED FRAME ===== */
/* ===== CARD 2: OTP 2FA ANIMATED FRAME (CLEAN LIGHT EMERALD) ===== */
.otp-animated-frame {
  margin-top: 18px;
  background: linear-gradient(145deg, #FFFFFF 0%, #F4FBF6 100%);
  border: 1.5px solid var(--green-100);
  border-radius: 20px;
  padding: 22px 18px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(15, 27, 44, 0.05);
}

.otp-frame-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--green-2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.otp-digits-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.otp-digit-animated {
  width: 40px;
  height: 48px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--muted);
  animation: otpDReveal 5s ease-in-out infinite;
  box-shadow: 0 2px 8px rgba(15, 27, 44, 0.05);
  transition: all 0.3s ease;
}

.d1 { animation-delay: 0s; }
.d2 { animation-delay: .28s; }
.d3 { animation-delay: .56s; }
.d4 { animation-delay: .84s; }
.d5 { animation-delay: 1.12s; }
.d6 { animation-delay: 1.4s; }

@keyframes otpDReveal {
  0%, 5% {
    background: #FFFFFF;
    color: var(--muted);
    border-color: var(--line);
    transform: scale(0.92);
    box-shadow: none;
  }
  20%, 65% {
    background: linear-gradient(135deg, #FFFFFF, #EAF7ED);
    color: var(--green-2);
    border-color: var(--green);
    transform: scale(1.06) translateY(-2px);
    box-shadow: 0 6px 20px rgba(47, 168, 79, 0.22);
  }
  80%, 100% {
    background: #FFFFFF;
    color: var(--muted);
    border-color: var(--line);
    transform: scale(0.92);
    box-shadow: none;
  }
}

.otp-progress {
  height: 5px;
  background: rgba(47, 168, 79, 0.12);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}

.otp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2FA84F, #7BD98C);
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(47, 168, 79, 0.3);
  animation: otpProg 5s ease-in-out infinite;
}

@keyframes otpProg {
  0%, 10% { width: 0%; }
  70% { width: 100%; }
  85%, 100% { width: 0%; }
}

.otp-result-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 8px 18px;
  border-radius: 999px;
  margin-bottom: 14px;
  box-shadow: 0 6px 20px rgba(47, 168, 79, 0.25);
  animation: shieldApp 5s ease-in-out infinite;
}

@keyframes shieldApp {
  0%, 55% { opacity: 0; transform: scale(0.85); }
  68%, 82% { opacity: 1; transform: scale(1); }
  95%, 100% { opacity: 0; transform: scale(0.85); }
}

.otp-cascade {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 5px;
}

.otp-ch {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
  border: 1px solid var(--line);
  transition: all 0.3s ease;
}

.otp-ch.active-ch {
  background: var(--green);
  color: #FFFFFF;
  border-color: var(--green);
}
.otp-arrow { color: var(--muted); font-size: 0.8rem; }
.otp-cascade-note { font-size: 0.68rem; color: var(--muted); }

/* ===== CARD 3: ORBIT SYSTEM (A2P LIFECYCLE) ===== */
.orbit-system {
  position: relative; width: 200px; height: 200px;
  margin: 22px auto 0;
}
.orbit-deco-ring {
  position: absolute; inset: 10px; border-radius: 50%;
  border: 1.5px dashed rgba(47,168,79,.28); pointer-events: none;
}
.orbit-ring {
  position: absolute; inset: 0;
  animation: orSpin 10s linear infinite;
}
.orbit-satellite {
  position: absolute; width: 56px; height: 56px; border-radius: 14px;
  background: #fff; border: 1.5px solid var(--line);
  box-shadow: 0 4px 16px rgba(15,27,44,.08);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px;
  animation: orCounterSpin 10s linear infinite;
}
.s-alert    { top: -28px;             left: calc(50% - 28px); }
.s-otp      { top: calc(50% - 28px);  right: -28px; }
.s-campaign { bottom: -28px;          left: calc(50% - 28px); }
.s-notif    { top: calc(50% - 28px);  left: -28px; }
.os-icon  { font-size: 1.25rem; }
.os-label { font-size: .56rem; font-weight: 800; color: var(--ink); }

.orbit-hub { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 3; }
.orbit-hub-inner {
  width: 68px; height: 68px; border-radius: 50%;
  background: linear-gradient(135deg, #2FA84F, #40B050);
  display: grid; place-items: center;
  color: #fff; font-weight: 900; font-size: .78rem;
  box-shadow: 0 0 0 8px rgba(47,168,79,.1), 0 8px 24px rgba(47,168,79,.35);
}
.orbit-hub-pulse {
  position: absolute; inset: -8px; border-radius: 50%;
  border: 2px solid rgba(47,168,79,.25);
  animation: hubPulse 2s ease-in-out infinite;
}
@keyframes orSpin        { to { transform: rotate(360deg); } }
@keyframes orCounterSpin { to { transform: rotate(-360deg); } }
@keyframes hubPulse      { 0%,100% { transform:scale(1); opacity:.5; } 50% { transform:scale(1.18); opacity:1; } }

/* ===== CARD 4: TWO-WAY SMS ===== */
.twoway-visual { margin-top: 16px; display: flex; flex-direction: column; gap: 14px; }

.tw-chat { background: #F8FAFC; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tw-chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 13px; background: #fff; border-bottom: 1px solid var(--line);
  font-size: .72rem; font-weight: 700; color: var(--ink);
}
.tw-live { color: var(--green); font-size: .64rem; font-weight: 800; }
.tw-chat-body { padding: 11px 13px; display: flex; flex-direction: column; gap: 7px; }
.tw-msg { padding: 8px 11px; border-radius: 11px; font-size: .74rem; line-height: 1.45; max-width: 90%; }
.tw-auto { background: #fff; color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 3px; align-self: flex-start; }
.tw-user { background: var(--green); color: #fff; align-self: flex-end; border-bottom-right-radius: 3px; font-weight: 700; }
.tw-msg.tw-auto.tw-a2 { animation: fadeInChat .5s ease-out .6s both; }
.tw-msg.tw-user       { animation: fadeInChat .5s ease-out 1.2s both; }
.tw-msg.tw-auto.tw-a3 { animation: fadeInChat .5s ease-out 1.8s both; }
@keyframes fadeInChat { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }

/* Two-Way Pipeline */
.tw-pipeline { position: relative; padding: 6px 0 2px; }
.tw-pipe-track { display: flex; align-items: center; justify-content: space-between; }

.tw-pipe-node { display: flex; flex-direction: column; align-items: center; gap: 5px; flex-shrink: 0; }
.tw-pipe-node-circle {
  width: 33px; height: 33px; border-radius: 50%;
  background: var(--bg-2); border: 2px solid var(--line);
  display: grid; place-items: center;
  font-size: .78rem; font-weight: 800; color: var(--muted);
  transition: .3s;
}
.tw-pipe-node.pipe-active .tw-pipe-node-circle { background: var(--green-50); border-color: var(--green); color: var(--green-2); }
.tw-pipe-node label { font-size: .62rem; font-weight: 700; color: var(--text); white-space: nowrap; }

.tw-pipe-line { flex: 1; height: 2px; background: var(--line); position: relative; overflow: hidden; margin: 0 4px; margin-bottom: 18px; }
.tw-pipe-dot {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 10px rgba(47,168,79,.7);
  animation: pipeTravel 2.4s linear infinite;
}
.tw-pipe-dot.d2 { animation-delay: .8s; }
@keyframes pipeTravel { 0% { left:-8px; opacity:0; } 10% { opacity:1; } 90% { opacity:1; } 100% { left:100%; opacity:0; } }

/* ===== CARD 5: WHATSAPP LIGHT WINDOW (MATCHING CARD 2 BACKGROUND) ===== */
.wa-dark-window { margin-top: 16px; background: linear-gradient(135deg, #F0FDF4, #EAF7ED); border-radius: 18px; overflow: hidden; border: 1px solid #D7EFDC; box-shadow: 0 4px 16px rgba(15,27,44,.03); }

.wa-dark-bar { background: #fff; padding: 11px 15px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #D7EFDC; }
.wa-avatar-c { width: 34px; height: 34px; border-radius: 50%; background: #EAF7ED; border: 1px solid #C4EBD0; display: grid; place-items: center; font-size: .95rem; flex-shrink: 0; }
.wa-bar-info { flex: 1; }
.wa-name   { display: block; font-size: .78rem; font-weight: 800; color: var(--ink); }
.wa-online { font-size: .62rem; color: var(--green-2); font-weight: 600; }
.wa-meta-b { font-size: .62rem; font-weight: 800; color: #137735; background: #EAF7ED; padding: 4px 10px; border-radius: 999px; border: 1px solid #C4EBD0; }

.wa-dark-body { padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.wa-dark-msg { border-radius: 12px; padding: 9px 13px; font-size: .74rem; line-height: 1.45; max-width: 88%; box-shadow: 0 2px 6px rgba(15,27,44,.03); }
.wa-in  { background: #fff; color: var(--ink); border: 1px solid #D7EFDC; align-self: flex-start; border-bottom-left-radius: 3px; animation: waMIn .4s ease-out both; }
.wa-out { background: #DCF8C6; color: var(--ink); border: 1px solid #C4EBD0; align-self: flex-end; border-bottom-right-radius: 3px; animation: waMIn .4s ease-out .7s both; font-weight: 600; }
@keyframes waMIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
.wa-tick { font-size: .6rem; color: var(--green-2); text-align: right; margin-top: 4px; font-weight: 800; }

.wa-qbtns { display: flex; gap: 6px; margin-top: 6px; align-self: flex-end; }
.wa-qb {
  background: #fff; color: var(--green-2); border: 1px solid var(--green-100);
  border-radius: 8px; padding: 5px 11px; font-size: .64rem; font-weight: 800;
  box-shadow: 0 2px 6px rgba(15,27,44,.03);
}

.wa-typing-row {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 12px; border-bottom-left-radius: 3px;
  padding: 7px 12px; width: fit-content; border: 1px solid #D7EFDC;
}
.wa-typing-lbl { font-size: .64rem; color: var(--muted); font-weight: 600; }
.wa-typing-dots { display: flex; gap: 3px; }
.wa-typing-dots i { width:5px; height:5px; border-radius:50%; background:var(--muted); animation:waDot 1.4s ease-in-out infinite; font-style:normal; }
.wa-typing-dots i:nth-child(2) { animation-delay:.2s; }
.wa-typing-dots i:nth-child(3) { animation-delay:.4s; }
@keyframes waDot { 0%,60%,100% { transform:translateY(0); background:var(--muted); } 30% { transform:translateY(-5px); background:var(--green); } }

.wa-bsp-footer {
  background: #fff; padding: 10px 14px; border-top: 1px solid #D7EFDC;
  display: flex; justify-content: space-between; align-items: center;
  font-size: .66rem; font-weight: 800; color: var(--green-2);
}

/* ===== CARD 6: OMNICHANNEL HUB ===== */
.omni-text-col { flex: 1; min-width: 0; }
.omni-text-col h3 { font-size: clamp(1.4rem, 1rem + 1.2vw, 1.9rem); line-height: 1.2; }

.omni-stats-row { display: flex; gap: 28px; margin-top: 22px; flex-wrap: wrap; }
.omni-stat b    { display: block; font-size: 1.55rem; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.omni-stat span { font-size: .74rem; color: var(--muted); font-weight: 600; }

.omni-hub-visual {
  position: relative; width: 380px; height: 320px; flex-shrink: 0;
}
.omni-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.omni-spoke { animation: spokeDash 2.5s linear infinite; }
@keyframes spokeDash { to { stroke-dashoffset: -20; } }

.omni-center-hub {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 74px; height: 74px; border-radius: 50%;
  background: linear-gradient(135deg, #2FA84F, #137735);
  border: 2px solid rgba(47,168,79,.5);
  display: grid; place-items: center; z-index: 5;
  box-shadow: 0 0 0 10px rgba(47,168,79,.07), 0 0 30px rgba(47,168,79,.2);
}
.omni-hub-glow {
  position: absolute; inset: -14px; border-radius: 50%;
  border: 1.5px solid rgba(47,168,79,.2);
  animation: hubPulse 2.5s ease-in-out infinite;
}
.omni-hub-ring {
  position: absolute; inset: -28px; border-radius: 50%;
  border: 1px dashed rgba(47,168,79,.1);
  animation: orSpin 20s linear infinite;
}
.omni-hub-lbl { font-size: .76rem; font-weight: 900; color: #fff; }

.omni-channel-node {
  position: absolute; border-radius: 11px; padding: 6px 12px;
  font-size: .72rem; font-weight: 800; border: 1.5px solid;
  display: flex; align-items: center; gap: 5px; z-index: 4;
  white-space: nowrap; box-shadow: 0 4px 14px rgba(15,27,44,.08);
}

/* SVG hub at (190, 160) in 380x320 canvas */
/* Top     (190, 20)  */ .ocn-top    { top: -8px;   left: 50%; transform: translateX(-50%); animation: omniFloat 4s ease-in-out infinite alternate; }
/* TopR    (340, 75)  */ .ocn-tr     { top: 40px;   right: 0;  animation: omniFloat 4s ease-in-out .5s infinite alternate; }
/* BotR    (340, 245) */ .ocn-br     { bottom: 40px; right: 0; animation: omniFloat 4s ease-in-out 1s infinite alternate; }
/* Bottom  (190, 300) */ .ocn-bot    { bottom: -8px; left: 50%; transform: translateX(-50%); animation: omniFloatC 4s ease-in-out 1.5s infinite alternate; }
/* BotL    (40, 245)  */ .ocn-bl     { bottom: 40px; left: 0;  animation: omniFloat 4s ease-in-out 2s infinite alternate; }
/* TopL    (40, 75)   */ .ocn-tl     { top: 40px;   left: 0;   animation: omniFloat 4s ease-in-out 2.5s infinite alternate; }

@keyframes omniFloat  { 0% { transform: translateY(0); } 100% { transform: translateY(-7px); } }
@keyframes omniFloatC { 0% { transform: translateX(-50%) translateY(0); } 100% { transform: translateX(-50%) translateY(-7px); } }

/* ===== OTP SMS JOURNEY (STANDALONE SECTION) ===== */
.otp-journey-wrap {
  background: linear-gradient(145deg, #FFFFFF 0%, #F4FBF6 100%);
  border: 1.5px solid var(--line);
  border-radius: var(--r-xl);
  padding: clamp(28px, 4vw, 44px);
  box-shadow: 0 10px 40px rgba(15, 27, 44, 0.04);
}
.otp-jrn-header { text-align: center; margin-bottom: 34px; }
.otp-jrn-header h3 { font-size: clamp(1.3rem, 1rem + 1.2vw, 1.85rem); }
.otp-jrn-header p  { color: var(--text); margin-top: 10px; }

.otp-journey-steps {
  display: flex; align-items: center; justify-content: center;
  gap: 0; overflow-x: auto; padding: 8px 0;
}

.otp-journey-step {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: 130px; min-width: 110px; text-align: center;
  padding: 18px 10px; border-radius: 16px;
  border: 2px solid transparent; transition: all .4s var(--ease);
  background: #fff; box-shadow: 0 4px 16px rgba(15,27,44,.05); flex-shrink: 0;
}
.otp-journey-step.ojs-active {
  border-color: var(--green);
  background: #FFFFFF;
  box-shadow: 0 10px 30px rgba(47, 168, 79, 0.18);
  transform: translateY(-7px);
}
.ojs-icon-wrap {
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--bg-2); border: 1.5px solid var(--line);
  display: grid; place-items: center; font-size: 1.45rem; transition: .4s;
}
.otp-journey-step.ojs-active .ojs-icon-wrap {
  background: linear-gradient(135deg, #2FA84F, #137735);
  border-color: #2FA84F;
  color: #FFFFFF;
  box-shadow: 0 8px 20px rgba(47, 168, 79, 0.35);
}
.ojs-title  { font-size: .8rem; font-weight: 800; color: var(--ink); }
.ojs-detail { font-size: .68rem; color: var(--muted); line-height: 1.4; }
.otp-journey-step.ojs-active .ojs-title { color: var(--green-2); }

.ojs-connector {
  width: 44px; height: 2px; background: var(--line);
  position: relative; overflow: hidden; flex-shrink: 0;
  align-self: center;
}
.ojs-dot {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 10px rgba(47,168,79,.7);
  animation: pipeTravel 3.5s linear infinite;
}

.otp-jrn-footer { margin-top: 26px; text-align: center; }
.ojf-bar  { width: 100%; max-width: 560px; margin: 0 auto 10px; height: 5px; background: rgba(47,168,79,.1); border-radius: 999px; overflow: hidden; }
.ojf-fill { height: 100%; background: linear-gradient(90deg, var(--green), #7BD98C); border-radius: 999px; animation: ojFill 3.5s ease-in-out infinite; }
@keyframes ojFill { 0% { width:0%; } 85% { width:100%; } 100% { width:100%; } }
.ojf-lbl  { font-size: .8rem; color: var(--green-2); font-weight: 700; }

/* RESPONSIVE */
@media(max-width: 1100px) {
  .gc-omni { flex-direction: column; }
  .omni-hub-visual { width: 100%; max-width: 380px; margin: 0 auto; }
}
@media(max-width: 860px) {
  .gupshup-card.gc-tall { grid-row: auto; }
  .gupshup-card.gc-omni { grid-column: auto; }
  .otp-journey-steps { flex-wrap: wrap; gap: 12px; }
  .ojs-connector { display: none; }
}

/* ==========================================================================
   A2P SVG ILLUSTRATION (inside Card 1)
   ========================================================================== */
.a2p-svg-illus {
  border-radius: 14px;
  background: #fff;
  border: 1px solid #D7EFDC;
  padding: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15,27,44,.03);
}
.a2p-svg-illus svg, .a2p-svg-illus img { width: 100%; height: auto; display: block; border-radius: 8px; }

/* ==========================================================================
   CONVERSATION ENGINE SECTION - MODERN 3-CARD LAYOUT
   ========================================================================== */
.conv-engine-section {
  padding-block: clamp(4.5rem, 3.5rem + 5vw, 7rem);
  background: var(--bg);
}

.ce-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 24px;
}

.ce-card {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 30px;
  transition: box-shadow .3s var(--ease);
  display: flex;
  flex-direction: column;
}

.ce-card:hover { box-shadow: var(--shadow); }

.ce-dark {
  background: linear-gradient(150deg, #FFFFFF 0%, #F0FDF4 100%);
  border-color: var(--green-100);
}

.ce-wide {
  grid-column: span 2;
  flex-direction: row;
  gap: 40px;
  align-items: center;
  background: linear-gradient(130deg, #F8FAFC, #EFF7F3);
}

.ce-eyebrow {
  display: inline-block;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-50);
  border: 1px solid var(--green-100);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.ce-dark .ce-eyebrow {
  background: #EAF7ED;
  color: #137735;
  border-color: #C4EBD0;
}
.ce-dark h3 { color: var(--ink); font-weight: 800; }
.ce-dark .ce-sub { color: var(--text); }

.ce-sub { font-size: .88rem; color: var(--text); margin-top: 8px; line-height: 1.6; }

/* CE CARD 1: Signal Panel (HIGH-CONTRAST LIGHT THEME) */
.ce-panel {
  margin-top: 20px;
  background: #FFFFFF;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15,27,44,.04);
  flex: 1;
}

.ce-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #F8FAFC;
  border-bottom: 1px solid var(--line);
  font-size: .76rem;
  font-weight: 800;
  color: var(--ink);
}

.ce-live-dot {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .68rem;
  color: #137735;
  font-weight: 800;
  background: #EAF7ED;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #C4EBD0;
}

.ce-live-dot span {
  width: 7px; height: 7px; border-radius: 50%;
  background: #2FA84F;
  animation: ring 1.5s infinite;
}

.ce-panel-rows { display: flex; flex-direction: column; }

.ce-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #FFFFFF;
  transition: background .2s ease;
  animation: ceRowIn .4s ease-out both;
}

.ce-row.active { background: #F4FBF6; }

.ce-row-icon { font-size: 1.1rem; flex-shrink: 0; }
.ce-row div  { flex: 1; }
.ce-row b    { display: block; font-size: .82rem; color: var(--ink); font-weight: 800; }
.ce-row small{ font-size: .72rem; color: var(--muted); font-weight: 600; }
.ce-row-tag  {
  font-size: .7rem;
  font-weight: 800;
  color: #137735;
  background: #EAF7ED;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #C4EBD0;
  flex-shrink: 0;
}

@keyframes ceRowIn { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }

.ce-panel-footer {
  padding: 10px 14px;
  font-size: .78rem;
  color: var(--ink);
  font-weight: 800;
  background: #F8FAFC;
  border-top: 1px solid var(--line);
}

/* CE CARD 2: Chat Interface */
.ce-chat {
  margin-top: 18px;
  background: #F8FAFC;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  flex: 1;
}

.ce-chat-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.ce-chat-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--green-50); border: 1.5px solid var(--green-100);
  display: grid; place-items: center; font-size: 1rem; flex-shrink: 0;
}

.ce-chat-name { display: block; font-size: .76rem; font-weight: 700; color: var(--ink); }
.ce-chat-status { font-size: .62rem; color: var(--green); }

.ce-chat-body { padding: 12px; display: flex; flex-direction: column; gap: 7px; }

.ce-msg {
  border-radius: 12px;
  padding: 8px 11px;
  font-size: .74rem;
  line-height: 1.45;
  max-width: 88%;
}

.ce-msg-in  { background: #fff; color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 3px; align-self: flex-start; }
.ce-msg-out { background: var(--green); color: #fff; align-self: flex-end; border-bottom-right-radius: 3px; font-weight: 600; }

.ce-m1 { animation: fadeInChat .5s ease-out both; }
.ce-m2 { animation: fadeInChat .5s ease-out .6s both; }
.ce-m3 { animation: fadeInChat .5s ease-out 1.2s both; }

.ce-quick-btns { display: flex; gap: 6px; align-self: flex-end; margin-top: 4px; }
.ce-qb {
  background: var(--green-50); color: var(--green-2);
  border: 1px solid var(--green-100); border-radius: 8px;
  padding: 5px 10px; font-size: .64rem; font-weight: 700;
}

.ce-typing {
  display: flex;
  align-items: center;
  gap: 3px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  border-bottom-left-radius: 3px;
  padding: 7px 10px;
  width: fit-content;
}

.ce-typing i {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--muted);
  animation: waDot 1.4s ease-in-out infinite;
  font-style: normal;
}
.ce-typing i:nth-child(2) { animation-delay: .2s; }
.ce-typing i:nth-child(3) { animation-delay: .4s; }

/* CE CARD 3: Flow visual (wide card) */
.ce-wide-text { flex: 1; min-width: 0; }
.ce-wide-text h3 { font-size: clamp(1.3rem, 1rem + 1.2vw, 1.75rem); }

.ce-channel-stats { display: flex; gap: 22px; margin-top: 20px; flex-wrap: wrap; }
.ce-cstat b    { display: block; font-size: .9rem; font-weight: 800; color: var(--ink); }
.ce-cstat span { font-size: .72rem; color: var(--muted); }

.ce-flow-visual {
  position: relative;
  width: 360px;
  height: 260px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.ce-flow-hub {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2FA84F, #137735);
  border: 2px solid rgba(47,168,79,.5);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: .76rem;
  font-weight: 900;
  z-index: 3;
  box-shadow: 0 0 0 8px rgba(47,168,79,.07), 0 0 24px rgba(47,168,79,.18);
}

.ce-flow-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ce-channel-nodes {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 6px;
}

.ce-cn {
  border-radius: 10px;
  padding: 6px 12px;
  font-size: .72rem;
  font-weight: 800;
  border: 1.5px solid;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  animation: omniFloat 4s ease-in-out infinite alternate;
  box-shadow: 0 3px 10px rgba(15,27,44,.07);
}

@media(max-width: 1100px) {
  .ce-wide { flex-direction: column; }
  .ce-flow-visual { width: 100%; max-width: 360px; margin: 0 auto; }
}
@media(max-width: 860px) {
  .ce-grid { grid-template-columns: 1fr; }
  .ce-wide { grid-column: auto; }
  .ce-channel-stats { gap: 14px; }
}

