/* ========== Bob ========== */

:root {
  --bob-z: 500;
  --bob-offline: #f5b942;
  --bob-error: #b3261e;
  --bob-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --bob-gap: 24px;
}

/* ---------- The character ---------- */
.bob {
  display: block;
  overflow: visible;
}

.bob .bob-float,
.bob .bob-f-eyes,
.bob .bob-f-talk {
  transform-box: fill-box;
  transform-origin: center;
}

.bob .bob-f { display: none; }

.bob:not([data-mood]) .bob-f-eyes,
.bob:not([data-mood]) .bob-f-smile,
.bob[data-mood="idle"] .bob-f-eyes,
.bob[data-mood="idle"] .bob-f-smile,
.bob[data-mood="talking"] .bob-f-eyes,
.bob[data-mood="talking"] .bob-f-talk,
.bob[data-mood="thinking"] .bob-f-eyes,
.bob[data-mood="thinking"] .bob-f-hmm,
.bob[data-mood="listening"] .bob-f-eyes,
.bob[data-mood="listening"] .bob-f-smile,
.bob[data-mood="happy"] .bob-f-happy,
.bob[data-mood="happy"] .bob-f-grin,
.bob[data-mood="wink"] .bob-f-wink,
.bob[data-mood="wink"] .bob-f-smile,
.bob[data-mood="sorry"] .bob-f-sorry,
.bob[data-mood="sorry"] .bob-f-wobble {
  display: inline;
}

/* Where he looks */
.bob .bob-face { transition: transform 0.18s cubic-bezier(0.25, 1, 0.5, 1); }
.bob--live .bob-face { transform: translate(var(--look-x, 0px), var(--look-y, 0px)); }
.bob[data-mood="thinking"] .bob-face { transform: translate(2.4px, -3px); }
.bob[data-mood="listening"] .bob-face { transform: translate(-2px, 1.5px); }

.bob .bob-f-eyes { transition: transform 0.09s ease-out; }
.bob.is-blinking .bob-f-eyes { transform: scaleY(0.12); }

/* Motion */
.has-motion .bob--live .bob-float { animation: bob-breathe 5.2s ease-in-out infinite; }
.has-motion .bob--live[data-mood="happy"] .bob-float { animation: bob-hop 0.6s var(--ease) 1; }
.has-motion .bob--live[data-mood="sorry"] .bob-float { animation: bob-shake 0.45s ease-in-out 2; }
.has-motion .bob--live[data-mood="talking"] .bob-f-talk { animation: bob-talk 0.36s ease-in-out infinite; }
.has-motion .bob--live[data-mood="talking"] .bob-tail {
  transform-box: view-box;
  transform-origin: 17px 48px;
  animation: bob-wag 0.72s ease-in-out infinite;
}

/* Thinking */
.has-motion .bob[data-mood="thinking"] .bob-float { animation: bob-tilt 3.2s ease-in-out infinite; }
.has-motion .bob[data-mood="thinking"] .bob-face { animation: bob-ponder 3.2s ease-in-out infinite; }

#chat-launcher.open .chat-fab .bob-float,
#chat-launcher:not(.open) .chat-avatar .bob-float,
#chat-launcher:not(.open) .chat-avatar .bob-face { animation: none; }

@keyframes bob-breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1.6px); }
}
@keyframes bob-hop {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-3px); }
}
@keyframes bob-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-1.4px); }
  75% { transform: translateX(1.4px); }
}
@keyframes bob-tilt {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(4deg); }
}
@keyframes bob-ponder {
  0%, 30%, 100% { transform: translate(2.4px, -3px); }
  50%, 80% { transform: translate(-2.4px, -3px); }
}
@keyframes bob-talk {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.3); }
}
@keyframes bob-wag {
  0%, 100% { transform: rotate(0); }
  50% { transform: rotate(-8deg); }
}

/* ---------- Launcher ---------- */
#chat-launcher {
  position: fixed;
  right: var(--bob-gap);
  bottom: var(--bob-gap);
  z-index: var(--bob-z);
  width: 64px;
  height: 64px;
  font-family: var(--font-ui);
}

.chat-fab {
  position: relative;
  display: block;
  width: 64px;
  height: 64px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: transform 0.3s var(--ease), opacity 0.2s ease;
}

.chat-fab::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -8px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(8, 12, 24, 0.42), rgba(8, 12, 24, 0));
  pointer-events: none;
}

.chat-fab .bob-float {
  transform-origin: 50% 60%;
  transition: transform 0.3s var(--ease);
}

.chat-fab:active { transform: scale(0.94); }

/* Hover */
#chat-launcher:not(.open) .chat-fab:hover .bob-float {
  animation: none;
  transform: rotate(-6deg);
}
#chat-launcher:not(.open) .chat-fab:hover .bob .bob-f { display: none; }
#chat-launcher:not(.open) .chat-fab:hover .bob .bob-f-happy,
#chat-launcher:not(.open) .chat-fab:hover .bob .bob-f-grin { display: inline; }

.chat-fab__dot {
  position: absolute;
  top: 3px;
  left: 46px;
  width: 13px;
  height: 13px;
  border-radius: var(--r-pill);
  background: var(--live);
  box-shadow: 0 0 0 2.5px var(--cream);
  pointer-events: none;
}

#chat-launcher.open .chat-fab {
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
  visibility: hidden;
  transition: transform 0.2s ease-in, opacity 0.16s ease-in, visibility 0s linear 0.2s;
}

/* One-time nudge */
.chat-nudge {
  position: absolute;
  top: 50%;
  right: calc(100% + 12px);
  margin: 0;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: var(--paper-raised);
  color: var(--body);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 14px 30px -12px rgba(8, 12, 24, 0.6), 0 0 0 1px rgba(29, 36, 56, 0.06);
  opacity: 0;
  transform: translateY(-50%) translateX(8px);
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.chat-nudge strong {
  color: var(--navy);
  font-weight: 600;
}

#chat-launcher.nudge:not(.open) .chat-nudge {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ---------- Panel ---------- */
.chat-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(460px, calc(100vw - 2 * var(--bob-gap)));
  height: min(740px, calc(100vh - 2 * var(--bob-gap)));
  overflow: hidden;
  border-radius: var(--r-card);
  background: var(--paper-raised);
  color: var(--navy);
  box-shadow: 0 30px 60px -20px rgba(8, 12, 24, 0.55), 0 0 0 1px rgba(29, 36, 56, 0.08);
  contain: layout paint;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.97);
  transform-origin: bottom right;
  transition: opacity 0.26s var(--ease), transform 0.32s var(--ease), visibility 0s linear 0.32s;
}

#chat-launcher.open .chat-panel {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.3s var(--ease), transform 0.38s var(--bob-ease-out), visibility 0s,
    width 0.34s var(--bob-ease-out), height 0.34s var(--bob-ease-out);
}

#chat-launcher.wide .chat-panel {
  width: min(820px, calc(100vw - 2 * var(--bob-gap)));
  height: min(940px, calc(100vh - 2 * var(--bob-gap)));
}

/* Header */
.chat-header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 4px;
  padding: 12px 10px 12px 18px;
  background: var(--ink);
  color: var(--cream);
}

.chat-avatar {
  display: block;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin-right: 8px;
}

.chat-identity {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 4px;
  min-width: 0;
}

.chat-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--cream);
}

.chat-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 13px;
  line-height: 1.3;
  color: var(--muted-dark);
}

.chat-status-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: var(--r-pill);
  background: var(--live);
  transition: background-color 0.3s ease;
}

.chat-status[data-mode="busy"] .chat-status-dot { background: var(--blue); }
.chat-status[data-mode="offline"] .chat-status-dot { background: var(--bob-offline); }
.has-motion .chat-status[data-mode="busy"] .chat-status-dot { animation: chat-pulse 1.1s ease-in-out infinite; }

@keyframes chat-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.chat-icon-btn {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: rgba(255, 252, 214, 0.72);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.chat-icon-btn:hover {
  background: rgba(255, 252, 214, 0.1);
  color: var(--cream);
}

.chat-size__shrink,
#chat-launcher.wide .chat-size__grow { display: none; }
#chat-launcher.wide .chat-size__shrink { display: block; }

@media (max-width: 900px), (max-height: 620px) {
  .chat-size { display: none; }
}

/* Body */
.chat-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(29, 36, 56, 0.2) transparent;
  padding: 24px 24px 18px;
  background: var(--paper-raised);
}

.chat-log,
.chat-composer,
.chat-note {
  width: 100%;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.has-motion .chat-log .anim { animation: chat-in 0.28s var(--ease) both; }

@keyframes chat-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* Welcome */
.chat-welcome {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-welcome__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.chat-welcome__intro {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--body);
}

.chat-prompts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#chat-launcher.wide .chat-prompts { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.chat-prompts.leaving,
.chat-chips.leaving {
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
}

.chat-prompt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  min-height: 54px;
  padding: 7px 14px 7px 7px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-raised);
  color: var(--navy);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.chat-prompt:hover {
  background: #f3f0e6;
  border-color: rgba(29, 36, 56, 0.14);
}

.chat-prompt__icon,
.chat-card__icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--tint);
  color: var(--blue-ink);
}

.chat-prompt__label {
  flex-grow: 1;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.chat-prompt__go,
.chat-card__go {
  display: grid;
  color: var(--muted);
  transition: transform 0.3s var(--ease), color 0.2s ease;
}

.chat-prompt:hover .chat-prompt__go,
.chat-card:hover .chat-card__go {
  transform: translateX(3px);
  color: var(--blue-ink);
}

.chat-welcome__alt {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

/* Messages */
.chat-row--user {
  display: flex;
  justify-content: flex-end;
}

.chat-bubble {
  max-width: 82%;
  margin: 0;
  padding: 10px 16px;
  border-radius: 20px 20px 6px 20px;
  background: var(--navy);
  color: var(--cream);
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.chat-row--bob,
.chat-row--thinking {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.chat-row--thinking { align-items: center; }

.chat-avatar-slot {
  display: block;
  width: 32px;
  height: 32px;
}

.chat-bob {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.chat-bob__name {
  margin: 5px 0 -2px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--muted);
}

.chat-text {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--body);
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.chat-body a {
  color: var(--blue-ink);
  text-decoration: underline;
  text-decoration-color: rgba(48, 87, 177, 0.4);
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.chat-body a:hover {
  color: var(--blue-deep);
  text-decoration-color: var(--blue-deep);
}

.chat-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 2px;
}

#chat-launcher.wide .chat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.chat-body a.chat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  color: var(--navy);
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.chat-body a.chat-card:hover {
  border-color: rgba(48, 87, 177, 0.35);
  background: #f3f0e6;
  color: var(--navy);
}

.chat-card__text {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 2px;
  min-width: 0;
}

.chat-card__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.chat-card__desc {
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--muted);
}

.chat-card__go { color: var(--blue-ink); }

/* Typewriter caret */
.bot-typing::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 2px;
  background: var(--blue-ink);
  vertical-align: -0.15em;
  animation: chat-caret 1s steps(1, end) infinite;
}

@keyframes chat-caret {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

/* Thinking */
.chat-thinking {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  margin: 0;
  padding: 9px 16px 9px 14px;
  border: 1px solid var(--line);
  border-radius: 6px 18px 18px 18px;
  background: var(--paper);
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--muted);
}

.chat-dots {
  display: inline-flex;
  gap: 4px;
}

.chat-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-ink);
  opacity: 0.45;
}

.has-motion .chat-dots i { animation: chat-dot 1.2s ease-in-out infinite; }
.has-motion .chat-dots i:nth-child(2) { animation-delay: 0.15s; }
.has-motion .chat-dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes chat-dot {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.chat-thinking__label { transition: opacity 0.2s ease; }
.chat-thinking__label.swap { opacity: 0; }

/* Follow-up chips */
.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 44px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.chat-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--tint);
  color: var(--blue-deep);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.chat-chip:hover {
  background: #d6e0fa;
  transform: translateY(-1px);
}

.chat-chip--human {
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(29, 36, 56, 0.22);
  color: var(--navy);
}

.chat-chip--human:hover {
  background: rgba(48, 87, 177, 0.06);
  box-shadow: inset 0 0 0 1px var(--blue-ink);
  color: var(--blue-ink);
}

.has-motion .chat-chips.anim .chat-chip { animation: chat-in 0.36s var(--ease) both; }

/* Retry after an error */
.chat-retry {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(29, 36, 56, 0.22);
  color: var(--navy);
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.2s ease, color 0.2s ease;
}

.chat-retry:hover {
  box-shadow: inset 0 0 0 1px var(--blue-ink);
  color: var(--blue-ink);
}

/* Hand-off to a person */
.chat-handoff {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-left: 44px;
  padding: 18px;
  border-radius: 20px;
  background: var(--sand);
}

.chat-handoff__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.chat-handoff__text {
  margin: 4px 0 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--body);
}

.chat-handoff__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-handoff__field label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
}

.chat-handoff__field input {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--paper-raised);
  color: var(--navy);
  font: inherit;
  font-size: 15.5px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-handoff__field input:focus {
  outline: none;
  border-color: var(--blue-ink);
  box-shadow: 0 0 0 3px rgba(48, 87, 177, 0.15);
}

.chat-handoff__field input[aria-invalid="true"] {
  border-color: var(--bob-error);
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.1);
}

.chat-handoff__error {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--bob-error);
}

.chat-handoff__error:empty { display: none; }

.chat-handoff__btn {
  min-height: 46px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--blue-ink);
  color: var(--cream);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.chat-handoff__btn:hover { background: var(--blue-deep); }
.chat-handoff__btn[aria-disabled="true"] { opacity: 0.6; cursor: wait; }

.chat-handoff--sent {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
}

.chat-handoff__tick {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-pill);
  background: #ddf4e7;
  color: #1e6b45;
}

.chat-handoff--sent p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--body);
}

.chat-handoff--sent strong { color: var(--navy); }

/* Composer */
.chat-footer {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 10px;
  padding: 14px 24px 14px;
  border-top: 1px solid var(--line);
  background: var(--paper-raised);
}

.chat-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 7px 7px 7px 16px;
  border: 1px solid var(--rule);
  border-radius: 20px;
  background: var(--paper);
  cursor: text;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-composer:focus-within {
  border-color: var(--blue-ink);
  box-shadow: 0 0 0 3px rgba(48, 87, 177, 0.15);
}

.chat-composer textarea {
  flex-grow: 1;
  min-width: 0;
  height: 42px;
  max-height: 156px;
  margin: 0;
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-size: 15.5px;
  line-height: 1.4;
  resize: none;
  overflow-y: auto;
  scrollbar-width: thin;
}

.chat-composer textarea:focus,
.chat-composer textarea:focus-visible { outline: none; }
.chat-composer textarea::placeholder { color: #6b7285; }

.chat-send {
  position: relative;
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--navy);
  color: var(--cream);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.chat-send:hover { background: var(--ink); transform: translateY(-1px); }

.chat-send[aria-disabled="true"] {
  background: #e9e5d8;
  color: #8a8577;
  cursor: default;
  transform: none;
}

.chat-send.waiting .ico { opacity: 0; }

.chat-send.waiting::after {
  content: "";
  position: absolute;
  inset: 11px;
  border: 2px solid rgba(138, 133, 119, 0.35);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: chat-spin 0.7s linear infinite;
}

@keyframes chat-spin { to { transform: rotate(360deg); } }

.chat-note {
  margin: 0;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.chat-note kbd {
  display: inline-block;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--paper);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--navy);
}

.chat-note a {
  color: var(--blue-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Focus */
#chat-launcher button:focus-visible,
#chat-launcher a:focus-visible,
#chat-launcher input:focus-visible {
  outline: 2px solid var(--blue-ink);
  outline-offset: 2px;
}

#chat-launcher .chat-fab:focus-visible,
#chat-launcher .chat-header button:focus-visible {
  outline-color: var(--blue);
}

#chat-launcher .chat-body:focus-visible {
  outline: 2px solid var(--blue-ink);
  outline-offset: -2px;
}

#chat-launcher .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .chat-panel { transform: none; }
  .bot-typing::after { animation: none; }
}
