.gk-ai {
  --gk-ai-ink: #132739;
  --gk-ai-accent: #dc4b20;
  position: fixed;
  right: 18px;
  bottom: 110px;
  z-index: 9997;
  font-family: "Space Grotesk", sans-serif;
}
.gk-ai * { box-sizing: border-box; }
.gk-ai button, .gk-ai input, .gk-ai textarea { font: inherit; }
.gk-ai__trigger {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-left: auto;
  padding: 6px 18px 6px 6px;
  border: 1px solid #e46a47;
  border-radius: 0;
  color: #fff;
  background: var(--gk-ai-ink);
  box-shadow: 0 10px 28px #09182640;
  font-size: 15px;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.gk-ai__trigger:hover { transform: translateY(-2px); box-shadow: 0 13px 30px #09182655; }
.gk-ai__trigger:focus-visible, .gk-ai button:focus-visible, .gk-ai a:focus-visible { outline: 2px solid #e46a47; outline-offset: 2px; }
.gk-ai__glyph { display: grid; place-items: center; width: 42px; height: 42px; color: #fff; background: var(--gk-ai-accent); }
.gk-ai__glyph svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.gk-ai__panel { position: absolute; right: 0; bottom: 64px; display: flex; flex-direction: column; width: min(400px, calc(100vw - 24px)); height: min(610px, calc(100dvh - 160px)); min-height: 360px; border: 1px solid #b9c9d2; border-top: 4px solid var(--gk-ai-accent); background: #f8fafb; box-shadow: 0 22px 55px #0b20304d; }
.gk-ai__panel[hidden], .gk-ai__lead[hidden], .gk-ai__lead-form[hidden] { display: none; }
.gk-ai__header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; color: #fff; background: var(--gk-ai-ink); }
.gk-ai__header strong, .gk-ai__header small { display: block; }
.gk-ai__header strong { font-size: 19px; line-height: 1.2; }
.gk-ai__header small { margin-top: 4px; color: #cbdae2; font-size: 12px; }
.gk-ai__close { border: 0; color: #fff; background: transparent; font-size: 27px; line-height: 1; cursor: pointer; }
.gk-ai__messages { flex: 1; overflow: auto; padding: 18px; overscroll-behavior: contain; }
.gk-ai__message { max-width: 92%; margin-bottom: 13px; padding: 12px 14px; font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.gk-ai__message--user { margin-left: auto; color: #fff; background: var(--gk-ai-ink); }
.gk-ai__message--assistant { margin-right: auto; border-left: 3px solid var(--gk-ai-accent); color: var(--gk-ai-ink); background: #fff; box-shadow: 0 3px 12px #0b20300f; }
.gk-ai__message--assistant mjx-container[display="true"] { max-width: 100%; overflow-x: auto; overflow-y: hidden; }
.gk-ai__sources { display: grid; gap: 5px; margin: -4px 0 18px; font-size: 12px; }
.gk-ai__sources strong { color: #627685; }
.gk-ai__sources a { color: #b24424; text-decoration: underline; text-underline-offset: 2px; }
.gk-ai__starters { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 18px; }
.gk-ai__starters button { padding: 8px 10px; border: 1px solid #b8cad4; border-radius: 0; color: var(--gk-ai-ink); background: #fff; font-size: 11px; cursor: pointer; }
.gk-ai__starters button:hover { border-color: var(--gk-ai-accent); color: #ae3c1c; }
.gk-ai__feedback { margin: -3px 0 18px; padding: 10px; border: 1px solid #d7e1e6; background: #fff; font-size: 11px; }
.gk-ai__feedback strong { display: block; margin-bottom: 6px; color: var(--gk-ai-ink); }
.gk-ai__feedback label { display: flex; gap: 7px; margin-bottom: 9px; color: #566b7a; line-height: 1.35; }
.gk-ai__feedback label input { flex: none; margin: 2px 0 0; }
.gk-ai__feedback button { margin-right: 6px; padding: 5px 10px; border: 1px solid #b9cbd4; border-radius: 0; color: var(--gk-ai-ink); background: #f7fafb; cursor: pointer; }
.gk-ai__lead { padding: 9px 16px 0; border-top: 1px solid #dce4e8; }
.gk-ai__lead-toggle { padding: 0 0 10px; border: 0; color: #b24424; background: transparent; font-size: 13px; font-weight: 700; cursor: pointer; }
.gk-ai__lead-form { display: grid; gap: 8px; padding-bottom: 12px; }
.gk-ai__lead-form input:not([type=checkbox]), .gk-ai__composer textarea { width: 100%; padding: 10px; border: 1px solid #bdcbd3; border-radius: 0; color: var(--gk-ai-ink); background: #fff; font-size: 13px; }
.gk-ai__lead-form label { display: flex; align-items: flex-start; gap: 8px; color: #365064; font-size: 11px; line-height: 1.4; }
.gk-ai__lead-form label input { flex: none; margin: 2px 0 0; }
.gk-ai__lead-form button, .gk-ai__composer button { border: 0; border-radius: 0; color: #fff; background: var(--gk-ai-accent); font-size: 13px; font-weight: 700; cursor: pointer; }
.gk-ai__lead-form button { padding: 10px; }
.gk-ai__composer { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid #dce4e8; }
.gk-ai__composer textarea { flex: 1; min-height: 46px; max-height: 100px; resize: vertical; }
.gk-ai__composer button { padding: 0 12px; }
.gk-ai button:disabled { opacity: .5; cursor: wait; }
.gk-ai__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
@media (max-width: 600px) { .gk-ai { right: 12px; bottom: 104px; } .gk-ai__panel { bottom: 60px; height: min(560px, calc(100dvh - 180px)); } }
@media (prefers-reduced-motion: reduce) { .gk-ai__trigger { transition: none; } }

/* Compact assistant surface; the mascot, not a form button, is the entry point. */
.gk-ai { right: 20px; bottom: 22px; color: var(--gk-ai-ink); }
.gk-ai__trigger {
  position: relative;
  display: block;
  width: 174px;
  height: 157px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 12px 15px #06172555);
}
.gk-ai__trigger:hover { box-shadow: none; }
.gk-ai__trigger img {
  display: block;
  width: 110px;
  height: 110px;
  margin: 0 auto -3px;
  object-fit: contain;
  transform-origin: 56% 82%;
  animation: gk-ai-greet 5s ease-in-out infinite;
}
.gk-ai__trigger:hover img { animation-play-state: paused; transform: translateY(-4px) rotate(-3deg) scale(1.06); }
.gk-ai__trigger-label { display: block; padding: 5px 7px 6px; border-top: 2px solid #ec6536; color: #fff; background: #132739; text-align: center; box-shadow: 0 6px 16px #06172544; }
.gk-ai__trigger-label strong, .gk-ai__trigger-label small { display: block; }
.gk-ai__trigger-label strong { font-size: 18px; line-height: 1.05; letter-spacing: -.02em; }
.gk-ai__trigger-label small { margin-top: 3px; color: #bce3e8; font-size: 11px; line-height: 1.1; font-weight: 600; }
.gk-ai__hint {
  position: absolute;
  right: 169px;
  top: 11px;
  width: max-content;
  max-width: 220px;
  padding: 8px 11px;
  border: 1px solid #cad6dc;
  color: var(--gk-ai-ink);
  background: #fff;
  box-shadow: 0 5px 16px #0617251b;
  font-size: 11px;
  font-weight: 600;
  opacity: 0;
  transform: translateX(6px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.gk-ai__trigger:hover .gk-ai__hint,
.gk-ai__trigger:focus-visible .gk-ai__hint { opacity: 1; transform: none; }
.gk-ai__trigger[aria-expanded="true"] .gk-ai__hint { display: none; }
.gk-ai__status-dot {
  position: absolute;
  right: 12px;
  bottom: 48px;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 0;
  background: #31c77a;
  box-shadow: 0 0 0 3px #31c77a44;
}
.gk-ai__panel {
  right: 0;
  bottom: 164px;
  width: min(392px, calc(100vw - 24px));
  height: min(425px, calc(100dvh - 185px));
  min-height: 0;
  border: 1px solid #b9c8d1;
  border-top: 0;
  background: #f6f9fa;
  box-shadow: 0 22px 70px #05152357;
}
.gk-ai__panel--active { height: min(585px, calc(100dvh - 185px)); }
.gk-ai__header {
  position: relative;
  min-height: 84px;
  padding: 12px 15px;
  overflow: hidden;
  background: linear-gradient(120deg, #132739, #193c51 78%, #1b4d61);
}
.gk-ai__header::after {
  content: "";
  position: absolute;
  right: -42px;
  top: -32px;
  width: 135px;
  height: 135px;
  border: 1px solid #70dce030;
  border-radius: 0;
  box-shadow: 0 0 0 22px #70dce00b, 0 0 0 48px #70dce00b;
  pointer-events: none;
}
.gk-ai__identity { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; }
.gk-ai__identity img { width: 54px; height: 54px; object-fit: contain; }
.gk-ai__identity strong { font-size: 19px; letter-spacing: -.035em; }
.gk-ai__identity small { margin-top: 2px; font-size: 11px; }
.gk-ai__eyebrow { display: block; margin-bottom: 1px; color: #8cdee0; font-size: 8px; font-weight: 700; letter-spacing: .17em; }
.gk-ai__close { position: relative; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; font-size: 23px; }
.gk-ai__messages { padding: 0 15px 14px; background: linear-gradient(#f6f9fa, #fff); }
.gk-ai__welcome { padding: 12px 0 9px; }
.gk-ai__welcome-art {
  height: 58px;
  overflow: hidden;
  border: 1px solid #d8e5e8;
  background: linear-gradient(135deg, #eaf1f2, #f8fbfb);
}
.gk-ai__welcome-art svg { display: block; width: 100%; height: 100%; fill: none; stroke: #5695a0; stroke-width: 2; opacity: .7; }
.gk-ai__welcome-kicker { display: block; margin-top: 8px; color: #c14826; font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.gk-ai__welcome h2 { margin: 4px 0 3px; color: #132739; font-size: 19px; line-height: 1.2; letter-spacing: -.045em; }
.gk-ai__welcome p { margin: 0; color: #596e7d; font-size: 11px; }
.gk-ai__starters { gap: 7px; margin: 7px 0 0; }
.gk-ai__starters button { padding: 8px 10px; border-color: #ccd9de; font-size: 10px; font-weight: 600; }
.gk-ai__starters button::after { content: " ↗"; color: #d04f29; }
.gk-ai__composer { align-items: center; gap: 8px; padding: 10px 12px; background: #fff; }
.gk-ai__composer textarea { min-height: 42px; max-height: 88px; padding: 10px 11px; resize: none; border-color: #cbd9de; font-size: 12px; line-height: 1.4; }
.gk-ai__composer button { display: grid; place-items: center; flex: none; width: 43px; height: 42px; padding: 0; }
.gk-ai__composer button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gk-ai__recording-note { flex: none; margin: 0; padding: 7px 12px 9px; border-top: 1px solid #e1e9ec; color: #657987; background: #f7f9fa; font-size: 10px; line-height: 1.35; }
.gk-ai__panel--active .gk-ai__messages { padding-top: 15px; }
.gk-ai__message { max-width: 90%; margin-bottom: 10px; padding: 10px 12px; font-size: 12px; }
.gk-ai__sources { padding: 0 0 8px 11px; border-left: 1px solid #d6e1e5; }
.gk-ai__lead { background: #fff; }
@keyframes gk-ai-greet {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-6px) rotate(-3deg); }
  50% { transform: translateY(-2px) rotate(2deg); }
  72% { transform: translateY(-6px) rotate(-2deg); }
}
@media (max-width: 600px) {
  .gk-ai { right: 10px; bottom: 12px; }
  .gk-ai__trigger { width: 154px; height: 139px; }
  .gk-ai__trigger img { width: 92px; height: 92px; }
  .gk-ai__trigger-label strong { font-size: 16px; }
  .gk-ai__trigger-label small { font-size: 10px; }
  .gk-ai__hint { right: 150px; }
  .gk-ai__panel { bottom: 146px; height: min(425px, calc(100dvh - 165px)); }
  .gk-ai__panel--active { height: min(585px, calc(100dvh - 165px)); }
}
@media (prefers-reduced-motion: reduce) { .gk-ai__trigger img { animation: none; } }

/* Readable conversation workspace: keep the actual chat, not the decoration,
   as the dominant part of the widget on desktop and mobile. */
.gk-ai__panel,
.gk-ai__panel--active {
  width: min(560px, calc(100vw - 32px));
  height: min(740px, calc(100dvh - 190px));
  min-height: 520px;
}
.gk-ai__messages {
  min-height: 0;
  padding: 16px 20px 22px;
}
.gk-ai__panel--active .gk-ai__messages { padding-top: 20px; }
.gk-ai__message {
  max-width: 94%;
  margin-bottom: 14px;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.65;
}
.gk-ai__sources { font-size: 13px; line-height: 1.5; }
.gk-ai__composer { padding: 14px 16px; }
.gk-ai__composer textarea {
  min-height: 54px;
  max-height: 140px;
  padding: 14px;
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
}
.gk-ai__composer button { width: 52px; height: 54px; }
.gk-ai__recording-note { padding: 9px 16px 11px; font-size: 11px; }

@media (max-width: 600px) {
  .gk-ai__panel,
  .gk-ai__panel--active {
    position: fixed;
    z-index: 2147483647;
    inset: 10px;
    width: auto;
    height: auto;
    min-height: 0;
  }
  .gk-ai__header { min-height: 78px; padding: 10px 13px; }
  .gk-ai__identity img { width: 48px; height: 48px; }
  .gk-ai__messages { padding: 14px 13px 18px; }
  .gk-ai__panel--active .gk-ai__messages { padding-top: 14px; }
  .gk-ai__message {
    max-width: 96%;
    padding: 13px 14px;
    font-size: 15px;
    line-height: 1.6;
  }
  .gk-ai__composer { padding: 10px; }
  .gk-ai__composer textarea { min-height: 50px; font-size: 16px; resize: none; }
  .gk-ai__composer button { width: 48px; height: 50px; }
  .gk-ai__recording-note { padding: 7px 10px 9px; font-size: 10px; }
}

