/* HackGrade live chat widget. Colors come ONLY from theme.css variables. */
.hgc{position:fixed;right:20px;bottom:20px;z-index:2147483000;font-family:var(--sans);color:var(--text);font-size:15px;line-height:1.5}
.hgc *{box-sizing:border-box}
.hgc-bub{width:60px;height:60px;border-radius:50%;border:0;cursor:pointer;background:var(--btn);color:var(--accink);box-shadow:var(--btnshadow),var(--scanshadow);
  display:flex;align-items:center;justify-content:center;position:relative;transition:transform .18s ease}
.hgc-bub:hover{transform:translateY(-2px) scale(1.03)}
.hgc-bub:focus-visible,.hgc button:focus-visible,.hgc textarea:focus-visible,.hgc input:focus-visible{outline:2px solid var(--acc);outline-offset:2px}
.hgc-bub svg{fill:currentColor}
.hgc-mark path{fill:currentColor}
.hgc-dot{position:absolute;top:4px;right:4px;width:14px;height:14px;border-radius:50%;background:var(--err);border:2px solid var(--surface)}
.hgc-panel{position:absolute;right:0;bottom:76px;width:380px;max-width:calc(100vw - 32px);height:min(620px,calc(100vh - 120px));
  background:var(--surface);border:1px solid var(--line2);border-radius:22px;box-shadow:var(--shadow);display:flex;flex-direction:column;overflow:hidden;
  animation:hgc-in .2s ease}
.hgc-panel[hidden]{display:none}
@keyframes hgc-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.hgc-panel{animation:none}.hgc-bub{transition:none}.hgc-pulse{animation:none!important}}
.hgc-h{display:flex;align-items:center;gap:12px;padding:16px 16px 14px;border-bottom:1px solid var(--line);background:var(--featbg)}
.hgc-av{width:40px;height:40px;border-radius:11px;background:var(--acc);color:var(--accink);display:flex;align-items:center;justify-content:center;flex:none}
.hgc-hw{flex:1;min-width:0}
.hgc-t{font-family:var(--serif);font-weight:600;font-size:17px;letter-spacing:-.01em;line-height:1.2}
.hgc-s{font-size:12.5px;color:var(--muted);display:flex;align-items:center;gap:6px;margin-top:3px}
.hgc-sdot{width:8px;height:8px;border-radius:50%;background:var(--dim);flex:none}
.hgc-sdot.on{background:var(--okc);box-shadow:0 0 0 3px var(--dotring)}
.hgc-x{border:0;background:transparent;color:var(--muted);width:36px;height:36px;border-radius:10px;cursor:pointer;display:flex;align-items:center;justify-content:center}
.hgc-x:hover{background:var(--accbg);color:var(--text)}
.hgc-x svg,.hgc-human svg,.hgc-send svg{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.hgc-log{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px;background:var(--bg);overscroll-behavior:contain}
.hgc-m{display:flex;flex-direction:column;max-width:86%}
.hgc-meta{font-size:11.5px;color:var(--dim);margin:0 4px 3px;display:flex;align-items:center;gap:5px}
.hgc-tag{font-size:10px;font-weight:700;letter-spacing:.04em;color:var(--acc2);background:var(--accbg);border:1px solid var(--accline);border-radius:6px;padding:0 5px}
.hgc-b{padding:10px 14px;border-radius:16px;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;unicode-bidi:plaintext}
.hgc-ai,.hgc-agent{align-self:flex-start}
.hgc-ai .hgc-b{background:var(--surface);border:1px solid var(--line2);border-start-start-radius:6px}
.hgc-agent .hgc-b{background:var(--surface);border:1px solid var(--accline);box-shadow:var(--softshadow);border-start-start-radius:6px}
.hgc-visitor{align-self:flex-end;align-items:flex-end}
.hgc-visitor .hgc-b{background:var(--btn);color:var(--accink);border-start-end-radius:6px}
.hgc-pending{opacity:.6}
.hgc-system{align-self:center;max-width:92%}
.hgc-sys{font-size:12.5px;color:var(--muted);background:var(--surface2);border:1px dashed var(--line2);border-radius:12px;padding:6px 12px;text-align:center}
.hgc-typing{display:flex;align-items:center;gap:4px;padding:0 20px 8px;background:var(--bg);font-size:12px;color:var(--dim)}
.hgc-typing[hidden]{display:none}
.hgc-typing i{width:6px;height:6px;border-radius:50%;background:var(--dim);animation:hgc-dot 1.2s infinite ease-in-out}
.hgc-typing i:nth-child(2){animation-delay:.15s}.hgc-typing i:nth-child(3){animation-delay:.3s}
.hgc-typing span{margin-inline-start:6px}
@keyframes hgc-dot{0%,80%,100%{opacity:.3;transform:none}40%{opacity:1;transform:translateY(-3px)}}
.hgc-chips{display:flex;flex-wrap:wrap;gap:6px;padding:10px 16px 0;background:var(--surface)}
.hgc-chips[hidden]{display:none}
.hgc-chip{border:1px solid var(--accline);background:var(--accbg);color:var(--acc2);border-radius:999px;padding:5px 12px;font:inherit;font-size:13px;cursor:pointer}
.hgc-chip:hover{background:var(--surface);border-color:var(--acc)}
.hgc-email{margin:10px 16px 0;padding:12px;border:1px solid var(--accline);background:var(--accbg);border-radius:14px;display:flex;flex-direction:column;gap:8px}
.hgc-email[hidden]{display:none}
.hgc-eh{font-weight:600;font-size:14px}
.hgc-email input{font:inherit;font-size:14px;padding:9px 12px;border-radius:10px;border:1px solid var(--line2);background:var(--surface);color:var(--text);width:100%}
.hgc-ebtn{font:inherit;font-weight:600;font-size:14px;border:0;border-radius:10px;padding:9px 12px;background:var(--btn);color:var(--accink);cursor:pointer}
.hgc-emsg{font-size:12.5px;color:var(--err)}
.hgc-emsg:empty{display:none}
.hgc-err{margin:8px 16px 0;font-size:13px;color:var(--err);background:var(--errbg);border:1px solid var(--errline);border-radius:10px;padding:6px 10px}
.hgc-err[hidden]{display:none}
.hgc-hbar{padding:10px 16px 0;background:var(--surface);display:flex}
.hgc-hbar[hidden]{display:none}
.hgc-human{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line2);background:var(--surface);color:var(--text);border-radius:999px;
  padding:6px 14px;font:inherit;font-size:13.5px;font-weight:600;cursor:pointer;margin-inline-start:auto}
.hgc-human:hover{border-color:var(--acc);color:var(--acc2)}
.hgc-pulse{border-color:var(--acc);color:var(--acc2);background:var(--accbg);animation:hgc-pulse 1.8s ease-in-out 3}
@keyframes hgc-pulse{0%,100%{box-shadow:0 0 0 0 var(--accline)}50%{box-shadow:0 0 0 6px var(--accbg)}}
.hgc-f{display:flex;align-items:flex-end;gap:8px;padding:10px 12px 6px 16px;background:var(--surface)}
.hgc[dir=rtl] .hgc-f{padding:10px 16px 6px 12px}
.hgc-f textarea{flex:1;resize:none;font:inherit;font-size:15px;line-height:1.45;padding:10px 14px;border-radius:14px;border:1px solid var(--line2);
  background:var(--bg);color:var(--text);max-height:130px;unicode-bidi:plaintext}
.hgc-f textarea:focus{border-color:var(--accline);background:var(--surface)}
.hgc-send{width:42px;height:42px;flex:none;border:0;border-radius:12px;background:var(--btn);color:var(--accink);cursor:pointer;display:flex;align-items:center;justify-content:center}
.hgc[dir=rtl] .hgc-send svg{transform:scaleX(-1)}
.hgc-send:disabled{opacity:.6;cursor:wait}
.hgc-note{font-size:11.5px;color:var(--dim);padding:2px 16px 12px;background:var(--surface)}
.hgc-hp{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;opacity:0!important}
@media (max-width:520px){
  .hgc{right:14px;bottom:14px}
  .hgc-bub{width:56px;height:56px}
  .hgc.hgc-on{inset:0;right:0;bottom:0}
  .hgc.hgc-on .hgc-bub{display:none}
  .hgc-panel{position:fixed;inset:0;width:100%;max-width:none;height:100%;border-radius:0;border:0;bottom:0}
}
@media print{.hgc{display:none}}
/* isolate from page-level element rules (e.g. section padding) */
.hgc section.hgc-panel{padding:0;margin:0}
.hgc header.hgc-h{position:static}
