:root {
  color-scheme: light;
  --bg: #f5f6f7;
  --surface: #ffffff;
  --surface-2: #eef0f2;
  --text: #15171a;
  --muted: #6c7178;
  --border: #dfe2e5;
  --accent: #1e6fe8;
  --green: #2f9c68;
  --orange: #b86618;
  --danger: #c63d45;
  --sidebar: #eceeef;
  --shadow: 0 16px 44px rgba(20, 24, 31, .12);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { height: 100dvh; overflow: hidden; }
button, input, textarea, select { font: inherit; letter-spacing: 0; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(30,111,232,.25); outline-offset: 2px; }
a { color: inherit; text-decoration: none; }
.app-shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); height: 100dvh; }
.sidebar { background: var(--sidebar); border-right: 1px solid var(--border); display: flex; flex-direction: column; min-width: 0; padding: 14px 12px max(14px, env(safe-area-inset-bottom)); z-index: 20; }
.brand-row, .brand { display: flex; align-items: center; }
.brand-row { justify-content: space-between; padding: 2px 5px 14px; }
.brand { gap: 9px; font-size: 15px; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.icon-button { width: 36px; height: 36px; border: 0; background: transparent; border-radius: 7px; color: var(--muted); display: inline-grid; place-items: center; font-size: 22px; }
.icon-button:hover { background: rgba(0,0,0,.055); color: var(--text); }
.new-chat { width: 100%; height: 42px; border: 1px solid var(--border); background: var(--surface); border-radius: 7px; text-align: left; padding: 0 12px; font-weight: 600; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.new-chat span { font-size: 20px; margin-right: 7px; font-weight: 400; }
.sidebar-label { padding: 22px 8px 8px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.conversation-list { overflow-y: auto; flex: 1; min-height: 0; }
.conversation-item { height: 42px; width: 100%; border: 0; border-radius: 6px; background: transparent; color: var(--text); padding: 0 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; }
.conversation-item:hover, .conversation-item.active { background: rgba(255,255,255,.8); }
.conversation-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-item .delete-chat { opacity: 0; width: 25px; height: 25px; border: 0; background: transparent; border-radius: 5px; color: var(--muted); }
.conversation-item:hover .delete-chat { opacity: 1; }
.sidebar-footer { border-top: 1px solid var(--border); padding-top: 9px; }
.account-button { border: 0; background: transparent; width: 100%; display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 9px; padding: 7px; border-radius: 7px; text-align: left; }
.account-button:hover { background: rgba(255,255,255,.7); }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #24272c; color: #fff; font-size: 13px; }
.account-copy { display: flex; flex-direction: column; min-width: 0; }
.account-copy strong, .account-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy strong { font-size: 13px; }.account-copy small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.footer-links { display: flex; gap: 14px; padding: 8px; font-size: 11px; color: var(--muted); }
.chat-main { display: grid; grid-template-rows: 58px minmax(0, 1fr) auto; min-width: 0; height: 100dvh; background: var(--surface); }
.topbar { border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); gap: 14px; }
.model-control { display: flex; align-items: center; gap: 8px; min-width: 0; }
.model-control label { color: var(--muted); font-size: 12px; }
.model-control select { max-width: 260px; border: 0; background: transparent; color: var(--text); font-weight: 600; font-size: 13px; padding: 7px; }
.thinking-control { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; cursor: pointer; }.thinking-control input { position: absolute; opacity: 0; pointer-events: none; }.thinking-control i { position: relative; width: 30px; height: 18px; border-radius: 9px; background: #c9cdd1; transition: .18s; }.thinking-control i::after { content: ''; position: absolute; width: 14px; height: 14px; left: 2px; top: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: .18s; }.thinking-control input:checked + i { background: var(--green); }.thinking-control input:checked + i::after { transform: translateX(12px); }.thinking-control input:focus-visible + i { outline: 3px solid rgba(30,111,232,.25); outline-offset: 2px; }.thinking-control input:disabled + i { opacity: .45; cursor: default; }
.mode-control { display: flex; background: var(--surface-2); border-radius: 7px; padding: 3px; margin-left: auto; }
.mode-control button { min-width: 60px; border: 0; background: transparent; color: var(--muted); padding: 6px 10px; border-radius: 5px; font-size: 12px; }
.mode-control button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.09); font-weight: 600; }
.usage-button { border: 0; background: transparent; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.usage-ring { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--green) var(--usage, 0%), var(--surface-2) 0); position: relative; font-size: 9px; color: var(--text); }
.usage-ring::before { content: ''; position: absolute; inset: 4px; background: var(--surface); border-radius: 50%; }.usage-ring { isolation: isolate; }.usage-ring::after { content: attr(data-label); position: absolute; z-index: 1; }
.messages { overflow-y: auto; padding: 28px max(20px, calc((100% - 800px) / 2)) 150px; scroll-behavior: smooth; }
.welcome { width: min(100%, 760px); min-height: 78%; margin: 0 auto; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-align: left; }
.welcome-kicker { display: flex; align-items: center; gap: 8px; color: #687078; font-size: 10px; font-weight: 800; }
.welcome-kicker > span { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(47,156,104,.12); }
.welcome h1 { max-width: 650px; margin: 14px 0 10px; font-size: 34px; line-height: 1.22; font-weight: 520; letter-spacing: 0; }
.welcome h1 strong:first-child { color: #1769d2; }.welcome h1 strong:last-child { color: #23865a; }
.welcome-copy { margin: 0 0 26px; color: var(--muted); font-size: 14px; }
.suggestions { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.suggestions button { position: relative; min-height: 138px; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 17px; display: flex; flex-direction: column; align-items: flex-start; text-align: left; color: var(--text); overflow: hidden; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.suggestions button::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: #2777df; }.suggestions button.planning::before { background: var(--green); }.suggestions button.reviewing::before { background: #d0802b; }
.suggestions button:hover { transform: translateY(-2px); border-color: #c4c9ce; box-shadow: 0 8px 22px rgba(29,36,44,.08); }
.suggestions .suggestion-label { color: #2777df; font-size: 9px; font-weight: 800; }.suggestions .planning .suggestion-label { color: var(--green); }.suggestions .reviewing .suggestion-label { color: #b66a1d; }
.suggestions strong { margin-top: 18px; font-size: 15px; }.suggestions small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.suggestions .suggestion-arrow { position: absolute; right: 15px; bottom: 12px; color: #8b9299; font-size: 18px; }
.integration-banner { width: 100%; min-height: 64px; margin-top: 12px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 8px; background: #f7f9fa; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 11px; }
.integration-banner:hover { border-color: #bac1c7; background: #f3f6f7; }.integration-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 7px; background: #20242a; color: #fff; font-size: 18px; }.integration-banner > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }.integration-banner strong { font-size: 12px; }.integration-banner small { margin-top: 4px; color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.integration-cta { color: var(--accent); font-size: 11px; font-weight: 600; }
.message { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; margin: 0 0 28px; }
.message-avatar { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: #23262a; color: white; font-size: 11px; font-weight: 700; }
.message.user .message-avatar { background: #e4e8ec; color: #4d535a; }
.message-head { display: flex; align-items: center; height: 28px; gap: 8px; }
.message-head strong { font-size: 13px; }.message-time { color: var(--muted); font-size: 11px; }
.message-actions { margin-left: auto; display: flex; opacity: 0; }.message:hover .message-actions { opacity: 1; }
.message-actions button { border: 0; background: transparent; color: var(--muted); font-size: 12px; padding: 5px 7px; border-radius: 5px; }.message-actions button:hover { background: var(--surface-2); color: var(--text); }
.message-body { min-width: 0; font-size: 15px; line-height: 1.72; overflow-wrap: anywhere; }
.message-body p { margin: 7px 0; }.message-body p:first-child { margin-top: 3px; }
.code-block { margin: 12px 0; border-radius: 7px; overflow: hidden; background: #1c2025; border: 1px solid #2a3037; }.code-head { height: 36px; padding: 0 11px 0 14px; display: flex; align-items: center; justify-content: space-between; background: #262b31; color: #aeb6be; font: 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace; text-transform: lowercase; }.code-head button { border: 0; border-radius: 5px; padding: 5px 7px; background: transparent; color: #c8cfd5; font: inherit; font-size: 11px; }.code-head button:hover { background: #353b43; color: #fff; }.message-body pre,.reasoning-body pre { margin: 0; overflow-x: auto; background: #1c2025; color: #eff3f6; padding: 14px; font: 13px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; }
.message-body code:not(pre code) { background: var(--surface-2); padding: 2px 5px; border-radius: 4px; font-size: .9em; }
.message-body .md-heading { display: block; margin: 18px 0 7px; font-size: 16px; }.message-body .table-scroll { max-width: 100%; overflow-x: auto; margin: 12px 0; border: 1px solid var(--border); border-radius: 7px; }.message-body table { width: 100%; border-collapse: collapse; font-size: 13px; }.message-body th,.message-body td { padding: 9px 11px; border-bottom: 1px solid var(--border); text-align: left; white-space: normal; }.message-body th { background: var(--bg); color: #4d535a; font-weight: 650; }.message-body tr:last-child td { border-bottom: 0; }
.message-body hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
.reasoning-panel { margin: 5px 0 10px; border-left: 2px solid #cfd4d8; color: var(--muted); }.reasoning-panel summary { width: max-content; max-width: 100%; padding: 4px 9px; display: flex; align-items: center; gap: 7px; cursor: pointer; list-style: none; font-size: 12px; font-weight: 600; }.reasoning-panel summary::-webkit-details-marker { display: none; }.reasoning-panel summary i { font-style: normal; transition: transform .16s; }.reasoning-panel[open] summary i { transform: rotate(180deg); }.reasoning-panel[open] summary span::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--green); animation: pulse 1.1s infinite; }.reasoning-panel:not([open]) summary span::before { content: '✓'; margin-right: 6px; color: var(--green); }.reasoning-body { padding: 2px 10px 8px; font-size: 12px; line-height: 1.65; color: #6b7279; overflow-wrap: anywhere; }.reasoning-body p { margin: 5px 0; }.reasoning-body .code-block { opacity: .88; }
.message-body img { display: block; max-width: min(100%, 460px); max-height: 420px; object-fit: contain; border-radius: 7px; margin: 8px 0; border: 1px solid var(--border); }
.typing::after { content: '●  ●  ●'; color: var(--muted); font-size: 8px; word-spacing: 3px; animation: pulse 1.2s infinite; } @keyframes pulse { 50% { opacity: .35; } }
.composer-wrap { position: absolute; bottom: 0; left: 272px; right: 0; padding: 30px max(16px, calc((100% - 800px) / 2)) max(10px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, #fff 25%); }
.composer { min-height: 58px; border: 1px solid #cfd3d7; background: var(--surface); border-radius: 8px; display: flex; align-items: flex-end; padding: 9px; gap: 8px; box-shadow: 0 8px 26px rgba(23,28,35,.1); }
.composer:focus-within { border-color: #aeb5bd; box-shadow: 0 8px 28px rgba(23,28,35,.14); }
.composer textarea { border: 0; outline: 0; resize: none; flex: 1; min-height: 36px; max-height: 180px; line-height: 1.5; padding: 7px 2px; background: transparent; color: var(--text); }
.composer textarea::placeholder { color: #969ba1; }.composer .attach { flex: 0 0 36px; }
.send-button { width: 36px; height: 36px; flex: 0 0 36px; border: 0; border-radius: 7px; background: #202328; color: #fff; font-size: 20px; display: grid; place-items: center; }
.send-button:disabled { background: #c8ccd0; cursor: default; }.send-button.stop span { font-size: 0; }.send-button.stop span::after { content: '■'; font-size: 11px; }
.composer-note { text-align: center; color: var(--muted); font-size: 10px; margin: 7px 0 0; }
.attachment-preview { display: none; margin-bottom: 8px; }.attachment-preview.active { display: flex; }
.attachment-chip { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 7px; padding: 5px 8px; box-shadow: 0 3px 12px rgba(0,0,0,.06); }
.attachment-chip img { width: 38px; height: 38px; object-fit: cover; border-radius: 5px; }.attachment-chip button { border: 0; background: transparent; color: var(--muted); }
dialog { border: 0; padding: 0; }.account-dialog { width: min(520px, calc(100% - 24px)); max-height: min(800px, calc(100dvh - 30px)); overflow-y: auto; border-radius: 8px; box-shadow: var(--shadow); background: var(--surface); color: var(--text); }
dialog::backdrop { background: rgba(22,25,29,.38); backdrop-filter: blur(3px); }
.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 22px 24px 12px; }.dialog-header h2 { font-size: 21px; margin: 3px 0; }.eyebrow { font-size: 10px; color: var(--green); font-weight: 800; }
.auth-panel, #userAccount { padding: 10px 24px 26px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 7px; padding: 3px; margin-bottom: 18px; }.auth-tabs button { border: 0; background: transparent; padding: 8px; color: var(--muted); border-radius: 5px; }.auth-tabs button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.auth-panel label { display: block; margin: 12px 0; font-size: 12px; color: var(--muted); }.auth-panel input, .inline-form input { display: block; width: 100%; border: 1px solid var(--border); border-radius: 6px; padding: 11px 12px; margin-top: 6px; background: var(--surface); color: var(--text); }
.primary-button, .quiet-button { border-radius: 6px; padding: 9px 13px; font-weight: 600; }.primary-button { border: 0; background: #202328; color: white; }.auth-panel .primary-button { width: 100%; margin-top: 6px; }.quiet-button { border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.auth-separator { display:flex;align-items:center;gap:10px;margin:14px 0 10px;color:var(--muted);font-size:10px }.auth-separator::before,.auth-separator::after { content:'';height:1px;background:var(--border);flex:1 }.passkey-button { width:100%;border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:6px;padding:10px 13px;font-weight:600 }.passkey-button span { margin-right:6px;color:var(--accent) }
.form-error { color: var(--danger); font-size: 12px; min-height: 18px; }.form-status { color: var(--green); font-size: 12px; }
.account-summary { display: flex; justify-content: space-between; align-items: center; padding: 4px 0 17px; border-bottom: 1px solid var(--border); }.account-summary div { display: flex; flex-direction: column; min-width: 0; }.account-summary strong { overflow: hidden; text-overflow: ellipsis; }.account-summary small { color: var(--muted); margin-top: 4px; }
.account-summary .quiet-button { flex: 0 0 auto; white-space: nowrap; }
#userAccount section { padding: 17px 0; border-bottom: 1px solid var(--border); }#userAccount h3 { font-size: 13px; margin: 0 0 12px; }.section-heading { display: flex; align-items: center; justify-content: space-between; }.section-heading h3 { margin: 0 !important; }
.quota-item { margin: 10px 0; }.quota-meta { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; }.quota-meta span:last-child { color: var(--muted); }.quota-track { height: 7px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }.quota-fill { height: 100%; background: var(--green); border-radius: 4px; }.quota-fill.warning { background: var(--orange); }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }.inline-form input { margin: 0; }
.setting-description { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }.password-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.password-form input { min-width: 0; border: 1px solid var(--border); border-radius: 6px; padding: 10px 11px; background: var(--surface); color: var(--text); }.password-form input:first-child { grid-column: 1 / -1; }.password-form .quiet-button { justify-self: start; }
.key-list { margin-top: 10px; }.key-row { display: grid; grid-template-columns: 1fr auto; gap: 5px; padding: 10px 0; border-bottom: 1px solid var(--border); }.key-row:last-child { border: 0; }.key-row span { display: flex; flex-direction: column; font-size: 12px; }.key-row small { color: var(--muted); margin-top: 3px; }.key-row button { border: 0; background: transparent; color: var(--danger); }.key-reveal { background: #f0f7f3; border: 1px solid #b9ddc9; color: #1c6040; border-radius: 6px; padding: 10px; font: 12px/1.5 ui-monospace, monospace; overflow-wrap: anywhere; margin-top: 10px; cursor: pointer; }
.account-links { padding-top: 12px; }.account-links a { display: flex; justify-content: space-between; padding: 11px 0; font-size: 13px; border-bottom: 1px solid var(--border); }.account-links a:last-child { border: 0; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #22262b; color: white; padding: 9px 14px; border-radius: 6px; font-size: 12px; z-index: 100; transition: .2s; }.toast.show { opacity: 1; transform: translate(-50%, 0); }
.mobile-only { display: none; }.sidebar-scrim { display: none; }
@media (max-width: 760px) {
  .mobile-only { display: inline-grid; }.desktop-only { display: none; }
  .app-shell { grid-template-columns: 1fr; }.sidebar { position: fixed; inset: 0 auto 0 0; width: min(84vw, 310px); transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow); }.sidebar.open { transform: none; }
  .sidebar-scrim { display: block; position: fixed; inset: 0; background: rgba(20,23,27,.3); z-index: 15; opacity: 0; pointer-events: none; transition: opacity .2s; }.sidebar.open + .sidebar-scrim { opacity: 1; pointer-events: auto; }
  .composer-wrap { left: 0; padding-left: 12px; padding-right: 12px; }.topbar { gap: 6px; padding: 0 8px; }.model-control label { display: none; }.model-control select { width: 112px; max-width: 112px; padding-left: 2px; font-size: 11px; }.thinking-control { gap: 0; }.thinking-control > span { display: none; }.mode-control button { min-width: 43px; padding: 6px 4px; }.usage-button { padding: 0; }
  .messages { padding: 20px 15px 145px; }.welcome { min-height: 0; padding: 22px 0 28px; }.welcome h1 { font-size: 27px; line-height: 1.24; margin-top: 13px; }.welcome-copy { font-size: 13px; margin-bottom: 20px; }.suggestions { grid-template-columns: 1fr; gap: 8px; }.suggestions button { min-height: 82px; padding: 13px 15px; }.suggestions strong { margin-top: 9px; }.suggestions small { margin-top: 3px; }.suggestions .suggestion-arrow { bottom: 26px; }.integration-banner { grid-template-columns: 36px minmax(0,1fr); }.integration-cta { display: none; }
  .message { gap: 9px; }.message-actions { opacity: 1; }.message-actions button { font-size: 11px; padding: 5px; }.composer-note { font-size: 9px; }
  .password-form { grid-template-columns: 1fr; }.password-form input:first-child { grid-column: auto; }
}
