:root {
  color-scheme:light;
  --canvas:#fbfcfa;
  --sidebar:#f0f3ef;
  --surface:#fff;
  --surface-2:#f4f6f3;
  --ink:#182d30;
  --muted:#657572;
  --faint:#64756b;
  --border:#dee5de;
  --accent:#176754;
  --accent-hover:#115643;
  --accent-soft:#e7f1ea;
  --user:#eaf1eb;
  --shadow:0 8px 32px #233b2d09,0 1px 4px #233b2d05;
  --danger:#a33136;
  --danger-soft:#fbebec;
  --warning:#75561b;
  --warning-soft:#fcf3da;
  --code:#f2f5f2;
  --code-ink:#2b4549;
  --sidebar-width:272px;
  --radius:16px;
  --focus:#21856f;
  --selection:#cfe7db
}
:root[data-theme=dark] {
  color-scheme:dark;
  --canvas:#142023;
  --sidebar:#111c1f;
  --surface:#1b292c;
  --surface-2:#1e2e30;
  --ink:#e2eae5;
  --muted:#a6b6b0;
  --faint:#8a9e96;
  --border:#2b3d3e;
  --accent:#a2d6bb;
  --accent-hover:#bfe7ce;
  --accent-soft:#223e34;
  --user:#243d36;
  --shadow:0 8px 32px #0002,0 1px 4px #0001;
  --danger:#ffafb3;
  --danger-soft:#432c31;
  --warning:#eed296;
  --warning-soft:#3b3526;
  --code:#0e191c;
  --code-ink:#dce9e3;
  --focus:#98dfc1;
  --selection:#355d4d
}
* {
  box-sizing:border-box
}
html,body {
  height:100%;
  margin:0
}
body {
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:var(--canvas);
  color:var(--ink);
  font-size:15px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased
}
button,input,select,textarea {
  font:inherit
}
button,a,select {
  -webkit-tap-highlight-color:transparent
}
button {
  color:inherit;
  cursor:pointer
}
button:disabled {
  cursor:not-allowed;
  opacity:.42
}
a {
  color:var(--accent)
}
button {
  border:0;
  background:none
}
button,select {
  touch-action:manipulation
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible {
  outline:3px solid var(--focus);
  outline-offset:3px
}
::selection {
  background:var(--selection)
}
[hidden] {
  display:none!important
}
.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0
}
.icon {
  width:20px;
  height:20px;
  display:inline-block;
  flex-shrink:0;
  vertical-align:middle;
  fill:none
}
.icon-button {
  width:36px;
  height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:9px;
  color:var(--muted);
  transition:background .15s,color .15s
}
.icon-button:hover {
  background:var(--surface-2);
  color:var(--ink)
}
.skip-link {
  position:fixed;
  z-index:100;
  left:16px;
  top:-70px;
  background:var(--surface);
  padding:12px 20px;
  border-radius:8px
}
.skip-link:focus {
  top:12px
}
.app-shell {
  height:100vh;
  height:100dvh;
  display:grid;
  grid-template-columns:var(--sidebar-width) minmax(0,1fr);
  overflow:hidden
}
.sidebar {
  background:var(--sidebar);
  border-right:1px solid var(--border);
  display:flex;
  flex-direction:column;
  min-height:0;
  padding:26px 18px 14px;
  gap:0;
  z-index:30;
  outline:none
}
.sidebar-brand {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:0 8px 29px
}
.brand {
  display:inline-flex;
  align-items:center;
  gap:11px;
  color:var(--ink);
  text-decoration:none;
  line-height:1.3;
  font-weight:690;
  font-size:21px;
  letter-spacing:-.5px
}
.brand small {
  display:block;
  color:var(--muted);
  font-size:11px;
  letter-spacing:.1px;
  font-weight:450;
  margin-top:3px
}
.brand img {
  border-radius:12px
}
.sidebar-close {
  display:none
}
.new-chat-button {
  display:flex;
  align-items:center;
  gap:9px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:10px;
  padding:11px 12px;
  box-shadow:0 1px 2px #00000003;
  font-size:13px;
  font-weight:620;
  text-align:left;
  white-space:nowrap
}
.new-chat-button:hover {
  border-color:var(--accent);
  background:var(--accent-soft)
}
.new-chat-button .icon {
  width:17px;
  height:17px;
  color:var(--accent)
}
.key-hint {
  display:none
}
.history-search {
  display:flex;
  align-items:center;
  gap:8px;
  margin:17px 4px 27px;
  color:var(--muted)
}
.history-search .icon {
  height:16px;
  width:16px
}
.history-search input {
  font-size:12px;
  min-width:0;
  width:100%;
  background:transparent;
  border:0;
  color:var(--ink);
  padding:5px 0
}
.history-search input::placeholder {
  color:var(--muted)
}
.history-search kbd {
  font:10px ui-monospace,monospace;
  border:1px solid var(--border);
  border-radius:4px;
  white-space:nowrap;
  padding:1px 4px;
  color:var(--faint)
}
.history-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:10px;
  font-weight:650;
  letter-spacing:1.1px;
  color:var(--muted);
  margin:0 10px 12px
}
.history-heading>span:last-child {
  letter-spacing:0;
  font-size:11px
}
.history {
  flex:1;
  min-height:0;
  overflow:auto;
  padding:0 1px 20px;
  scrollbar-width:thin
}
.history-group {
  padding:12px 10px 5px;
  font-size:11px;
  color:var(--muted)
}
.history-row {
  display:flex;
  align-items:center;
  position:relative;
  margin:2px 0;
  border-radius:9px;
  min-height:39px
}
.history-row:hover {
  background:var(--surface)
}
.history-row.active {
  background:var(--accent-soft)
}
.history-item {
  display:flex;
  align-items:center;
  gap:9px;
  padding:10px;
  min-width:0;
  flex:1;
  font-size:12px;
  text-align:left;
  color:var(--muted)
}
.history-item .icon {
  height:15px;
  width:15px;
  opacity:.8
}
.history-item span {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
.history-row.active .history-item {
  color:var(--accent);
  font-weight:580
}
.history-more {
  width:29px;
  height:31px;
  margin-right:3px;
  opacity:0
}
.history-row:hover .history-more,.history-more:focus-visible,.history-row.active .history-more {
  opacity:1
}
.empty-history {
  margin:22px 10px;
  text-align:left;
  color:var(--muted);
  font-size:12px;
  line-height:1.8
}
.empty-history strong {
  display:block;
  color:var(--ink);
  font-weight:500;
  margin-bottom:4px
}
.sidebar-bottom {
  border-top:1px solid var(--border);
  padding-top:16px
}
.edvora-link {
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:var(--ink);
  padding:8px 6px;
  border-radius:10px;
  font-size:12px;
  font-weight:600
}
.edvora-link:hover {
  background:var(--surface)
}
.edvora-link small {
  display:block;
  font-weight:400;
  font-size:10px;
  color:var(--muted);
  margin-top:3px
}
.edvora-link>.icon {
  margin-left:auto;
  width:15px;
  height:15px;
  color:var(--muted)
}
.edvora-monogram {
  font-family:Georgia,serif;
  font-size:28px;
  line-height:30px;
  color:var(--accent);
  font-weight:bold;
  width:27px;
  text-align:center
}
.sidebar-bottom-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:13px 6px 0
}
.local-label {
  display:flex;
  align-items:center;
  gap:5px;
  font-size:10px;
  color:var(--muted)
}
.local-label .icon {
  height:12px;
  width:12px
}
.workspace {
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  position:relative
}
.topbar {
  min-height:82px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:17px 29px 14px;
  flex-shrink:0;
  gap:12px
}
.topbar-left,.topbar-actions {
  display:flex;
  align-items:center;
  gap:14px
}
.topbar-actions {
  gap:10px
}
.page-heading {
  line-height:1.4;
  min-width:0
}
.page-heading>span:first-child {
  display:block;
  font-size:13px;
  font-weight:650;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  max-width:40vw
}
.page-subtitle {
  display:block;
  font-size:11px;
  color:var(--muted);
  margin-top:3px
}
.server-status {
  display:flex;
  align-items:center;
  gap:6px;
  font-size:11px;
  color:var(--muted);
  margin-right:8px;
  white-space:nowrap
}
.status-dot {
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--faint)
}
.server-status[data-state=online] .status-dot {
  background:#3d9970;
  box-shadow:0 0 0 3px #3d997010
}
.server-status[data-state=offline] .status-dot {
  background:#c86667
}
.server-status[data-state=degraded] .status-dot {
  background:#b59044
}
.conversation-scroll {
  flex:1;
  min-height:0;
  overflow:auto;
  scrollbar-width:thin;
  scroll-behavior:smooth;
  position:relative;
  overscroll-behavior:contain
}
.welcome {
  max-width:784px;
  margin:0 auto;
  min-height:100%;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:28px 30px 44px;
  animation:rise-in .35s ease
}
.welcome-mark {
  display:flex;
  align-items:center;
  gap:16px;
  margin-bottom:26px
}
.welcome-mark img {
  border-radius:17px;
  box-shadow:0 6px 15px #17675412
}
.welcome-label {
  font-size:10px;
  letter-spacing:1.7px;
  color:var(--muted);
  font-weight:620
}
.welcome h1 {
  font-family:ui-serif,Georgia,"Times New Roman",serif;
  font-weight:400;
  font-size:51px;
  line-height:1.13;
  letter-spacing:-1.65px;
  margin:0 0 18px
}
.welcome h1 span {
  color:var(--accent)
}
.welcome-description {
  color:var(--muted);
  font-size:14px;
  line-height:1.85;
  margin:0 0 31px
}
.suggestions {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px
}
.suggestion {
  display:flex;
  align-items:center;
  gap:12px;
  padding:17px 15px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:12px;
  text-align:left;
  transition:background .15s,transform .15s,border-color .15s;
  min-width:0
}
.suggestion:hover {
  background:var(--surface-2);
  border-color:var(--accent);
  transform:translateY(-2px)
}
.suggestion strong {
  display:block;
  font-size:12px;
  font-weight:620
}
.suggestion small {
  display:block;
  font-size:10px;
  color:var(--muted);
  margin-top:4px;
  line-height:1.5
}
.suggestion-icon {
  width:33px;
  height:37px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  border-radius:9px
}
.suggestion-icon .icon {
  width:19px;
  height:19px
}
.mint {
  background:#e5f0e9;
  color:#386c56
}
.lavender {
  background:#efeaf5;
  color:#716086
}
.sand {
  background:#f6efdf;
  color:#886e32
}
.blue {
  background:#e7eef5;
  color:#4a6987
}
:root[data-theme=dark] .mint {
  background:#284438;
  color:#a0d9b6
}
:root[data-theme=dark] .lavender {
  background:#343144;
  color:#c5b6e4
}
:root[data-theme=dark] .sand {
  background:#413b2a;
  color:#e1c783
}
:root[data-theme=dark] .blue {
  background:#273d48;
  color:#a7c8e3
}
.suggestion-arrow {
  width:15px;
  height:15px;
  color:var(--faint);
  margin-left:auto;
  flex-shrink:0
}
.welcome-footnote {
  display:flex;
  align-items:center;
  gap:7px;
  color:var(--muted);
  font-size:10px;
  margin:21px 0 0
}
.welcome-footnote .icon {
  width:14px;
  height:14px;
  color:var(--accent)
}
.composer-region {
  position:relative;
  padding:12px 32px max(15px,env(safe-area-inset-bottom));
  flex-shrink:0;
  background:linear-gradient(0deg,var(--canvas) 90%,transparent)
}
.composer {
  max-width:800px;
  margin:0 auto;
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--surface);
  box-shadow:var(--shadow);
  transition:border-color .15s
}
.composer:focus-within {
  border-color:var(--accent)
}
#question {
  display:block;
  resize:none;
  min-height:59px;
  max-height:192px;
  width:100%;
  padding:20px 21px 7px;
  background:transparent;
  border:0;
  outline:none;
  color:var(--ink);
  font-size:14px;
  line-height:1.65;
  overflow-y:auto;
  border-radius:18px
}
#question::placeholder {
  color:var(--muted)
}
#question:focus-visible {
  outline:none
}
.composer:has(#question:focus-visible) {
  outline:2px solid var(--focus);
  outline-offset:3px
}
.composer-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:9px 12px 12px 13px;
  gap:9px
}
.composer-tools,.composer-send {
  display:flex;
  align-items:center;
  gap:7px
}
.search-mode-wrap {
  display:flex;
  align-items:center;
  position:relative;
  padding:6px 7px;
  gap:6px;
  border:1px solid var(--border);
  border-radius:8px;
  height:32px;
  color:var(--muted)
}
.search-mode-wrap>.icon {
  height:14px;
  width:14px
}
.search-mode-wrap select {
  font-size:11px;
  color:var(--ink);
  font-weight:500;
  background:transparent;
  border:0;
  border-radius:4px;
  padding:0 20px 0 0;
  appearance:none;
  max-width:130px;
  cursor:pointer
}
.search-mode-wrap .select-arrow {
  position:absolute;
  right:6px;
  pointer-events:none;
  width:12px;
  height:12px
}
.search-mode-wrap option {
  background:var(--surface);
  color:var(--ink)
}
.tool-button {
  display:flex;
  align-items:center;
  gap:6px;
  font-size:11px;
  color:var(--muted);
  padding:8px;
  border-radius:8px;
  white-space:nowrap
}
.tool-button:hover {
  background:var(--surface-2);
  color:var(--ink)
}
.tool-button .icon {
  width:15px;
  height:15px
}
.send-button {
  width:35px;
  height:35px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--accent);
  color:var(--canvas);
  border-radius:11px;
  transition:background .15s
}
.send-button:not(:disabled):hover {
  background:var(--accent-hover)
}
.send-button:disabled {
  background:var(--accent);
  opacity:.35
}
.send-button .icon {
  width:19px;
  height:19px
}
.input-help {
  font-size:10px;
  color:var(--faint);
  margin-right:6px;
  white-space:nowrap
}
.composer-caption {
  max-width:800px;
  margin:10px auto 0;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  font-size:10px;
  color:var(--muted);
  padding:0 5px
}
.caption-button {
  font-size:10px;
  color:var(--muted);
  padding:0
}
.caption-button:hover {
  color:var(--accent);
  text-decoration:underline
}
.messages {
  max-width:800px;
  margin:0 auto;
  padding:25px 4px 22px
}
.message {
  margin-bottom:35px;
  min-width:0
}
.message-user {
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  padding-left:36px
}
.user-content {
  max-width:90%;
  background:var(--user);
  border-radius:18px 18px 5px 18px;
  padding:13px 18px;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  font-size:15px;
  line-height:1.7
}
.message-user .message-meta {
  font-size:10px;
  margin-top:6px;
  color:var(--muted);
  padding-right:4px
}
.assistant-heading {
  display:flex;
  align-items:center;
  gap:9px;
  margin:0 0 12px
}
.assistant-heading img {
  border-radius:8px;
  width:25px;
  height:25px
}
.assistant-heading strong {
  font-size:12px;
  font-weight:650
}
.assistant-heading .assistant-label {
  font-size:10px;
  color:var(--muted);
  margin-left:2px
}
.assistant-content {
  font-size:15px;
  line-height:1.85;
  overflow-wrap:anywhere;
  min-width:0
}
.assistant-content>:first-child {
  margin-top:0
}
.assistant-content>:last-child {
  margin-bottom:0
}
.assistant-content p {
  margin:12px 0
}
.assistant-content h1,.assistant-content h2,.assistant-content h3,.assistant-content h4,.assistant-content h5,.assistant-content h6 {
  font-family:inherit;
  line-height:1.4;
  letter-spacing:-.25px;
  color:var(--ink);
  margin:23px 0 11px;
  font-weight:660
}
.assistant-content h1 {
  font-size:24px
}
.assistant-content h2 {
  font-size:20px
}
.assistant-content h3 {
  font-size:17px
}
.assistant-content h4,.assistant-content h5,.assistant-content h6 {
  font-size:15px
}
.assistant-content strong {
  font-weight:660
}
.assistant-content ul,.assistant-content ol {
  padding-left:24px;
  margin:12px 0
}
.assistant-content li {
  padding-left:3px;
  margin:6px 0
}
.assistant-content li p {
  margin:5px 0
}
.assistant-content blockquote {
  border-left:3px solid var(--accent);
  background:var(--accent-soft);
  padding:10px 18px;
  margin:18px 0;
  border-radius:0 9px 9px 0;
  color:var(--muted)
}
.assistant-content blockquote p {
  margin:4px 0
}
.assistant-content hr {
  border:0;
  border-top:1px solid var(--border);
  margin:25px 0
}
.assistant-content a {
  color:var(--accent);
  text-underline-offset:3px;
  overflow-wrap:anywhere
}
.unverified-link {
  color:var(--ink);
  border-bottom:1px dotted var(--muted);
  cursor:help
}
.citation {
  font-size:10px;
  font-weight:700;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:19px;
  height:19px;
  padding:0 4px;
  border-radius:5px;
  background:var(--accent-soft);
  margin:0 2px;
  vertical-align:super;
  line-height:1
}
.assistant-content code {
  font-family:ui-monospace,"SFMono-Regular",Consolas,"Liberation Mono",monospace;
  font-size:.89em;
  background:var(--code);
  border:1px solid var(--border);
  border-radius:4px;
  padding:2px 5px;
  color:var(--code-ink)
}
.code-block {
  border:1px solid var(--border);
  border-radius:11px;
  background:var(--code);
  margin:17px 0;
  overflow:hidden
}
.code-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:var(--surface-2);
  padding:7px 13px;
  color:var(--muted);
  font-size:10px;
  border-bottom:1px solid var(--border)
}
.code-copy {
  display:flex;
  align-items:center;
  gap:5px;
  font-size:10px;
  padding:3px 5px;
  border-radius:5px;
  color:var(--muted)
}
.code-copy:hover {
  background:var(--border);
  color:var(--ink)
}
.code-copy .icon {
  width:13px;
  height:13px
}
.code-block pre {
  overflow-x:auto;
  margin:0;
  padding:16px;
  max-width:100%;
  line-height:1.75;
  tab-size:4
}
.code-block pre code {
  display:block;
  white-space:pre;
  background:transparent;
  border:0;
  padding:0;
  font-size:13px;
  overflow-wrap:normal;
  color:var(--code-ink)
}
.token.comment,.token.prolog,.token.doctype,.token.cdata {
  color:#596f61
}
.token.keyword,.token.operator,.token.atrule {
  color:#805496
}
.token.string,.token.attr-value,.token.regex {
  color:#397d57
}
.token.function,.token.class-name {
  color:#306c96
}
.token.number,.token.boolean,.token.constant {
  color:#a05c37
}
.token.punctuation {
  color:var(--muted)
}
.token.tag,.token.selector {
  color:#9b4759
}
:root[data-theme=dark] .token.keyword,:root[data-theme=dark] .token.operator,:root[data-theme=dark] .token.atrule {
  color:#d2a7e6
}
:root[data-theme=dark] .token.string,:root[data-theme=dark] .token.attr-value,:root[data-theme=dark] .token.regex {
  color:#a6d9af
}
:root[data-theme=dark] .token.function,:root[data-theme=dark] .token.class-name {
  color:#93c7e8
}
:root[data-theme=dark] .token.number,:root[data-theme=dark] .token.boolean,:root[data-theme=dark] .token.constant {
  color:#e4b18b
}
:root[data-theme=dark] .token.tag,:root[data-theme=dark] .token.selector {
  color:#e7a1ab
}
.table-wrap {
  overflow-x:auto;
  max-width:100%;
  margin:18px 0;
  border:1px solid var(--border);
  border-radius:10px
}
.assistant-content table {
  width:100%;
  border-collapse:collapse;
  font-size:12px;
  text-align:left
}
.assistant-content td,.assistant-content th {
  padding:10px 14px;
  border-bottom:1px solid var(--border);
  min-width:90px
}
.assistant-content th {
  font-weight:650;
  background:var(--surface-2);
  white-space:nowrap
}
.assistant-content tr:last-child td {
  border-bottom:0
}
.align-center {
  text-align:center
}
.align-right {
  text-align:right
}
.math-display {
  display:block;
  max-width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  padding:20px 10px;
  margin:17px 0;
  background:var(--surface-2);
  border-radius:10px;
  font-size:1.2em;
  scrollbar-width:thin;
  text-align:center;
  contain:inline-size
}
.math-display math {
  width:max-content;
  min-width:max-content;
  margin:0 auto;
  white-space:nowrap
}
.math-inline {
  display:inline;
  max-width:100%
}
.math-inline math {
  font-size:1.08em
}
.math-display math,.math-inline math {
  font-family:math,"Cambria Math","STIX Two Math",serif;
  color:var(--ink)
}
.math-error {
  display:block;
  font-size:12px;
  color:var(--warning);
  border:1px solid var(--border);
  padding:12px;
  border-radius:8px;
  overflow-x:auto
}
.math-error code {
  display:block;
  white-space:pre
}
.math-error small {
  display:block;
  margin-top:6px
}
.message-badges {
  display:flex;
  gap:7px;
  align-items:center;
  flex-wrap:wrap;
  margin:15px 0 0
}
.badge {
  display:inline-flex;
  align-items:center;
  gap:5px;
  border:1px solid var(--border);
  border-radius:6px;
  font-size:10px;
  padding:3px 7px;
  color:var(--muted)
}
.badge .icon {
  width:12px;
  height:12px
}
.badge-math {
  color:var(--accent);
  border-color:transparent;
  background:var(--accent-soft)
}
.message-actions {
  display:flex;
  align-items:center;
  gap:4px;
  margin-top:13px
}
.message-actions .icon-button {
  width:28px;
  height:28px
}
.message-actions .icon {
  width:15px;
  height:15px
}
.message-actions .action-label {
  font-size:10px;
  color:var(--muted);
  margin-left:5px
}
.sources {
  margin-top:21px;
  border-top:1px solid var(--border);
  padding-top:14px
}
.sources-heading {
  display:flex;
  align-items:center;
  gap:7px;
  font-size:11px;
  font-weight:620;
  margin:0 0 10px
}
.sources-heading .icon {
  width:14px;
  height:14px;
  color:var(--muted)
}
.sources-heading span {
  color:var(--muted);
  font-weight:400
}
.source-list {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px
}
.source-card {
  min-width:0;
  border:1px solid var(--border);
  border-radius:9px;
  background:var(--surface);
  padding:10px 12px
}
.source-card>a {
  display:flex;
  align-items:flex-start;
  gap:8px;
  color:var(--ink);
  text-decoration:none
}
.source-card>a:hover strong {
  color:var(--accent);
  text-decoration:underline
}
.source-number {
  font-size:10px;
  color:var(--muted);
  padding-top:2px
}
.source-info {
  min-width:0;
  flex:1
}
.source-info strong {
  display:block;
  font-size:11px;
  font-weight:580;
  line-height:1.55;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
.source-info small {
  display:block;
  font-size:10px;
  color:var(--muted);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  margin-top:3px
}
.source-card .icon {
  width:12px;
  height:12px;
  color:var(--muted);
  margin-top:3px
}
.source-card details {
  margin-top:7px;
  padding-left:20px
}
.source-card summary {
  font-size:10px;
  color:var(--muted);
  cursor:pointer
}
.source-card details p {
  font-size:11px;
  line-height:1.65;
  color:var(--muted);
  margin:6px 0 0
}
.sources-toggle {
  font-size:11px;
  color:var(--accent);
  margin:11px 0 0;
  padding:0;
  display:flex;
  align-items:center;
  gap:5px
}
.search-query {
  font-size:11px;
  color:var(--muted);
  margin:10px 0 0
}
.search-query summary {
  cursor:pointer
}
.search-query p {
  overflow-wrap:anywhere;
  margin-top:5px
}
.thinking {
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--muted);
  font-size:13px;
  padding:5px 0 10px
}
.thinking-dots {
  display:flex;
  gap:4px;
  align-items:center
}
.thinking-dots span {
  width:4px;
  height:4px;
  border-radius:100%;
  background:var(--accent);
  animation:thinking 1.2s ease-in-out infinite
}
.thinking-dots span:nth-child(2) {
  animation-delay:.16s
}
.thinking-dots span:nth-child(3) {
  animation-delay:.32s
}
.thinking-note {
  font-size:11px;
  color:var(--muted);
  margin-top:2px
}
.error-panel {
  padding:13px 15px;
  background:var(--danger-soft);
  border:1px solid color-mix(in srgb,var(--danger) 22%,transparent);
  border-radius:10px;
  color:var(--danger);
  font-size:13px
}
.error-panel p {
  margin:0 0 10px
}
.error-panel.canceled {
  background:var(--surface-2);
  color:var(--muted);
  border-color:var(--border)
}
.error-actions {
  display:flex;
  gap:8px
}
.error-actions button {
  font-size:11px;
  display:flex;
  align-items:center;
  gap:5px;
  border:1px solid currentColor;
  border-radius:6px;
  padding:4px 8px
}
.error-actions .icon {
  height:12px;
  width:12px
}
.jump-bottom {
  position:absolute;
  left:50%;
  top:-35px;
  transform:translateX(-50%);
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:50%;
  width:32px;
  height:32px;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:var(--shadow)
}
.jump-bottom .icon {
  height:16px;
  width:16px
}
.system-notices:empty {
  display:none
}
.notice {
  font-size:11px;
  background:var(--surface-2);
  padding:9px 20px;
  color:var(--muted);
  text-align:center
}
.notice.warning {
  background:var(--warning-soft);
  color:var(--warning)
}
.update-notice {
  display:flex;
  justify-content:center;
  align-items:center;
  gap:15px
}
.text-button {
  padding:0;
  font-size:11px;
  font-weight:600;
  color:var(--accent);
  text-decoration:underline
}
.request-notice {
  max-width:800px;
  margin:0 auto 8px;
  font-size:11px;
  color:var(--muted)
}
.modal {
  background:var(--surface);
  border:1px solid var(--border);
  color:var(--ink);
  border-radius:20px;
  padding:27px;
  max-width:580px;
  width:calc(100% - 32px);
  max-height:85vh;
  max-height:85dvh;
  box-shadow:0 24px 100px #0003;
  overflow:auto
}
.modal::backdrop {
  background:#10222570;
  backdrop-filter:blur(3px)
}
.modal-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-bottom:20px
}
.modal h2 {
  margin:0;
  font-size:22px;
  letter-spacing:-.6px;
  font-weight:640
}
.eyebrow {
  font-size:9px;
  letter-spacing:1.3px;
  color:var(--muted);
  display:block;
  margin-bottom:7px;
  font-weight:650
}
.setting-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  padding:15px 0;
  border-top:1px solid var(--border)
}
.setting-row strong,.danger-row strong {
  display:block;
  font-size:12px;
  font-weight:600
}
.setting-row small,.danger-row small {
  display:block;
  font-size:10px;
  color:var(--muted);
  margin-top:4px
}
.setting-row select,.modal input {
  border:1px solid var(--border);
  background:var(--surface-2);
  border-radius:8px;
  padding:9px 11px;
  font-size:12px;
  color:var(--ink)
}
.privacy-panel {
  background:var(--surface-2);
  padding:16px;
  border-radius:12px;
  display:flex;
  gap:11px;
  margin:10px 0 17px
}
.privacy-panel>.icon {
  color:var(--accent);
  height:17px;
  width:17px;
  margin-top:2px
}
.privacy-panel h3 {
  font-size:12px;
  margin:0 0 8px;
  font-weight:620
}
.privacy-panel p {
  font-size:11px;
  line-height:1.85;
  color:var(--muted);
  margin:8px 0
}
.privacy-panel p:last-child {
  margin-bottom:0
}
.setting-actions {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:15px 0 22px
}
.secondary-button,.primary-button,.danger-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  font-size:12px;
  font-weight:560;
  border-radius:8px;
  padding:9px 12px;
  border:1px solid var(--border);
  background:var(--surface-2)
}
.secondary-button:hover {
  border-color:var(--accent)
}
.secondary-button .icon {
  height:15px;
  width:15px
}
.primary-button {
  background:var(--accent);
  color:var(--canvas);
  border-color:var(--accent)
}
.primary-button:hover {
  background:var(--accent-hover)
}
.danger-button {
  color:var(--danger);
  background:var(--danger-soft);
  border-color:transparent
}
.danger-row {
  display:flex;
  align-items:center;
  gap:15px;
  justify-content:space-between;
  border-top:1px solid var(--border);
  padding-top:18px
}
.danger-row>span {
  flex:1
}
.modal-footnote {
  font-size:10px;
  text-align:center;
  color:var(--muted);
  margin:23px 0 0
}
.modal-footnote span {
  margin:0 5px
}
.compact-modal {
  max-width:420px
}
.compact-modal label {
  display:block;
  font-size:12px;
  margin-bottom:7px
}
.compact-modal input {
  width:100%;
  font-size:14px
}
.compact-modal p {
  font-size:12px;
  color:var(--muted);
  line-height:1.8
}
.dialog-actions {
  display:flex;
  justify-content:flex-end;
  gap:9px;
  margin-top:22px
}
.study-style-options {
  display:flex;
  flex-direction:column;
  gap:8px
}
.study-style-options button {
  display:flex;
  align-items:center;
  gap:13px;
  text-align:left;
  border:1px solid var(--border);
  border-radius:10px;
  padding:14px;
  background:var(--surface-2)
}
.study-style-options button:hover {
  border-color:var(--accent)
}
.study-style-options .icon {
  color:var(--accent)
}
.study-style-options strong {
  display:block;
  font-size:12px;
  font-weight:600
}
.study-style-options small {
  display:block;
  font-size:11px;
  color:var(--muted);
  margin-top:4px
}
.toast {
  position:fixed;
  bottom:22px;
  left:50%;
  transform:translateX(-50%);
  max-width:calc(100vw - 32px);
  border:1px solid var(--border);
  background:var(--ink);
  color:var(--canvas);
  padding:11px 18px;
  border-radius:10px;
  font-size:12px;
  box-shadow:var(--shadow);
  z-index:100;
  pointer-events:none
}
.noscript {
  position:fixed;
  inset:0;
  background:var(--surface);
  z-index:200;
  display:grid;
  place-items:center;
  padding:40px;
  font-size:20px
}
.history-menu {
  position:fixed;
  z-index:60;
  border:1px solid var(--border);
  border-radius:10px;
  padding:5px;
  background:var(--surface);
  box-shadow:0 8px 24px #0002;
  min-width:150px
}
.history-menu button {
  display:flex;
  align-items:center;
  gap:8px;
  text-align:left;
  padding:9px 11px;
  border-radius:6px;
  width:100%;
  font-size:12px
}
.history-menu button:hover {
  background:var(--surface-2)
}
.history-menu .icon {
  width:15px;
  height:15px
}
.history-menu .delete-action {
  color:var(--danger)
}
.sidebar-collapsed .app-shell {
  grid-template-columns:minmax(0,1fr)
}
.sidebar-collapsed .sidebar {
  display:none
}
.desktop-break {
  display:block
}
@keyframes rise-in {
  from {
    opacity:0;
    transform:translateY(7px)
  }
  to {
    opacity:1;
    transform:translateY(0)
  }
}
@keyframes thinking {
  0%,80%,100% {
    opacity:.35;
    transform:translateY(0)
  }
  40% {
    opacity:1;
    transform:translateY(-3px)
  }
}
@media(min-width:1450px) {
  .welcome {
    max-width:834px
  }
  .welcome h1 {
    font-size:57px
  }
  .welcome-description {
    font-size:15px
  }
  .suggestion {
    padding:19px 18px
  }
  .suggestion strong {
    font-size:13px
  }
  .suggestion small {
    font-size:11px
  }
}
@media(max-width:1120px) {
  :root {
    --sidebar-width:244px
  }
  .sidebar {
    padding:22px 13px 12px
  }
  .history-search kbd {
    display:none
  }
  .topbar {
    padding:14px 21px;
    min-height:75px
  }
  .messages {
    padding-left:27px;
    padding-right:27px
  }
  .welcome {
    padding:23px 30px 30px
  }
  .welcome h1 {
    font-size:46px
  }
  .suggestion {
    padding:13px 12px;
    gap:8px
  }
  .suggestion-arrow {
    display:none
  }
  .suggestion small {
    font-size:10px
  }
  .composer-region {
    padding-left:25px;
    padding-right:25px
  }
}
@media(max-width:760px) {
  .app-shell,.sidebar-collapsed .app-shell {
    grid-template-columns:minmax(0,1fr)
  }
  .sidebar,.sidebar-collapsed .sidebar {
    position:fixed;
    inset:0 auto 0 0;
    width:286px;
    max-width:86vw;
    display:none;
    box-shadow:12px 0 50px #0002;
    padding-top:max(22px,env(safe-area-inset-top));
    padding-bottom:max(14px,env(safe-area-inset-bottom))
  }
  .sidebar-open .sidebar {
    display:flex
  }
  .sidebar-close {
    display:flex
  }
  .sidebar-scrim {
    position:fixed;
    inset:0;
    background:#0b191d66;
    z-index:25
  }
  .topbar {
    padding:10px 13px;
    min-height:65px
  }
  .topbar-left {
    gap:8px
  }
  .topbar-actions {
    gap:4px
  }
  .page-heading>span:first-child {
    font-size:12px;
    max-width:38vw
  }
  .page-subtitle {
    display:none
  }
  .server-status {
    font-size:10px;
    margin-right:3px;
    gap:5px
  }
  .topbar-actions #quick-new-chat {
    display:none
  }
  .topbar .icon-button {
    width:33px;
    height:33px
  }
  .welcome {
    padding:30px 25px;
    max-width:580px
  }
  .welcome-mark {
    margin-bottom:22px;
    gap:12px
  }
  .welcome-mark img {
    width:44px;
    height:44px;
    border-radius:13px
  }
  .welcome-label {
    font-size:9px;
    letter-spacing:1.4px
  }
  .welcome h1 {
    font-size:43px;
    letter-spacing:-1.4px
  }
  .welcome-description {
    font-size:12px;
    margin-bottom:25px
  }
  .suggestions {
    gap:10px
  }
  .suggestion {
    padding:14px 12px;
    gap:10px;
    align-items:flex-start;
    flex-direction:column
  }
  .suggestion strong {
    font-size:11px
  }
  .suggestion small {
    font-size:10px
  }
  .suggestion-icon {
    width:29px;
    height:29px;
    border-radius:8px
  }
  .suggestion-icon .icon {
    height:17px;
    width:17px
  }
  .welcome-footnote {
    font-size:9px;
    margin-top:18px
  }
  .composer-region {
    padding:8px 13px max(12px,env(safe-area-inset-bottom))
  }
  .composer {
    border-radius:16px
  }
  #question {
    padding:16px 15px 7px;
    font-size:16px;
    min-height:54px;
    max-height:150px;
    line-height:1.55
  }
  .composer-toolbar {
    padding:7px 10px 10px;
    gap:6px
  }
  .input-help {
    display:none
  }
  .tool-button {
    font-size:10px;
    padding:6px
  }
  .search-mode-wrap select {
    font-size:11px;
    max-width:123px
  }
  .composer-caption {
    justify-content:center;
    text-align:center;
    font-size:9px;
    margin-top:8px;
    padding:0;
    line-height:1.5
  }
  .composer-caption .caption-button {
    display:none
  }
  .send-button {
    height:34px;
    width:34px
  }
  .messages {
    padding:18px 20px 15px
  }
  .message {
    margin-bottom:27px
  }
  .message-user {
    padding-left:10px
  }
  .user-content {
    max-width:95%;
    font-size:15px;
    padding:11px 15px
  }
  .assistant-content {
    font-size:15px;
    line-height:1.8
  }
  .source-list {
    grid-template-columns:1fr
  }
  .math-display {
    padding:18px 8px;
    font-size:1.09em
  }
  .table-wrap {
    font-size:11px
  }
  .modal {
    padding:21px;
    border-radius:17px
  }
  .modal h2 {
    font-size:20px
  }
  .setting-row {
    align-items:flex-start;
    flex-direction:column
  }
  .setting-row select {
    width:100%
  }
  .danger-row {
    align-items:flex-start;
    flex-direction:column;
    gap:12px
  }
  .modal-footnote {
    line-height:1.8
  }
  .history-more {
    opacity:1
  }
  .toast {
    bottom:20px;
    font-size:11px
  }
  .notice {
    font-size:10px;
    padding:7px 13px
  }
  .update-notice {
    gap:8px
  }
  .update-notice .text-button {
    font-size:10px
  }
}
@media(max-width:370px) {
  .welcome {
    padding:23px 18px
  }
  .welcome h1 {
    font-size:37px
  }
  .welcome-description {
    font-size:12px
  }
  .desktop-break {
    display:none
  }
  .suggestion {
    padding:12px 10px
  }
  .suggestion small {
    font-size:9px
  }
  .tool-button span {
    display:none
  }
  .server-status-label {
    font-size:9px
  }
  .topbar {
    gap:5px
  }
  .topbar-left {
    gap:3px
  }
  .topbar-actions {
    gap:0
  }
}
@media(max-height:760px) and (min-width:761px) {
  .welcome {
    padding-top:17px;
    padding-bottom:20px
  }
  .welcome h1 {
    font-size:42px
  }
  .welcome-mark {
    margin-bottom:17px
  }
  .welcome-mark img {
    height:43px;
    width:43px
  }
  .welcome-description {
    margin-bottom:23px
  }
  .suggestion {
    padding:13px
  }
  .welcome-footnote {
    margin-top:15px
  }
  .topbar {
    min-height:68px
  }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation:none!important;
    transition:none!important;
    scroll-behavior:auto!important
  }
}
@media print {
  body {
    height:auto;
    background:#fff;
    color:#111
  }
  .app-shell {
    display:block;
    height:auto;
    overflow:visible
  }
  .sidebar,.topbar,.composer-region,.system-notices,.message-actions,.message-meta {
    display:none!important
  }
  .workspace,.conversation-scroll {
    display:block;
    height:auto;
    overflow:visible
  }
  .messages {
    max-width:100%;
    padding:0
  }
  .message {
    break-inside:avoid
  }
  .code-block pre,.math-display,.table-wrap {
    overflow:visible
  }
  .welcome {
    display:none
  }
}
.plain-response {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  font-size:13px
}
