/* MTM INDUS readability + INDUS Assistant visual refresh */
:root { --indus-ink:#17243a; --indus-muted:#526174; --indus-blue:#1478d4; --indus-cyan:#10a9c7; }
.site-footer { background:#f3f7fc!important; color:#26364b!important; }
.site-footer p,.site-footer .small { color:#526174!important; }
.site-footer h3 { color:#17243a!important; font-weight:800!important; }
.site-footer a,.site-footer li a,.site-footer .footer-bottom,.site-footer .footer-legal a { color:#40536b!important; opacity:1!important; font-weight:600!important; }
.site-footer a:hover,.site-footer li a:hover { color:#0878c9!important; }
.site-nav a,.mobile-menu nav a { color:#26364b!important; }
.mobile-menu { background:rgba(248,251,255,.99)!important; }
.mobile-menu nav a { font-weight:700!important; }
.chat-panel {
  color:#17243a!important; background:linear-gradient(160deg,#fff 0%,#f5f9ff 100%)!important;
  border:1px solid rgba(20,120,212,.22)!important; border-radius:24px!important;
  box-shadow:0 24px 70px rgba(13,37,68,.24),0 4px 18px rgba(20,120,212,.12)!important;
  overflow:hidden!important;
}
.chat-head {
  padding:17px 18px!important; background:linear-gradient(115deg,#071a35 0%,#123f70 58%,#087fae 100%)!important;
  border-bottom:0!important;
}
.chat-head * { color:#fff!important; }
.chat-head small { opacity:.9!important; }
.chat-head small i { background:#35dfa0!important; box-shadow:0 0 0 4px rgba(53,223,160,.14)!important; }
.chat-logo { width:48px!important;height:48px!important;border:2px solid #52d8e7!important; box-shadow:0 0 0 4px rgba(25,177,219,.16),0 8px 20px rgba(0,0,0,.22)!important; }
.chat-messages { background:linear-gradient(180deg,#f3f8ff,#fff)!important; padding:20px!important; }
.bubble { font-size:15px!important; line-height:1.65!important; font-weight:500!important; border-radius:18px!important; box-shadow:0 4px 14px rgba(18,43,75,.07)!important; }
.bubble.bot { background:#e6eef8!important; color:#172b45!important; border:1px solid #d4e1f0!important; border-bottom-left-radius:6px!important; }
.bubble.user { background:linear-gradient(120deg,#0879d4,#0ca9c2)!important; color:#fff!important; border-bottom-right-radius:6px!important; }
.chat-quick { padding:14px 16px!important; background:#fff!important; gap:9px!important; }
.chat-quick .chip {
  color:#14518a!important; background:#edf6ff!important; border:1px solid #b9d8f4!important;
  font-weight:700!important; font-size:12px!important; min-height:42px!important;
  box-shadow:0 2px 7px rgba(18,77,130,.05)!important;
}
.chat-quick .chip:hover { background:#dceeff!important; border-color:#64afe9!important; }
.chat-form { padding:12px 14px!important; background:#fff!important; border-top:1px solid #e2eaf3!important; gap:9px!important; }
.chat-form .input { color:#17243a!important; background:#fff!important; border:1.5px solid #9bbbd8!important; font-size:14px!important; min-height:48px!important; }
.chat-form .input::placeholder { color:#718198!important; opacity:1!important; }
.chat-form .btn { min-width:48px!important; min-height:48px!important; border-radius:13px!important; box-shadow:0 6px 16px rgba(10,126,200,.22)!important; }
.chat-disclaimer { color:#64748b!important; font-size:11px!important; line-height:1.5!important; padding:0 18px 14px!important; background:#fff!important; }
.chat-launch {
  width:68px!important;height:68px!important; border:2px solid #62e2ef!important;
  background:radial-gradient(circle at 35% 25%,#174b7c 0%,#07172e 72%)!important;
  box-shadow:0 0 0 5px rgba(21,159,213,.13),0 12px 28px rgba(5,28,55,.3)!important;
  transition:transform .22s ease,box-shadow .22s ease!important;
}
.chat-launch:hover { transform:translateY(-3px) scale(1.04)!important; box-shadow:0 0 0 7px rgba(21,159,213,.17),0 16px 34px rgba(5,28,55,.34)!important; }
.chat-mascot svg { filter:drop-shadow(0 0 8px rgba(63,202,255,.45)); }
.chat-status-dot { width:13px!important;height:13px!important; background:#35dfa0!important; border:2px solid #07172e!important; }
@media(max-width:640px) {
 .chat-panel { left:12px!important; right:12px!important; width:auto!important; max-height:min(72dvh,680px)!important; border-radius:22px!important; }
 .chat-messages { min-height:150px!important; }
 .bubble { max-width:94%!important; }
 .chat-launch { width:62px!important;height:62px!important; }
 .site-footer .footer-bottom { color:#40536b!important; }
}

/* INDUS Assistant — compact, legible, mobile-first refinement */
.chat-panel{
  width:min(390px,calc(100vw - 32px))!important;
  max-height:min(560px,calc(100dvh - 112px - env(safe-area-inset-bottom,0px)))!important;
  display:flex!important;
  isolation:isolate;
  backdrop-filter:blur(18px);
}
.chat-head{
  min-height:76px!important;
  padding:13px 17px!important;
  display:flex!important;
  align-items:center!important;
  background:linear-gradient(112deg,#071a35 0%,#104d7e 58%,#079bb6 100%)!important;
}
.chat-head .chat-id{display:flex!important;align-items:center!important;gap:13px!important;flex:1;min-width:0}
.chat-head .chat-id>div{display:flex!important;flex-direction:column!important;gap:4px!important;min-width:0}
.chat-head .chat-id b{display:block!important;color:#fff!important;font-size:15px!important;font-weight:800!important;line-height:1.25!important;letter-spacing:.01em}
.chat-head .chat-id small{display:flex!important;align-items:center!important;color:#d9f4ff!important;font-size:10px!important;line-height:1.3!important;letter-spacing:.025em;white-space:nowrap}
.chat-head .chat-logo{width:43px!important;height:43px!important;flex:0 0 43px!important}
.chat-head #chatClose{flex:0 0 34px!important;width:34px!important;height:34px!important;border-radius:50%!important;background:rgba(255,255,255,.12)!important;color:#fff!important}
.chat-head #chatClose svg,.chat-head #chatClose i{color:#fff!important}
.chat-messages{
  flex:1 1 auto!important;min-height:115px!important;max-height:none!important;
  padding:15px 16px!important;gap:11px!important;overscroll-behavior:contain!important;
}
.bubble{max-width:90%!important;padding:11px 14px!important;font-size:13px!important;line-height:1.6!important}
.chat-quick{flex:0 0 auto!important;padding:10px 13px 12px!important;gap:7px!important}
.chat-quick .chip{min-height:38px!important;padding:8px 9px!important;font-size:11px!important;border-radius:10px!important}
.chat-form{flex:0 0 auto!important;padding:10px 12px!important;gap:8px!important}
.chat-form .input{min-height:44px!important;height:44px!important;border-radius:11px!important}
.chat-form .btn{min-width:44px!important;min-height:44px!important;height:44px!important;border-radius:11px!important}
.chat-disclaimer{flex:0 0 auto!important;padding:0 14px 11px!important;font-size:10px!important}
.chat-launch[aria-expanded="true"]{opacity:0!important;visibility:hidden!important;pointer-events:none!important;transform:scale(.85)!important}
@media(max-width:640px){
  .chat-panel{
    left:12px!important;right:12px!important;bottom:calc(12px + env(safe-area-inset-bottom,0px))!important;
    width:auto!important;max-height:min(62dvh,520px)!important;
    border-radius:20px!important;transform-origin:bottom center!important;
  }
  .chat-head{min-height:68px!important;padding:11px 14px!important}
  .chat-head .chat-logo{width:39px!important;height:39px!important;flex-basis:39px!important}
  .chat-head .chat-id b{font-size:14px!important}
  .chat-head .chat-id small{font-size:9px!important}
  .chat-messages{min-height:95px!important;padding:12px!important}
  .chat-quick{padding:8px 10px 10px!important;gap:6px!important}
  .chat-quick .chip{min-height:36px!important;font-size:10px!important;padding:7px 6px!important}
  .chat-form{padding:9px 10px!important}
  .chat-disclaimer{font-size:9px!important;padding-bottom:9px!important}
}
@media(max-height:700px){
  .chat-panel{max-height:calc(100dvh - 92px - env(safe-area-inset-bottom,0px))!important}
  .chat-messages{min-height:80px!important}
}
@media(prefers-reduced-motion:reduce){
  .chat-launch{transition:none!important}
}

/* Prevent mobile browser auto-zoom when the assistant input receives focus */
@media(max-width:640px){
  #chatInput,.chat-form .input{font-size:16px!important;line-height:1.35!important}
  .chat-panel{width:auto!important;max-width:none!important;box-sizing:border-box!important}
  .chat-panel *{box-sizing:border-box}
}

/* Final mobile overflow containment: keep the assistant inside the visual viewport */
.chat-panel,
.chat-panel *{box-sizing:border-box!important}
@media(max-width:640px){
  .chat-panel{
    position:fixed!important;
    left:12px!important;right:12px!important;
    width:auto!important;max-width:calc(100vw - 24px)!important;
    min-width:0!important;
    bottom:calc(12px + env(safe-area-inset-bottom,0px))!important;
    max-height:min(58dvh,480px)!important;
    overflow:hidden!important;
    transform-origin:bottom center!important;
  }
  .chat-head,.chat-messages,.chat-quick,.chat-form,.chat-disclaimer{
    width:100%!important;min-width:0!important;max-width:100%!important;
  }
  .chat-head{flex:0 0 auto!important;gap:8px!important}
  .chat-head .chat-id{flex:1 1 auto!important;width:auto!important;min-width:0!important}
  .chat-head .chat-id>div{min-width:0!important;overflow:hidden!important}
  .chat-head .chat-id small{white-space:normal!important;overflow-wrap:anywhere!important}
  .chat-messages{flex:1 1 auto!important;min-height:72px!important;overflow-y:auto!important;overflow-x:hidden!important}
  .bubble{max-width:100%!important;width:fit-content!important;min-width:0!important;overflow-wrap:anywhere!important;word-break:normal!important}
  .chat-quick{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:7px!important;overflow:hidden!important}
  .chat-quick .chip{width:100%!important;min-width:0!important;white-space:normal!important;overflow-wrap:anywhere!important;line-height:1.25!important}
  .chat-form{display:flex!important;gap:7px!important;padding:9px 10px!important}
  .chat-form .input{flex:1 1 0!important;width:0!important;min-width:0!important;max-width:100%!important;font-size:16px!important}
  .chat-form .btn{flex:0 0 44px!important;width:44px!important;min-width:44px!important}
  .chat-disclaimer{font-size:9px!important;line-height:1.35!important;text-align:center!important;overflow-wrap:anywhere!important;padding:0 10px 9px!important}
}
@media(max-width:380px){
  .chat-panel{left:8px!important;right:8px!important;max-width:calc(100vw - 16px)!important}
  .chat-head{padding:10px!important}
  .chat-quick .chip{font-size:9px!important;padding:7px 4px!important}
}
