:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #242424;
  background: #fff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --muted: #777;
  --line: #e7e7e7;
  --sidebar: #f7f7f7;
  --accent: #3d5a50;
  --hover: #ededed;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input, textarea { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 264px; flex: 0 0 264px; background: var(--sidebar); border-right: 1px solid var(--line);
  padding: 16px 12px 12px; display: flex; flex-direction: column; min-height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 9px 21px; font-size: 16px; font-weight: 650; letter-spacing: -.02em; }
.brand-mark { width: 28px; height: 28px; display: grid; place-items: center; color: #fff; background: #3d5a50; border-radius: 8px; font-size: 16px; font-weight: 600; }
.new-chat { height: 38px; border: 1px solid #dedede; background: #fff; border-radius: 8px; text-align: left; padding: 0 11px; font-size: 13px; cursor: pointer; }
.new-chat:hover { background: #f1f1f1; }
.new-chat span { font-size: 18px; margin-right: 8px; color: #555; vertical-align: -1px; }
.side-label { padding: 24px 10px 8px; font-size: 10px; letter-spacing: .08em; color: #888; font-weight: 650; }
.side-link { height: 36px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; text-align: left; color: #555; font-size: 13px; cursor: pointer; }
.side-link:hover, .side-link.active { background: #eaeaea; color: #222; }
.side-link span { display: inline-block; width: 23px; color: #666; font-size: 14px; }
.history-list { max-height: 42vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 0 2px; }
.history-entry { display: flex; align-items: center; border-radius: 7px; }
.history-entry:hover, .history-entry:focus-within { background: #ededed; }
.history-item { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; background: transparent; text-align: left; padding: 9px 8px; color: #555; font-size: 12px; cursor: pointer; }
.history-item.active { color: #222; font-weight: 600; }
.history-delete { width: 27px; height: 27px; border: 0; background: transparent; color: #777; border-radius: 6px; font-size: 16px; cursor: pointer; opacity: 0; }
.history-entry:hover .history-delete, .history-delete:focus-visible { opacity: 1; }
.history-empty { padding: 8px; color: #888; font-size: 11px; }
.sidebar-spacer { flex: 1; }
.sidebar-note { font-size: 11px; line-height: 1.55; color: #777; padding: 12px 9px 15px; }
.profile { width: 100%; border: 0; border-top: 1px solid #e3e3e3; background: transparent; text-align: left; color: inherit; cursor: pointer; padding: 12px 4px 4px; display: flex; align-items: center; gap: 9px; }
.profile:hover { background: #eee; border-radius: 7px; }
.avatar { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 50%; background: #e4e4e4; color: #454545; font-size: 12px; font-weight: 600; }
.profile strong, .profile small { display: block; }.profile strong { font-size: 12px; font-weight: 600; }.profile small { margin-top: 2px; color: #777; font-size: 10px; }.dots { margin-left: auto; color: #777; font-size: 12px; }
.main-panel { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 2; height: 55px; flex: 0 0 55px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 22px; background: rgba(255,255,255,.96); }
.model-picker { display: flex; align-items: center; gap: 8px; padding: 7px 9px; font-size: 13px; font-weight: 600; }
.chevron { color: #888; font-size: 14px; }.status-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #aaa; display: inline-block; }.status-dot.ready { background: #4b8c68; }
.topbar-right { display: flex; align-items: center; gap: 12px; }.local-tag { font-size: 10px; letter-spacing: .05em; color: #777; border: 1px solid #e3e3e3; padding: 4px 7px; border-radius: 5px; }.mobile-brand { display: none; }
.view { min-height: calc(100vh - 55px); display: flex; flex-direction: column; }
.conversation { width: min(768px, calc(100% - 48px)); margin: 0 auto; flex: 1; display: flex; flex-direction: column; padding: 32px 0 20px; }
.welcome { margin: auto 0; padding-bottom: 5vh; }.welcome-symbol { display: none; }.eyebrow { margin: 0 0 10px; color: #777; font-size: 10px; font-weight: 650; letter-spacing: .08em; }
.welcome h1, .train-content h1 { margin: 0 0 10px; font-size: 28px; line-height: 1.25; letter-spacing: -.035em; font-weight: 600; }.welcome h1 span { color: #777; font-weight: 400; }
.welcome-copy { max-width: 570px; margin: 0; color: #6f6f6f; font-size: 13px; line-height: 1.65; }
.suggestions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; max-width: 600px; }
.suggestion { min-height: 66px; border: 1px solid #e2e2e2; border-radius: 9px; background: #fff; text-align: left; padding: 12px 13px; font-size: 12px; color: #333; cursor: pointer; transition: background .12s, border-color .12s; }.suggestion:hover { background: #f8f8f8; border-color: #cfcfcf; }.suggestion small { display: block; margin-top: 6px; color: #888; font-size: 10px; }
.composer-wrap { position: sticky; bottom: 0; z-index: 1; width: min(768px, calc(100% - 48px)); margin: 0 auto; padding: 10px 0 14px; background: linear-gradient(#ffffff00, #fff 12px); }
.composer { border: 1px solid #d9d9d9; border-radius: 13px; padding: 10px 11px 8px; background: white; box-shadow: 0 2px 8px #0000000a; }.composer:focus-within { border-color: #aaa; box-shadow: 0 2px 9px #00000012; }
textarea { display: block; width: 100%; min-height: 38px; max-height: 150px; border: 0; outline: 0; resize: none; padding: 4px 3px; color: #262626; background: transparent; font-size: 13px; line-height: 1.5; }textarea::placeholder { color: #929292; }
.composer-bottom { display: flex; align-items: center; justify-content: space-between; padding: 3px 0 0 3px; }.composer-hint { color: #888; font-size: 10px; }.send-button { width: 30px; height: 30px; border: 0; border-radius: 8px; background: #333; color: #fff; font-size: 19px; line-height: 1; cursor: pointer; }.send-button:hover { background: #111; }.send-button:disabled { opacity: .4; cursor: wait; }.disclaimer { margin: 8px 0 0; color: #888; font-size: 10px; text-align: center; }
.composer-tools { display: flex; align-items: center; gap: 11px; }.attach-button { height: 29px; padding: 0 8px; border: 1px solid #e2e2e2; border-radius: 7px; background: #fff; color: #555; font-size: 12px; cursor: pointer; }.attach-button:hover { background: #f3f3f3; }.attach-button span { font-size: 11px; }.attachment-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 3px 9px; }.attachment-chip { max-width: 220px; display: flex; align-items: center; gap: 6px; padding: 5px 7px; border: 1px solid #e4e4e4; border-radius: 7px; background: #f8f8f8; color: #555; font-size: 10px; }.attachment-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.attachment-chip button { border: 0; background: transparent; color: #777; cursor: pointer; font-size: 14px; line-height: 1; }
.message { display: flex; gap: 12px; margin: 0 0 22px; animation: appear .16s ease; }.message.user { justify-content: flex-end; }.message .bubble { max-width: 86%; padding: 11px 14px; border-radius: 12px; background: #f4f4f4; color: #292929; font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }.message.user .bubble { max-width: 78%; background: #f1f1f1; border: 1px solid #e9e9e9; }.message.assistant .bubble { padding-left: 0; background: transparent; }.message-avatar { display: none; }
.message.assistant { flex-wrap: wrap; }.message.assistant .bubble { flex: 1 0 100%; }
.artifact-download { align-self: flex-start; margin: 8px 0 0; padding: 5px 8px; border: 1px solid #e3e3e3; border-radius: 6px; background: #fff; color: #666; font-size: 10px; cursor: pointer; }.artifact-download:hover { background: #f5f5f5; }
.train-view { align-items: center; justify-content: flex-start; padding: 54px 22px; }.train-content { width: min(560px, 100%); }.train-icon { display: none; }.train-content h1 { font-size: 27px; }.data-card { display: flex; align-items: center; gap: 12px; margin: 24px 0; padding: 13px; border: 1px solid var(--line); border-radius: 9px; }.data-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 7px; background: #f0f0f0; color: #555; }.data-details { flex: 1; }.data-details strong, .data-details span { display: block; }.data-details strong { font-size: 12px; }.data-details span { margin-top: 4px; color: #777; font-size: 11px; }.file-state { color: #888; font-size: 10px; }.file-state.available { color: #348052; }.file-state.missing { color: #a55c45; }.field-label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; }.steps-row { display: flex; align-items: center; gap: 12px; }.steps-row input { width: 120px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; }.steps-row span { color: #777; font-size: 11px; }.start-training { width: 100%; height: 40px; margin-top: 18px; border: 0; border-radius: 8px; background: #333; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }.start-training:disabled { opacity: .5; cursor: wait; }.start-training span { margin-left: 7px; }.training-status { display: flex; align-items: center; gap: 9px; margin-top: 15px; color: #666; font-size: 11px; }.training-note { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); color: #666; font-size: 11px; }.training-note strong { color: #333; }.training-note p { margin: 7px 0 0; line-height: 1.65; }.training-note code { padding: 2px 4px; border-radius: 4px; background: #f1f1f1; font-size: 10px; }.training-progress { display: block; width: 100%; height: 5px; margin-top: 10px; border: 0; border-radius: 99px; accent-color: #3d5a50; overflow: hidden; }.training-progress::-webkit-progress-bar { border-radius: 99px; background: #eee; }.training-progress::-webkit-progress-value { border-radius: 99px; background: #3d5a50; }.training-progress::-moz-progress-bar { background: #3d5a50; }
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #f7f7f7; }.auth-card, .profile-card { position: relative; width: min(410px, 100%); padding: 32px; border: 1px solid #e5e5e5; border-radius: 12px; background: white; }.auth-card .brand { padding: 0 0 28px; }.auth-card h1, .profile-card h2 { margin: 0 0 8px; font-size: 26px; letter-spacing: -.035em; }.auth-copy { margin: 0 0 24px; color: #6f6f6f; font-size: 13px; line-height: 1.6; }.auth-card .field-label, .profile-card .field-label { margin: 16px 0 7px; }.auth-card input, .profile-card input { display: block; width: 100%; height: 41px; padding: 0 11px; border: 1px solid #ddd; border-radius: 7px; outline: 0; font-size: 13px; }.auth-card input:focus, .profile-card input:focus { border-color: #999; box-shadow: 0 0 0 2px #0000000d; }.auth-card input[readonly], .profile-card input[readonly] { background: #f5f5f5; color: #777; }.auth-submit { width: 100%; height: 41px; margin-top: 21px; border: 0; border-radius: 7px; background: #333; color: white; font-weight: 600; cursor: pointer; }.auth-submit:disabled { opacity: .55; cursor: wait; }.auth-switch { margin: 18px 0 0; color: #777; font-size: 12px; text-align: center; }.auth-switch button { border: 0; background: transparent; color: #333; font: inherit; font-weight: 600; cursor: pointer; }.auth-error { margin: 14px 0 0; padding: 10px 12px; border-radius: 7px; background: #fff0ee; color: #a73d2d; font-size: 12px; line-height: 1.5; }.profile-dialog { width: min(430px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 12px; box-shadow: 0 15px 55px #0003; }.profile-dialog::backdrop { background: #0007; }.profile-card { width: 100%; border: 0; box-shadow: none; }.profile-card h2 { margin-bottom: 22px; }.dialog-close { position: absolute; top: 12px; right: 16px; border: 0; background: transparent; color: #777; font-size: 23px; cursor: pointer; }.profile-actions { display: flex; align-items: center; gap: 10px; }.profile-actions .auth-submit { flex: 1; }.signout-button { height: 41px; margin-top: 21px; padding: 0 13px; border: 1px solid #ddd; border-radius: 7px; background: #fff; color: #8b3530; font-size: 12px; font-weight: 600; cursor: pointer; }
body:not(.signed-in) .app-shell { display: none; }.signed-in .auth-screen { display: none; }
.toast { position: fixed; z-index: 5; left: 50%; bottom: 24px; max-width: min(90vw, 500px); padding: 10px 15px; border-radius: 8px; background: #292929; color: #fff; font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: .18s; }.toast.show { opacity: 1; transform: translate(-50%, 0); }
@keyframes appear { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 700px) { .sidebar { display: none; }.mobile-brand { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; }.mobile-brand .brand-mark { width: 25px; height: 25px; }.topbar { padding: 0 12px; }.model-picker { gap: 6px; padding: 6px 4px; font-size: 11px; }.local-tag { display: none; }.conversation, .composer-wrap { width: calc(100% - 28px); }.conversation { padding-top: 24px; }.welcome h1 { font-size: 25px; }.suggestions { grid-template-columns: 1fr; }.train-view { padding-top: 35px; }.steps-row { align-items: stretch; flex-direction: column; }.steps-row input { width: 100%; } }
body.hosted-mode .side-link[data-view="train"],
body.hosted-mode #train-view {
  display: none;
}
