:root {
  color-scheme: light;
  --ink: #163347;
  --ink-soft: #24495e;
  --paper: #f1f5f8;
  --white: #ffffff;
  --text: #243b49;
  --muted: #5f727f;
  --line: #d7e1e8;
  --teal: #166c66;
  --teal-soft: #e4f0ed;
  --error: #a02e36;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Liberation Sans", sans-serif;
  --reading: "Charter", "Bitstream Charter", "Sitka Text", "Cambria", Georgia, serif;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--text);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid #4aa9c6; outline-offset: 4px; }
button { transition: background-color .14s ease, border-color .14s ease; }
[hidden] { display: none !important; }
.icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.icon-definitions, .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; }
.boot-view { min-height: 100dvh; display: grid; place-items: center; color: var(--muted); }
.login-view { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 36px 24px; }
.login-panel { width: 100%; max-width: 426px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 38px; box-shadow: 0 14px 44px #16334708; }
.brand-mark { width: 37px; height: 37px; border: 1px solid #7693a34d; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.brand-mark-large { color: var(--ink); background: var(--paper); width: 46px; height: 46px; margin-bottom: 25px; }
.brand-mark-large .icon { width: 25px; height: 25px; }
.login-panel h1 { margin: 0; color: var(--ink); font-size: 26px; font-weight: 650; letter-spacing: -.7px; line-height: 1.25; }
.login-description { color: var(--muted); line-height: 1.6; margin: 12px 0 30px; }
.login-panel form { display: flex; flex-direction: column; }
.login-panel label { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.login-panel input { width: 100%; border: 1px solid #bdccd5; border-radius: 6px; padding: 11px 12px; color: var(--text); background: #fbfcfd; margin-bottom: 21px; }
.primary-button { background: var(--ink); color: var(--white); border: 1px solid var(--ink); border-radius: 6px; min-height: 44px; font-weight: 600; margin-top: 3px; }
.primary-button:hover { background: var(--ink-soft); }
.form-error { font-size: 13px; color: var(--error); margin: -4px 0 16px; line-height: 1.5; }
.private-label { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted); font-size: 12px; margin: 26px 0 0; }
.private-label .icon { width: 14px; height: 14px; }
.login-footnote { max-width: 310px; text-align: center; font-size: 12px; color: var(--muted); line-height: 1.6; margin: 22px 0 0; }
.app-shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); height: 100dvh; overflow: hidden; }
.sidebar { background: var(--ink); color: #e7eff4; display: flex; flex-direction: column; overflow: hidden; }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 25px 20px 29px; }
.sidebar-brand strong { display: block; font-size: 14px; font-weight: 600; letter-spacing: -.15px; }
.sidebar-brand span { display: block; font-size: 11px; color: #b1c5d2; margin-top: 4px; }
.new-conversation { display: flex; justify-content: center; align-items: center; gap: 9px; background: #284b60; color: var(--white); border: 1px solid #507083; border-radius: 6px; padding: 11px; font-size: 13px; font-weight: 550; margin: 0 18px 28px; }
.new-conversation:hover { background: #325a70; }
.new-conversation .icon { width: 17px; height: 17px; }
.history-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 22px 11px; color: #b1c5d2; }
.history-heading h2 { font-size: 11px; font-weight: 500; margin: 0; }
.history-heading span { font-size: 11px; }
.conversation-list { overflow-y: auto; flex: 1; padding: 0 10px 15px; scrollbar-color: #57788b transparent; scrollbar-width: thin; }
.conversation-item { display: block; width: 100%; padding: 12px; margin-bottom: 3px; border: 1px solid transparent; border-radius: 6px; color: #d9e6ee; background: transparent; text-align: left; }
.conversation-item:hover { background: #24495e; }
.conversation-item[aria-current="page"] { background: #30566d; border-color: #54758a; color: var(--white); }
.conversation-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 500; line-height: 1.6; }
.conversation-item span { display: block; font-size: 10px; color: #a9c2d1; margin-top: 3px; }
.conversation-item.is-running strong::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #8bd2bb; margin-left: 8px; vertical-align: middle; }
.history-empty { color: #a9c2d1; font-size: 12px; line-height: 1.7; padding: 8px 12px; margin: 0; }
.sidebar-footer { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 18px; border-top: 1px solid #456173; }
.account-details { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-avatar { display: grid; place-items: center; width: 32px; height: 32px; background: #31576a; border: 1px solid #688798; border-radius: 50%; color: #edf4f7; font-size: 11px; font-weight: 600; flex-shrink: 0; }
.account-details div { min-width: 0; }
.account-details strong { display: block; font-weight: 500; font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.account-details div span { display: block; color: #adc3d0; font-size: 10px; margin-top: 3px; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; padding: 7px; border: 0; border-radius: 5px; color: inherit; background: transparent; flex-shrink: 0; }
.icon-button:hover { background: #7b98a51c; }
.icon-button .icon { width: 18px; height: 18px; }
.workspace { min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; background: var(--paper); }
.workspace-header { height: 81px; min-height: 81px; display: flex; align-items: center; gap: 15px; justify-content: space-between; padding: 0 38px; border-bottom: 1px solid var(--line); background: #ffffffb0; }
.heading-group { min-width: 0; }
.heading-group h1 { font-size: 15px; font-weight: 600; letter-spacing: -.2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; }
.heading-group span { color: var(--muted); font-size: 11px; display: block; margin-top: 5px; }
.connection-status { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #99aab5; flex-shrink: 0; }
.connection-status[data-state="ready"] .status-dot { background: #29836d; }
.connection-status[data-state="error"] .status-dot { background: #b16f36; }
.notice { display: flex; align-items: center; gap: 16px; justify-content: space-between; padding: 10px 30px; color: #7d4224; background: #fff1df; border-bottom: 1px solid #eed2b1; font-size: 12px; line-height: 1.5; }
.chat-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; min-height: 0; scrollbar-color: #bdccd5 transparent; scrollbar-width: thin; }
.welcome { max-width: 740px; margin: 0 auto; padding: min(10vh, 96px) 32px 34px; }
.welcome-symbol { color: #587587; padding-bottom: 23px; }
.welcome-symbol .icon { width: 31px; height: 31px; stroke-width: 1.25; }
.welcome h2 { margin: 0; font-family: var(--reading); font-size: clamp(29px, 3.2vw, 38px); font-weight: 500; color: var(--ink); line-height: 1.22; letter-spacing: -.75px; }
.welcome > p { max-width: 490px; margin: 17px 0 34px; font-size: 14px; color: var(--muted); line-height: 1.75; }
.suggestions { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #cedae3; }
.suggestions button { padding: 17px 5px; background: transparent; border: 0; border-bottom: 1px solid #cedae3; display: flex; align-items: center; gap: 11px; color: var(--text); text-align: left; line-height: 1.45; font-size: 12px; }
.suggestions button:hover { color: var(--teal); background: #ffffff80; }
.suggestions button:nth-child(odd) { padding-right: 22px; }
.suggestions .icon { width: 17px; height: 17px; color: #6e8998; }
.messages { max-width: 840px; padding: 30px 38px 28px; margin: 0 auto; }
.message { margin: 0 0 32px; }
.message-header { display: flex; align-items: center; gap: 9px; font-size: 11px; margin-bottom: 11px; color: var(--muted); }
.message-header strong { color: var(--ink); font-weight: 600; font-size: 11px; }
.message-header time { font-size: 10px; }
.message-icon { width: 23px; height: 23px; display: grid; place-items: center; color: #547383; background: #e3ebf0; border-radius: 5px; flex-shrink: 0; }
.message-icon .icon { width: 14px; height: 14px; }
.message-user .message-content { white-space: pre-wrap; overflow-wrap: anywhere; padding: 15px 19px; border: 1px solid var(--line); background: var(--white); border-radius: 8px; font-size: 14px; line-height: 1.7; }
.message-assistant .message-content { line-height: 1.8; font-size: 15px; overflow-wrap: anywhere; }
.message-content > :first-child { margin-top: 0; }
.message-content > :last-child { margin-bottom: 0; }
.message-content p { margin: 0 0 16px; }
.message-content h1, .message-content h2, .message-content h3, .message-content h4, .message-content h5, .message-content h6 { font-family: var(--sans); color: var(--ink); line-height: 1.4; margin: 27px 0 12px; font-weight: 600; }
.message-content h1 { font-size: 23px; }.message-content h2 { font-size: 20px; }.message-content h3 { font-size: 17px; }.message-content h4, .message-content h5, .message-content h6 { font-size: 15px; }
.message-content ul, .message-content ol { padding-left: 25px; margin: 12px 0 19px; }
.message-content li { margin-bottom: 7px; }
.message-content li > p { margin-bottom: 8px; }
.message-content a { color: #14656b; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.message-content a:hover { color: #0f464e; }
.message-content a.document-link { border-radius: 3px; background: #deecea; padding: 1px 4px; text-decoration: none; border-bottom: 1px solid #a0c6c0; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.message-content a.document-link::after { content: " ↗"; font-size: .75em; }
.message-content blockquote { border-left: 3px solid #a5bbc8; padding: 2px 0 2px 18px; margin: 18px 0; color: #4e6472; }
.message-content pre { background: #e7edf2; border: 1px solid #cfdce5; border-radius: 6px; padding: 15px 17px; line-height: 1.6; font-size: 12px; overflow-x: auto; }
.message-content code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; background: #e6edf2; padding: 2px 4px; border-radius: 3px; font-size: .82em; }
.message-content pre code { background: transparent; padding: 0; font-size: inherit; }
.message-content table { display: block; border-collapse: collapse; overflow-x: auto; max-width: 100%; font-size: 12px; margin: 17px 0 23px; }
.message-content th, .message-content td { border: 1px solid #cbd9e2; padding: 9px 12px; text-align: left; vertical-align: top; line-height: 1.6; min-width: 80px; }
.message-content th { background: #e7eef3; color: var(--ink); font-weight: 600; }
.message-content hr { border: 0; border-top: 1px solid var(--line); margin: 25px 0; }
.message-pending { color: var(--muted); font-size: 13px; font-style: italic; }
.message-footer { display: flex; align-items: center; gap: 12px; min-height: 28px; margin-top: 8px; }
.copy-button { display: flex; align-items: center; gap: 5px; border: 0; color: var(--muted); font-size: 10px; padding: 4px 0; background: transparent; }
.copy-button:hover { color: var(--ink); }
.copy-button .icon { width: 12px; height: 12px; }
.message-status { font-size: 10px; color: var(--muted); }
.loading-messages { text-align: center; padding: 50px 20px; color: var(--muted); font-size: 13px; }
.composer-region { position: relative; width: 100%; max-width: 870px; margin: 0 auto; padding: 8px 38px max(16px, env(safe-area-inset-bottom)); }
.composer { border: 1px solid #b9ccd8; background: var(--white); border-radius: 10px; box-shadow: 0 3px 12px #16334705; padding: 14px 15px 10px; }
.composer:focus-within { border-color: #6d94aa; box-shadow: 0 0 0 2px #6d94aa14; }
.composer textarea { display: block; width: 100%; background: transparent; color: var(--text); border: 0; padding: 0; resize: none; min-height: 27px; max-height: 190px; line-height: 1.6; font-size: 14px; }
.composer textarea::placeholder { color: #7b8c97; }
.composer textarea:focus-visible { outline: none; }
.composer-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.keyboard-hint { margin-right: auto; font-size: 10px; color: #788b97; }
.send-button { background: var(--ink); color: var(--white); display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 6px; padding: 6px; }
.send-button:hover { background: var(--ink-soft); }
.send-button:disabled { background: #aebdc7; }
.send-button .icon { width: 20px; height: 20px; }
.stop-button { display: flex; align-items: center; gap: 6px; min-height: 32px; border: 1px solid #c3d1da; border-radius: 6px; color: var(--text); background: var(--white); padding: 6px 10px; font-size: 11px; }
.stop-button:hover { background: var(--paper); }
.stop-button .icon { width: 12px; height: 12px; }
.composer-footnote { font-size: 10px; color: #70838f; line-height: 1.5; text-align: center; margin: 10px 2px 0; }
.activity { display: flex; align-items: center; gap: 8px; color: var(--muted); min-height: 27px; font-size: 11px; padding: 0 3px 7px; }
.activity-dot { width: 6px; height: 6px; background: var(--teal); border-radius: 50%; animation: breathing 1.6s ease-in-out infinite; flex-shrink: 0; }
.jump-to-bottom { position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; border: 1px solid #c3d4de; border-radius: 20px; background: var(--white); padding: 7px 12px; font-size: 11px; color: var(--text); box-shadow: 0 2px 8px #16334709; white-space: nowrap; }
.jump-to-bottom .icon { width: 14px; height: 14px; }
.mobile-menu, .sidebar-close { display: none; }
@keyframes breathing { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
@media (min-width: 1550px) { .welcome { padding-top: 13vh; } }
@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 242px minmax(0, 1fr); }
  .sidebar-brand { padding-right: 14px; padding-left: 17px; gap: 9px; }
  .sidebar-brand strong { font-size: 12px; }
  .workspace-header { padding: 0 25px; }
  .messages { padding-right: 27px; padding-left: 27px; }
  .composer-region { padding-right: 25px; padding-left: 25px; }
  .welcome { padding-left: 27px; padding-right: 27px; }
  .suggestions { grid-template-columns: 1fr; }
  .suggestions button { padding: 13px 5px; }
}
@media (max-width: 720px) {
  :root { font-size: 14px; }
  .app-shell { display: block; }
  .workspace { height: 100dvh; }
  .sidebar { position: fixed; z-index: 30; top: 0; bottom: 0; left: 0; width: min(300px, 88vw); transform: translateX(-100%); transition: transform .18s ease; }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; z-index: 29; inset: 0; background: #0a1e2b70; border: 0; width: 100%; height: 100%; }
  .mobile-menu, .sidebar-close { display: grid; }
  .sidebar-close { margin-left: auto; }
  .sidebar-brand { padding-top: 22px; padding-bottom: 27px; }
  .sidebar-brand strong { font-size: 13px; }
  .workspace-header { height: 68px; min-height: 68px; padding: 0 15px; gap: 9px; }
  .heading-group { margin-right: auto; }
  .heading-group h1 { font-size: 13px; max-width: 48vw; }
  .heading-group span { font-size: 10px; }
  .connection-status { font-size: 10px; gap: 5px; }
  .welcome { padding: 43px 24px 24px; }
  .welcome-symbol { padding-bottom: 20px; }
  .welcome h2 { font-size: 31px; }
  .welcome > p { font-size: 13px; line-height: 1.7; margin-top: 14px; margin-bottom: 25px; }
  .suggestions button { padding: 13px 2px; font-size: 12px; }
  .messages { padding: 24px 21px 20px; }
  .message { margin-bottom: 26px; }
  .message-assistant .message-content { font-size: 14px; line-height: 1.8; }
  .message-user .message-content { font-size: 13px; padding: 13px 15px; }
  .composer-region { padding: 6px 14px max(12px, env(safe-area-inset-bottom)); }
  .composer { padding: 12px 12px 8px; }
  .composer textarea { font-size: 16px; }
  .keyboard-hint { display: none; }
  .composer-actions { margin-top: 5px; }
  .composer-footnote { font-size: 9px; padding: 0 6px; margin-top: 8px; }
  .notice { padding: 8px 17px; font-size: 11px; gap: 10px; }
  .login-panel { padding: 30px 27px; }
  .login-panel h1 { font-size: 24px; }
}
@media (max-height: 650px) and (min-width: 721px) { .welcome { padding-top: 25px; } .welcome-symbol { padding-bottom: 12px; } .welcome > p { margin-bottom: 20px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
