:root {
  color-scheme: light;
  font: 15px "Segoe UI", system-ui, sans-serif;
  color: #344d61;
  --muted: #546a7d;
  --line: #d7e1e8;
  --panel: #f3f6f8;
  --green: #69b02f;
  --green-ink: #37651b;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 2px solid var(--green-ink); outline-offset: 3px; }
button, select { min-height: 44px; }
.secondary {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
}
.secondary:hover:not(:disabled) { background: #eaf0f4; }
.access { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--panel); }
.access > div { width: min(100%, 420px); border: 1px solid var(--line); border-radius: 24px; background: white; padding: clamp(20px, 7vw, 36px); }
.access h1 { margin: 24px 0 12px; }
.access p { color: var(--muted); line-height: 1.55; }
.chat { height: 100dvh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
aside { min-height: 0; display: flex; flex-direction: column; background: var(--panel); border-right: 1px solid var(--line); padding: 22px 14px 14px; }
.brand { align-self: flex-start; margin: 4px 0 26px 8px; }
#new-chat { text-align: left; }
aside h2 { font-size: 13px; color: var(--muted); margin: 26px 8px 10px; }
.history-scroll { flex: 1; min-height: 0; overflow: auto; padding: 4px; }
#history { padding: 0; margin: 0; list-style: none; }
#history button { border: 0; border-radius: 9px; background: transparent; width: 100%; padding: 10px; text-align: left; overflow-wrap: anywhere; }
#history button:hover { background: #eaf0f4; }
#history button[aria-current="true"] { background: #eaf4e1; color: var(--green-ink); box-shadow: inset 3px 0 var(--green); }
#history-status { color: var(--muted); font-size: 13px; margin: 4px; }
.account { display: grid; gap: 8px; padding: 12px 4px 0; border-top: 1px solid var(--line); }
#identity { overflow-wrap: anywhere; }
.workspace { min-height: 0; min-width: 0; display: flex; flex-direction: column; }
header { border-bottom: 1px solid #edf2f5; padding: 10px clamp(12px, 3vw, 26px); display: flex; align-items: center; gap: 10px; }
.profile { display: flex; align-items: center; gap: 8px; min-width: 0; }
.profile label { font-size: 13px; color: var(--muted); }
select { max-width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: white; padding: 0 8px; font-weight: 600; text-overflow: ellipsis; }
#thread { flex: 1; min-height: 0; overflow: auto; padding: 0 20px; }
#welcome, #messages, .composer-wrap { width: min(100%, 740px); margin: auto; }
#welcome { text-align: center; padding: clamp(24px, 13vh, 130px) 0 24px; }
#welcome h1 { margin: 18px 0 8px; font-size: clamp(23px, 4vw, 32px); }
#welcome p { margin: 0; color: var(--muted); }
.mark { display: inline-grid; place-items: center; width: 44px; height: 44px; font: 600 28px Georgia, serif; border-radius: 13px; background: #eaf4e1; color: var(--green-ink); }
article { margin: 24px 0 34px; line-height: 1.65; overflow-wrap: anywhere; }
.question { width: fit-content; max-width: 90%; margin: 0 0 18px auto; padding: 11px 16px; border-radius: 20px; background: #eaf0f4; white-space: pre-wrap; }
article h2 { font-size: 14px; margin: 0 0 8px; }
.answer p, .answer pre { white-space: pre-wrap; }
.sources { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 8px; }
summary { cursor: pointer; padding: 10px 0; }
.source-item { background: var(--panel); border-radius: 10px; padding: 10px 14px; margin: 6px 0; }
.source-item p { margin: 4px 0; font-size: 13px; color: var(--muted); white-space: pre-wrap; }
.source-item pre { white-space: pre-wrap; font-size: 12px; }
footer { padding: 0 20px max(12px, env(safe-area-inset-bottom)); background: white; }
#chat-status, #error { margin: 0 0 8px; font-size: 14px; }
#chat-status { color: var(--muted); }
#error { color: #a33122; }
#chat-status:empty, #error:empty, #history-status:empty { margin: 0; }
#retry-chat { margin-bottom: 8px; }
form { border: 1px solid #c4d2dc; background: #f6f8fa; border-radius: 22px; padding: 12px; }
textarea { width: 100%; min-height: 48px; max-height: 25vh; resize: vertical; display: block; border: 0; background: transparent; padding: 4px; }
.composer-actions { display: flex; justify-content: flex-end; margin-top: 5px; }
#send { background: var(--green); color: #183a0b; border: 0; border-radius: 22px; padding: 0 16px; font-weight: 600; }
.mobile-only, #scrim { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 760px) {
  .chat { display: block; }
  .workspace { height: 100%; }
  aside { display: none; position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 2; }
  .chat.menu-open aside { display: flex; }
  .chat.menu-open #scrim { display: block; position: fixed; inset: 0; border: 0; background: #243b5066; z-index: 1; }
  .mobile-only { display: inline-block; }
  #close-menu { margin-bottom: 8px; }
  .brand { margin-bottom: 14px; }
  #thread, footer { padding-inline: 14px; }
}

#connections-dialog{width:min(32rem,90vw);max-height:85vh;overflow:auto;color:inherit;border:1px solid #c4d2d9;border-radius:14px;padding:1.4rem}#connections-dialog::backdrop{background:#19324470}#connections-dialog button{margin:.25rem .3rem .4rem 0}#connections-dialog h3{margin-top:1.4rem}
