.tritium-chat {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  width: min(24rem, calc(100vw - 2rem));
  color: #e7eef2;
  font: 15px/1.45 "Segoe UI", "Helvetica Neue", sans-serif;
}
.tritium-chat > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  background: #00d4c8;
  color: #06211f;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.7rem 1rem;
}
.tritium-chat > summary::-webkit-details-marker { display: none; }
.tritium-chat-panel {
  width: 100%;
  max-height: min(70vh, 34rem);
  overflow: auto;
  margin-bottom: 0.6rem;
  background: #12181f;
  border: 1px solid #1e2a32;
  border-radius: 14px;
  padding: 0.8rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.tritium-chat-lead, .tritium-chat-note { margin: 0 0 0.6rem; color: #8aa0a6; font-size: 0.85rem; }
.tritium-chat-log { display: flex; flex-direction: column; gap: 0.4rem; max-height: 20rem; overflow: auto; }
.tritium-chat-user, .tritium-chat-assistant {
  margin: 0;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  white-space: pre-wrap;
}
.tritium-chat-user { background: #1e2a32; }
.tritium-chat-assistant { background: #06211f; }
.tritium-chat form { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.7rem; }
.tritium-chat textarea {
  width: 100%;
  min-height: 4.2rem;
  resize: vertical;
  border-radius: 8px;
  border: 1px solid #1e2a32;
  background: #0b0f14;
  color: #e7eef2;
  padding: 0.45rem;
  font: inherit;
}
.tritium-chat button {
  align-self: flex-start;
  background: #00d4c8;
  color: #06211f;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}
.tritium-chat-fit, .tritium-chat-lead {
  border: 1px solid #1e2a32;
  border-radius: 10px;
  margin: 0.55rem 0 0;
  padding: 0.45rem 0.65rem 0.7rem;
}
.tritium-chat legend { color: #8aa0a6; font-size: 0.8rem; padding: 0 0.2rem; }
.tritium-chat label { display: block; font-size: 0.8rem; color: #c5d4d8; margin-top: 0.4rem; }
.tritium-chat input, .tritium-chat select {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.2rem;
  background: #0b0f14;
  color: #e7eef2;
  border: 1px solid #1e2a32;
  border-radius: 8px;
  padding: 0.4rem;
  font: inherit;
}
.tritium-chat-checks { display: flex; flex-wrap: wrap; gap: 0.35rem 0.7rem; margin-top: 0.45rem; }
.tritium-chat-checks label { display: flex; align-items: center; gap: 0.3rem; margin: 0; }
.tritium-chat-checks input, .tritium-chat-consent input { width: auto; margin: 0; }
.tritium-chat-consent { display: flex; align-items: flex-start; gap: 0.4rem; }
.tritium-chat a { color: #00d4c8; }
