/* =====================================================================
   EQUITABLE live chat — "the speech bubble".
   The whole panel is a speech bubble whose tail points at the launcher
   launcher. Bone + terracotta, Fraunces + Inter (the site's own faces),
   follows the site's dark theme. Every rule is scoped to #eq-chat.
   Deliberately unlike HRE (vault), ASPIC (graphite), Egnatia (pill),
   FAO (navy card) and CorEnergy (side sheet).
   ===================================================================== */
#eq-chat{
  --q-paper:#FBF8F3; --q-bone:#F4EFE6; --q-sunk:#EBE4D8; --q-line:#DCD3C4;
  --q-ink:#1C1F23; --q-soft:#4A4F57; --q-faint:#6E6A63;
  --q-terra:#C7663E; --q-terra-d:#A14A26; --q-terra-l:#E08A5F;
  --q-desk:#FFFFFF; --q-desk-ink:#1C1F23; --q-me-ink:#FFFFFF;
  --q-ok:#2F8F5B; --q-warn:#B8862B;
  --q-shadow:0 30px 70px -20px rgba(28,31,35,.42), 0 10px 24px -12px rgba(28,31,35,.22);
  --q-display:'Fraunces', Georgia, 'Times New Roman', serif;
  --q-body:'InterVar', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  position:fixed; right:22px; bottom:22px; z-index:2147483000;
  font:400 15px/1.45 var(--q-body); color:var(--q-ink);
  -webkit-font-smoothing:antialiased;
}
html[data-theme="dark"] #eq-chat{
  --q-paper:#1C1F23; --q-bone:#15181B; --q-sunk:#262A30; --q-line:#343A42;
  --q-ink:#ECE5D9; --q-soft:#C2BBB0; --q-faint:#9A948B;
  --q-desk:#262A30; --q-desk-ink:#ECE5D9;
  --q-shadow:0 30px 70px -18px rgba(0,0,0,.75), 0 10px 24px -12px rgba(0,0,0,.5);
}
#eq-chat *,#eq-chat *::before,#eq-chat *::after{box-sizing:border-box;}
#eq-chat button,#eq-chat input,#eq-chat textarea{font:inherit;color:inherit;margin:0;}
#eq-chat button{cursor:pointer;background:none;border:0;padding:0;}
#eq-chat [hidden]{display:none !important;}
#eq-chat :focus-visible{outline:2px solid var(--q-terra);outline-offset:2px;border-radius:10px;}

/* ------------------------------------------------------------ launcher
   A graphite tile carrying the Equitable mark. A terracotta speech tag sits on its
   shoulder — three dots that "type" in short bursts, or the unread count. On hover
   (and once per visit) a label slides out to the left: "Talk to an agent". */
#eq-chat .eqc-launch{
  position:relative; display:flex; align-items:center; flex-direction:row; justify-content:flex-end;
  height:64px; padding:0; border-radius:22px;
  background:linear-gradient(160deg,#2B3036 0%,#1C1F23 55%,#14171A 100%); color:#F4EFE6;
  box-shadow:0 16px 34px -14px rgba(28,31,35,.65), 0 3px 8px -2px rgba(28,31,35,.35), inset 0 1px 0 rgba(255,255,255,.08);
  transition:transform .3s cubic-bezier(.3,1.5,.5,1), box-shadow .3s;
}
#eq-chat .eqc-launch:hover{transform:translateY(-2px);box-shadow:0 22px 40px -14px rgba(28,31,35,.7),0 4px 10px -2px rgba(28,31,35,.35),inset 0 1px 0 rgba(255,255,255,.08);}
#eq-chat .eqc-launch:active{transform:translateY(0) scale(.97);}
#eq-chat .eqc-tile{position:relative;width:64px;height:64px;flex:0 0 auto;display:grid;place-items:center;}
#eq-chat .eqc-tile svg{position:absolute;transition:opacity .25s, transform .35s cubic-bezier(.3,1.5,.5,1);}
#eq-chat .eqc-tile-logo{width:34px;height:27px;}
#eq-chat .eqc-tile-x{width:24px;height:24px;opacity:0;transform:rotate(-90deg) scale(.6);}
#eq-chat.eqc--open .eqc-tile-logo{opacity:0;transform:scale(.6);}
#eq-chat.eqc--open .eqc-tile-x{opacity:1;transform:none;}
/* the label */
#eq-chat .eqc-label{display:flex;flex-direction:column;justify-content:center;max-width:0;overflow:hidden;white-space:nowrap;
  opacity:0;padding-left:0;transition:max-width .45s cubic-bezier(.2,.9,.3,1), opacity .25s, padding .45s;}
#eq-chat .eqc-label b{font:600 15px/1.15 var(--q-body);letter-spacing:.005em;}
#eq-chat .eqc-label small{font-size:11.5px;color:rgba(244,239,230,.62);margin-top:2px;}
#eq-chat .eqc-launch:hover .eqc-label,#eq-chat.eqc--intro .eqc-label{max-width:220px;opacity:1;padding-left:20px;}
#eq-chat.eqc--open .eqc-label{max-width:0 !important;opacity:0 !important;padding-left:0 !important;}
/* the speech tag */
#eq-chat .eqc-pip{position:absolute;right:-7px;top:-9px;height:24px;min-width:34px;padding:0 7px;border-radius:12px 12px 12px 4px;
  background:linear-gradient(150deg,#E08A5F,#C7663E 55%,#A14A26);display:flex;align-items:center;justify-content:center;gap:3px;
  box-shadow:0 0 0 3px var(--q-bone),0 4px 10px -3px rgba(161,74,38,.6);transition:transform .3s cubic-bezier(.3,1.6,.5,1);}
#eq-chat .eqc-pip i{width:4.5px;height:4.5px;border-radius:50%;background:#FBF8F3;animation:eqcType 6s ease-in-out infinite;}
#eq-chat .eqc-pip i:nth-child(2){animation-delay:.15s;}
#eq-chat .eqc-pip i:nth-child(3){animation-delay:.3s;}
@keyframes eqcType{0%,24%,100%{transform:translateY(0);opacity:.55;}4%,16%{transform:translateY(-3px);opacity:1;}10%{transform:translateY(0);opacity:.8;}}
#eq-chat.eqc--after .eqc-pip i{animation:none;opacity:.8;}
#eq-chat.eqc--open .eqc-pip{transform:scale(0);}
/* unread — the tag shows the count and the tile gives a small hop */
#eq-chat .eqc-badge{display:none;font:700 12.5px/1 var(--q-body);color:#fff;}
#eq-chat.eqc--unread .eqc-pip i{display:none;}
#eq-chat.eqc--unread .eqc-badge{display:block;}
#eq-chat.eqc--unread .eqc-pip{transform:scale(1.12);}
#eq-chat.eqc--unread .eqc-launch{animation:eqcHop 5.5s cubic-bezier(.3,1.5,.5,1) infinite;}
@keyframes eqcHop{0%,84%,100%{transform:translateY(0);}89%{transform:translateY(-8px);}94%{transform:translateY(0);}97%{transform:translateY(-3px);}}
@media (prefers-reduced-motion:reduce){
  #eq-chat .eqc-pip i{animation:none;opacity:.85;}
  #eq-chat.eqc--unread .eqc-launch{animation:none;}
}
html[data-theme="dark"] #eq-chat .eqc-launch{background:linear-gradient(160deg,#FBF8F3,#EDE6DA);color:#1C1F23;
  box-shadow:0 16px 34px -14px rgba(0,0,0,.8),0 3px 8px -2px rgba(0,0,0,.5);}
html[data-theme="dark"] #eq-chat .eqc-label small{color:rgba(28,31,35,.6);}
html[data-theme="dark"] #eq-chat .eqc-pip{box-shadow:0 0 0 3px #0E1013,0 4px 10px -3px rgba(0,0,0,.6);}

/* --------------------------------------------------- the bubble panel */
#eq-chat .eqc-panel{
  position:absolute; right:-6px; bottom:96px;
  width:404px; height:min(640px, calc(100vh - 150px)); min-height:420px;
  display:flex; flex-direction:column;
  background:var(--q-paper); border:1px solid var(--q-line);
  border-radius:30px; box-shadow:var(--q-shadow);
  transform-origin:calc(100% - 38px) calc(100% + 60px);
  animation:eqcPop .42s cubic-bezier(.25,1.45,.45,1) both;
}
#eq-chat .eqc-panel.eqc-closing{animation:eqcShut .2s ease-in both;}
@keyframes eqcPop{0%{opacity:0;transform:scale(.18) rotate(8deg);}60%{opacity:1;}100%{opacity:1;transform:scale(1) rotate(0);}}
@keyframes eqcShut{to{opacity:0;transform:scale(.3) rotate(6deg);}}
@media (prefers-reduced-motion:reduce){
  #eq-chat .eqc-panel{animation:eqcFade .2s ease both;}
  #eq-chat .eqc-panel.eqc-closing{animation:eqcFade .15s ease reverse both;}
  @keyframes eqcFade{from{opacity:0;}to{opacity:1;}}
}
/* the tail — same paper, same line, pointing down at the launcher */
#eq-chat .eqc-tail{position:absolute; right:18px; bottom:-31px; width:58px; height:34px; pointer-events:none;}
#eq-chat .eqc-tail .f{fill:var(--q-paper);}
#eq-chat .eqc-tail .s{fill:none;stroke:var(--q-line);stroke-width:1;}

/* head — no coloured bar: a big serif name on paper */
#eq-chat .eqc-head{display:flex; align-items:center; gap:12px; padding:20px 18px 14px 22px;}
#eq-chat .eqc-ava{width:46px;height:46px;border-radius:50%;flex:0 0 auto;object-fit:cover;
  box-shadow:0 0 0 3px var(--q-paper),0 0 0 4px var(--q-line);}
#eq-chat .eqc-id{min-width:0;flex:1;}
#eq-chat .eqc-title{font:500 23px/1.05 var(--q-display); letter-spacing:-.01em; margin:0;}
#eq-chat .eqc-status{margin:4px 0 0; font-size:12.5px; color:var(--q-soft); display:flex; align-items:center; gap:7px;}
#eq-chat .eqc-dot{width:8px;height:8px;border-radius:50%;background:var(--q-ok);box-shadow:0 0 0 3px rgba(47,143,91,.16);flex:0 0 auto;}
#eq-chat .eqc-status.closed .eqc-dot{background:var(--q-warn);box-shadow:0 0 0 3px rgba(184,134,43,.16);}
#eq-chat .eqc-tools{display:flex;gap:4px;}
#eq-chat .eqc-tool{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;color:var(--q-soft);transition:background .2s,color .2s;}
#eq-chat .eqc-tool:hover{background:var(--q-sunk);color:var(--q-ink);}
#eq-chat .eqc-tool svg{width:18px;height:18px;}

/* scrolling body */
#eq-chat .eqc-body{flex:1; overflow-y:auto; overscroll-behavior:contain; padding:4px 20px 12px; scroll-behavior:smooth;}
#eq-chat .eqc-body::-webkit-scrollbar{width:8px;}
#eq-chat .eqc-body::-webkit-scrollbar-thumb{background:var(--q-line);border-radius:8px;border:2px solid var(--q-paper);}

/* ----------------------------------------------------------- start */
#eq-chat .eqc-hello{font:400 30px/1.08 var(--q-display); letter-spacing:-.02em; margin:10px 0 8px;}
#eq-chat .eqc-hello em{font-style:italic;color:var(--q-terra-d);}
html[data-theme="dark"] #eq-chat .eqc-hello em{color:var(--q-terra-l);}
#eq-chat .eqc-lede{color:var(--q-soft);margin:0 0 20px;font-size:14.5px;}
#eq-chat .eqc-sentence{font:400 19px/1.35 var(--q-display); margin:0 0 12px;}
#eq-chat .eqc-blank{display:inline-block;min-width:110px;border-bottom:2px dotted var(--q-terra);color:var(--q-terra-d);font-style:italic;padding:0 2px;}
html[data-theme="dark"] #eq-chat .eqc-blank{color:var(--q-terra-l);}
#eq-chat .eqc-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 22px;}
#eq-chat .eqc-chip{
  padding:9px 15px 9px 13px; border-radius:999px; background:var(--q-desk);
  border:1px solid var(--q-line); font-size:14px; line-height:1.2; display:inline-flex; align-items:center; gap:8px;
  transition:border-color .2s, background .2s, transform .2s;
}
#eq-chat .eqc-ico{width:18px;height:18px;flex:0 0 auto;color:var(--q-terra-d);}
html[data-theme="dark"] #eq-chat .eqc-ico{color:var(--q-terra-l);}
#eq-chat .eqc-chip:hover{border-color:var(--q-terra);transform:translateY(-1px);}
#eq-chat .eqc-chip[aria-pressed="true"]{background:var(--q-terra);border-color:var(--q-terra);color:#fff;}
#eq-chat .eqc-chip[aria-pressed="true"] .eqc-ico{color:#fff;}
#eq-chat .eqc-resume{
  display:flex;gap:12px;align-items:center;width:100%;text-align:left;margin:0 0 18px;
  padding:14px 16px;border-radius:20px;background:var(--q-desk);border:1px solid var(--q-line);
}
#eq-chat .eqc-resume:hover{border-color:var(--q-terra);}
#eq-chat .eqc-resume b{display:block;font:500 15px/1.2 var(--q-display);}
#eq-chat .eqc-resume span{display:block;color:var(--q-soft);font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px;}
#eq-chat .eqc-resume .arr{margin-left:auto;color:var(--q-terra);font-size:20px;}
#eq-chat .eqc-call{font-size:13px;color:var(--q-soft);margin:0;}
#eq-chat .eqc-call a{color:var(--q-terra-d);font-weight:600;text-decoration:none;}
html[data-theme="dark"] #eq-chat .eqc-call a{color:var(--q-terra-l);}

/* ---------------------------------------------------------- thread */
#eq-chat .eqc-about{display:flex;align-items:center;justify-content:space-between;gap:10px;
  font-size:12.5px;color:var(--q-soft);padding:6px 0 10px;border-bottom:1px dashed var(--q-line);margin-bottom:12px;}
#eq-chat .eqc-about b{font:italic 500 14px/1.2 var(--q-display);color:var(--q-ink);}
#eq-chat .eqc-about button{color:var(--q-terra-d);font-size:12.5px;font-weight:600;}
html[data-theme="dark"] #eq-chat .eqc-about button{color:var(--q-terra-l);}
#eq-chat .eqc-day{text-align:center;font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--q-faint);margin:14px 0 10px;}
#eq-chat .eqc-msg{display:flex;flex-direction:column;margin:3px 0;max-width:84%;}
#eq-chat .eqc-msg.me{margin-left:auto;align-items:flex-end;}
#eq-chat .eqc-msg.desk{align-items:flex-start;}
#eq-chat .eqc-who{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--q-faint);margin:10px 0 5px;}
#eq-chat .eqc-who img{width:22px;height:22px;border-radius:50%;}
#eq-chat .eqc-who b{color:var(--q-ink);font-weight:600;}
/* bubbles with real tails — the brand mark, repeated in every message */
#eq-chat .eqc-b{position:relative;padding:10px 14px;border-radius:20px;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;}
#eq-chat .me .eqc-b{background:linear-gradient(150deg,var(--q-terra-l) -40%,var(--q-terra) 45%,var(--q-terra-d) 130%);color:var(--q-me-ink);}
#eq-chat .desk .eqc-b{background:var(--q-desk);color:var(--q-desk-ink);box-shadow:0 1px 0 var(--q-line),0 6px 16px -10px rgba(28,31,35,.35);}
#eq-chat .eqc-msg.tail .eqc-b::after{content:"";position:absolute;bottom:0;width:15px;height:17px;}
#eq-chat .me.tail .eqc-b{border-bottom-right-radius:5px;}
#eq-chat .me.tail .eqc-b::after{right:-10px;clip-path:path("M0 0 C1 8 6 13.5 15 17 L0 17 Z");background:var(--q-terra-d);}
#eq-chat .desk.tail .eqc-b{border-bottom-left-radius:5px;}
#eq-chat .desk.tail .eqc-b::after{left:-10px;clip-path:path("M15 0 C14 8 9 13.5 0 17 L15 17 Z");background:var(--q-desk);}
#eq-chat .eqc-b a{color:inherit;text-decoration:underline;text-underline-offset:2px;}
#eq-chat .eqc-meta{font-size:11px;color:var(--q-faint);margin:4px 6px 0;}
#eq-chat .eqc-meta.err{color:#B3261E;cursor:pointer;font-weight:600;}
/* the automatic note — not a bubble: an italic aside with the small Equitable mark */
#eq-chat .eqc-note{display:flex;gap:10px;align-items:flex-start;margin:14px 6px 8px;color:var(--q-soft);
  font:italic 400 14.5px/1.45 var(--q-display);}
#eq-chat .eqc-note img{width:22px;height:18px;flex:0 0 auto;margin-top:3px;object-fit:contain;}
html[data-theme="dark"] #eq-chat .eqc-note img{filter:invert(.92) sepia(.15);}
#eq-chat .eqc-note a{color:var(--q-terra-d);font-style:normal;font-weight:600;font-family:var(--q-body);font-size:13.5px;}
html[data-theme="dark"] #eq-chat .eqc-note a{color:var(--q-terra-l);}
/* typing — the small Equitable mark nods */
#eq-chat .eqc-typing{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--q-faint);margin:8px 0 4px;}
#eq-chat .eqc-typing svg{width:26px;height:20px;color:var(--q-terra);}
#eq-chat .eqc-typing .eqc-logo{transform-box:fill-box;transform-origin:50% 100%;animation:eqcNod1 1.1s ease-in-out infinite;}
@keyframes eqcNod1{0%,100%{transform:rotate(0) scale(1);}35%{transform:rotate(-5deg) scale(1.05);}70%{transform:rotate(3deg) scale(1.03);}}

/* one question at a time — the desk's asides, the visitor's answers as tags */
#eq-chat .eqc-ask{display:flex;gap:10px;align-items:flex-start;margin:12px 6px 6px;color:var(--q-ink);
  font:italic 400 15px/1.45 var(--q-display);animation:eqcIn .35s ease both;}
#eq-chat .eqc-ask img{width:22px;height:18px;flex:0 0 auto;margin-top:3px;object-fit:contain;}
html[data-theme="dark"] #eq-chat .eqc-ask img{filter:invert(.92) sepia(.15);}
#eq-chat .eqc-ask.warn{color:#B3261E;font-size:13.5px;margin-top:2px;}
#eq-chat .eqc-ask.warn img{visibility:hidden;}
#eq-chat .eqc-ans-row{display:flex;justify-content:flex-end;margin:4px 0 2px;animation:eqcIn .3s ease both;}
#eq-chat .eqc-ans{display:inline-flex;align-items:center;gap:8px;max-width:86%;padding:7px 12px 7px 10px;border-radius:999px;
  background:var(--q-sunk);border:1px solid var(--q-line);font-size:14px;color:var(--q-ink);text-align:left;}
#eq-chat .eqc-ans svg{width:16px;height:16px;flex:0 0 auto;color:var(--q-terra-d);}
html[data-theme="dark"] #eq-chat .eqc-ans svg{color:var(--q-terra-l);}
#eq-chat .eqc-ans span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#eq-chat .eqc-ans em{font-style:normal;font-size:11.5px;font-weight:600;color:var(--q-terra-d);margin-left:2px;opacity:.85;}
#eq-chat button.eqc-ans:hover{border-color:var(--q-terra);}
@keyframes eqcIn{from{opacity:0;transform:translateY(6px);}to{opacity:1;transform:none;}}
@media (prefers-reduced-motion:reduce){#eq-chat .eqc-ask,#eq-chat .eqc-ans-row{animation:none;}}

/* --------------------------------------------------------- composer */
#eq-chat .eqc-compose{display:flex;align-items:flex-end;gap:8px;margin:0 14px;padding:8px 8px 8px 16px;
  border-radius:24px;background:var(--q-desk);border:1px solid var(--q-line);}
#eq-chat .eqc-compose:focus-within{border-color:var(--q-terra);box-shadow:0 0 0 4px rgba(199,102,62,.14);}
#eq-chat .eqc-compose textarea:focus,#eq-chat .eqc-compose textarea:focus-visible{outline:none;box-shadow:none;}
#eq-chat .eqc-compose textarea{flex:1;border:0;background:transparent;resize:none;max-height:120px;min-height:24px;
  padding:7px 0;font-size:15px;line-height:1.45;outline:none;}
#eq-chat .eqc-compose textarea::placeholder{color:var(--q-faint);}
#eq-chat .eqc-cap-tag,#eq-chat .eqc-cap-in,#eq-chat .eqc-skip{display:none;}
#eq-chat .eqc-compose--cap textarea{display:none;}
#eq-chat .eqc-compose--cap .eqc-cap-tag{display:block;align-self:center;font:700 10.5px/1 var(--q-body);letter-spacing:.14em;text-transform:uppercase;
  color:var(--q-terra-d);padding:6px 8px;border-radius:8px;background:var(--q-sunk);margin-right:2px;}
html[data-theme="dark"] #eq-chat .eqc-compose--cap .eqc-cap-tag{color:var(--q-terra-l);}
#eq-chat .eqc-compose--cap .eqc-cap-in{display:block;flex:1;min-width:0;border:0 !important;background:transparent !important;outline:none !important;box-shadow:none !important;border-radius:0;font-size:15px;padding:9px 0;height:auto;margin:0;}
#eq-chat .eqc-cap-in:focus,#eq-chat .eqc-cap-in:focus-visible{outline:none !important;box-shadow:none !important;border:0 !important;}
#eq-chat .eqc-compose--cap .eqc-cap-in::placeholder{color:var(--q-faint);}
#eq-chat .eqc-compose--cap .eqc-skip:not([hidden]){display:block;align-self:center;font-size:13px;font-weight:600;color:var(--q-soft);
  padding:7px 12px;border-radius:999px;border:1px solid var(--q-line);margin-right:2px;}
#eq-chat .eqc-compose--cap .eqc-skip:hover{border-color:var(--q-terra);color:var(--q-ink);}
#eq-chat .eqc-compose--cap{align-items:center;padding-left:8px;}
#eq-chat .eqc-send{width:40px;height:40px;border-radius:50%;flex:0 0 auto;display:grid;place-items:center;
  background:var(--q-terra);color:#fff;transition:transform .2s, background .2s;}
#eq-chat .eqc-send:hover{background:var(--q-terra-d);transform:rotate(-12deg);}
#eq-chat .eqc-send:disabled{background:var(--q-sunk);color:var(--q-faint);transform:none;cursor:default;}
#eq-chat .eqc-send svg{width:18px;height:18px;}
#eq-chat .eqc-foot{margin:8px 22px 16px;font-size:11.5px;color:var(--q-faint);text-align:center;}

/* ------------------------------------------------------------ phones */
@media (max-width:540px){
  #eq-chat{right:14px;bottom:14px;}
  #eq-chat .eqc-launch{height:58px;border-radius:20px;}
  #eq-chat .eqc-tile{width:58px;height:58px;}
  #eq-chat .eqc-launch:hover .eqc-label{max-width:0;opacity:0;padding-left:0;}
  #eq-chat .eqc-panel{position:fixed;inset:0;width:auto;height:auto;min-height:0;border-radius:0;border:0;
    transform-origin:calc(100% - 50px) calc(100% - 50px);}
  #eq-chat .eqc-tail{display:none;}
  #eq-chat.eqc--open .eqc-launch{display:none;}
  #eq-chat .eqc-head{padding-top:max(18px, env(safe-area-inset-top));}
  #eq-chat .eqc-foot{margin-bottom:max(14px, env(safe-area-inset-bottom));}
}
@media print{#eq-chat{display:none !important;}}
