:root {
  color-scheme: light;
  --ink: #202b29;
  --muted: #717873;
  --faint: #939992;
  --line: #e4e7df;
  --paper: #fdfdf9;
  --sidebar: #f3f4ec;
  --teal: #174d47;
  --teal-hover: #22645b;
  --teal-soft: #e8f0e9;
  --danger: #9b3e32;
  --warning: #94682d;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { height: 100%; }
body { margin: 0; min-height: 100%; color: var(--ink); background: var(--paper); font-family: var(--sans); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:not(:disabled), a { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
button, input, textarea { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }
[hidden] { display: none !important; }
svg { display: block; width: 22px; height: 22px; flex-shrink: 0; }
::selection { color: var(--teal); background: #d6e8d9; }
.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; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; padding: 12px 18px; background: var(--teal); color: #fff; transform: translateY(-160%); border-radius: 8px; }
.skip-link:focus { transform: translateY(0); }
.brand { display: inline-flex; align-items: center; gap: 11px; width: fit-content; }
.brand-mark { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; color: var(--teal); }
.brand-mark svg { width: 34px; height: 34px; }
.brand-name { font-size: 20px; letter-spacing: -.8px; font-weight: 650; white-space: nowrap; }
.brand-name > span { font-weight: 400; color: #6b756d; }
.eyebrow { display: block; color: #6c7c70; font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: 1.65px; line-height: 1.6; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid transparent; border-radius: 9px; padding: 12px 17px; font-weight: 550; transition: background-color .16s, border-color .16s, color .16s; }
.button-primary { background: var(--teal); color: #fff; }
.button-primary:hover { background: var(--teal-hover); }
.button-secondary { background: #fff; border-color: var(--line); }
.button-secondary:hover { background: var(--sidebar); border-color: #ccd3c6; }
.status-dot { display: inline-block; width: 6px; height: 6px; background: #4d8664; border-radius: 50%; flex-shrink: 0; }
.status-dot.pending { background: #9caa95; }
.status-dot.offline { background: #b88c4f; }

/* Sign-in */
.login-layout { min-height: 100dvh; display: grid; grid-template-columns: minmax(380px, .9fr) minmax(460px, 1.1fr); }
.login-story { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 52px 34px; background: var(--sidebar); border-right: 1px solid var(--line); overflow: hidden; }
.story-copy { margin: 70px 0 25px; max-width: 460px; }
.story-copy .eyebrow { display: flex; align-items: center; gap: 9px; }
.tiny-diamond { width: 5px; height: 5px; background: #7d9279; transform: rotate(45deg); }
.story-copy h1 { font-family: var(--serif); font-size: clamp(48px, 4.8vw, 76px); font-weight: 400; letter-spacing: -2.5px; line-height: 1.08; margin: 23px 0 24px; }
.story-copy > p { color: #737c71; font-size: 15px; line-height: 1.8; max-width: 330px; }
.story-footer { display: flex; align-items: center; gap: 8px; color: #7a8276; font-size: 11px; }
.story-art { position: relative; width: 285px; height: 245px; margin: 24px auto 0; }
.art-grid { position: absolute; inset: 20px -40px 0; background-image: radial-gradient(#b8c2ad 1px, transparent 1px); background-size: 19px 19px; opacity: .45; mask-image: radial-gradient(ellipse, #000, transparent 70%); }
.art-orbit { position: absolute; border: 1px solid #d4dbcc; border-radius: 50%; }
.orbit-one { top: 28px; left: 22px; width: 224px; height: 185px; transform: rotate(-32deg); }
.orbit-two { top: 20px; left: 44px; width: 185px; height: 214px; transform: rotate(-32deg); }
.art-core { position: absolute; left: 92px; top: 79px; display: grid; place-items: center; width: 86px; height: 86px; background: #e4e9db; color: #71866b; border: 1px solid #d5decb; border-radius: 24px; transform: rotate(-9deg); box-shadow: 10px 14px 32px #74826e0a; }
.art-core svg { width: 54px; height: 54px; }
.art-dot { position: absolute; border-radius: 50%; border: 4px solid var(--sidebar); }
.dot-one { width: 18px; height: 18px; top: 37px; left: 174px; background: #a3b19a; }
.dot-two { width: 14px; height: 14px; bottom: 41px; left: 57px; background: #bdc8b4; }
.login-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px 55px 70px; position: relative; }
.login-card { width: 100%; max-width: 365px; }
.login-lock { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 13px; color: var(--teal); margin-bottom: 28px; background: #fff; }
.login-lock svg { width: 23px; height: 23px; }
.login-card h2 { font-family: var(--serif); font-weight: 400; font-size: 31px; letter-spacing: -.8px; line-height: 1.25; margin: 10px 0; }
.login-intro { color: var(--muted); line-height: 1.6; margin: 0 0 33px; font-size: 13px; }
.field-group { margin-bottom: 20px; }
.field-group label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.field-group input { width: 100%; background: #fff; border: 1px solid #d8ded4; border-radius: 8px; padding: 12px 13px; height: 46px; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.field-group input:focus { border-color: #63877b; box-shadow: 0 0 0 3px #174d470a; outline: none; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 48px; }
.password-toggle { display: grid; place-items: center; position: absolute; right: 4px; top: 4px; width: 38px; height: 38px; border: 0; background: transparent; border-radius: 5px; color: #8c968b; }
.password-toggle:hover { color: var(--teal); background: #f3f6f0; }
.password-toggle svg { width: 19px; height: 19px; }
.login-submit { width: 100%; margin-top: 5px; height: 46px; justify-content: space-between; padding-left: 17px; padding-right: 15px; font-size: 13px; }
.login-submit svg { width: 18px; height: 18px; }
.login-submit:disabled { opacity: .65; }
.login-note { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-start; color: #7d877d; }
.login-note svg { width: 16px; height: 16px; margin-top: 2px; }
.login-note p { margin: 0; font-size: 11px; line-height: 1.7; }
.login-footer { position: absolute; bottom: 30px; font-size: 10px; color: #939a91; }
.form-alert { padding: 13px 15px; background: #f8efea; border: 1px solid #ebdbd0; border-radius: 8px; font-size: 12px; line-height: 1.65; color: var(--danger); margin: -8px 0 24px; }

/* Workspace */
.chat-page { height: 100dvh; overflow: hidden; }
.app-shell { display: grid; grid-template-columns: 238px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100%; min-height: 0; }
.sidebar { display: flex; flex-direction: column; padding: 29px 21px 22px; background: var(--sidebar); border-right: 1px solid var(--line); }
.sidebar .brand { gap: 8px; margin-left: 5px; }
.sidebar .brand-mark, .sidebar .brand-mark svg { width: 29px; height: 29px; }
.sidebar .brand-name { font-size: 19px; }
.button-new { margin-top: 38px; width: 100%; justify-content: flex-start; padding: 12px 13px; font-size: 12px; color: var(--teal); background: #fdfdf8; border-color: #d9dfd2; border-radius: 8px; }
.button-new:hover { background: #e8eee2; border-color: #c2d0bc; }
.button-new svg { width: 17px; height: 17px; }
.sidebar-note { padding: 33px 10px 0; }
.sidebar-note .eyebrow { font-size: 8px; letter-spacing: 1.35px; color: #87917e; }
.sidebar-note p { color: #8b9384; font-size: 11px; line-height: 1.9; margin: 11px 0 23px; }
.faint-line { display: block; width: 27px; height: 1px; background: #d7ddce; }
.sidebar-bottom { margin-top: auto; }
.nav-link { display: flex; align-items: center; width: 100%; padding: 12px 10px; border: 0; border-radius: 7px; background: transparent; color: #6d786a; text-align: left; font-size: 11px; gap: 10px; }
.nav-link:hover { background: #e9eddf; color: var(--teal); }
.nav-link svg { width: 16px; height: 16px; }
.nav-link .external-arrow { margin-left: auto; color: #9da594; font-size: 14px; }
.workspace-label { border-top: 1px solid #dfe4d6; padding: 20px 6px 0; margin-top: 14px; display: flex; align-items: center; gap: 11px; }
.owner-avatar { width: 31px; height: 31px; border-radius: 50%; background: #e2e8d8; color: #6e8065; display: grid; place-items: center; font-family: var(--serif); font-size: 15px; }
.workspace-label strong { display: block; font-size: 10px; font-weight: 550; color: #55634f; }
.workspace-label div > span { display: block; font-size: 9px; margin-top: 4px; color: #929b86; }
.chat-main { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, auto) minmax(0, 1fr) auto; position: relative; height: 100%; overflow: hidden; }
.chat-main > .chat-header { grid-row: 1; grid-column: 1; }
.chat-main > .files-panel { grid-row: 2; grid-column: 1; }
.chat-main > .chat-scroll { grid-row: 3; grid-column: 1; }
.chat-main > .composer-region { grid-row: 4; grid-column: 1; }
.chat-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 86px; padding: 0 38px; border-bottom: 1px solid #edf0e8; }
.header-title { display: flex; align-items: center; gap: 17px; }
.header-title h1 { margin: 0; font-size: 13px; font-weight: 550; }
.temporary-badge { display: inline-flex; align-items: center; gap: 5px; color: #84907b; font-size: 9px; font-weight: 500; border: 1px solid #e0e7d9; background: #f6f8f1; padding: 4px 8px; border-radius: 4px; white-space: nowrap; }
.temporary-badge > span { font-size: 12px; line-height: 1; }
.connection-status { display: inline-flex; align-items: center; gap: 7px; background: transparent; border: 0; border-radius: 5px; color: #7a8475; padding: 7px 0 7px 7px; font-size: 10px; white-space: nowrap; }
.connection-status:hover { color: var(--teal); }
.connection-status .status-dot { width: 5px; height: 5px; }
.mobile-brand { display: none; }
.chat-scroll { position: relative; min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #d5ddce transparent; scroll-behavior: smooth; }
.empty-state { max-width: 920px; margin: 0 auto; padding: clamp(50px, 10vh, 115px) 38px 35px; text-align: center; }
.welcome-symbol { width: 53px; height: 53px; display: grid; place-items: center; margin: 0 auto 24px; background: #eff3e8; border: 1px solid #e3e9d9; border-radius: 17px; color: #72886b; transform: rotate(-5deg); }
.welcome-symbol svg { width: 33px; height: 33px; }
.empty-state > .eyebrow { color: #8b977f; font-size: 9px; letter-spacing: 1.5px; }
.empty-state h2 { font-family: var(--serif); font-size: clamp(32px, 3.2vw, 45px); line-height: 1.15; font-weight: 400; letter-spacing: -1.1px; margin: 16px 0; }
.empty-state > p { color: #8d9587; line-height: 1.85; font-size: 12px; margin: 0; }
.suggestions { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 11px; margin: 43px auto 0; text-align: left; }
.suggestion { position: relative; text-align: left; border: 1px solid #e5e9df; background: #fff; border-radius: 11px; padding: 17px 15px 18px; min-height: 131px; transition: background .15s, border-color .15s, transform .15s; }
.suggestion:hover { background: #f6f8f1; border-color: #cfd9c6; transform: translateY(-2px); }
.suggestion-icon { display: inline-flex; color: #89947d; margin-bottom: 17px; }
.suggestion-icon svg { width: 18px; height: 18px; }
.suggestion strong { display: block; font-size: 11px; font-weight: 550; color: #45533f; margin-bottom: 7px; }
.suggestion > span:not(.suggestion-icon):not(.suggestion-arrow) { display: block; color: #98a08f; font-size: 9px; line-height: 1.5; }
.suggestion .suggestion-arrow { position: absolute; right: 15px; top: 16px; color: #aab39f; font-size: 15px; }
.messages { max-width: 820px; margin: 0 auto; padding: 25px 34px 15px; }
.messages:empty { padding: 0; }
.message { display: flex; gap: 14px; margin: 0 0 29px; }
.message-avatar { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; background: #eef3e8; color: #627b58; border-radius: 8px; font-size: 11px; font-family: var(--serif); }
.message-user .message-avatar { background: #e9eeeb; color: #6d7b73; border-radius: 50%; font-family: var(--sans); font-size: 9px; }
.message-body { flex: 1; min-width: 0; padding-top: 2px; }
.message-header { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.message-header strong { font-size: 11px; font-weight: 600; color: #53614e; }
.message-header .message-state { font-size: 9px; color: #9ba493; }
.message-content { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.9; font-size: 13px; color: #4d5749; }
.message-user .message-content { color: #3f493c; }
.message-actions { display: flex; gap: 6px; margin-top: 9px; }
.copy-button { display: inline-flex; align-items: center; gap: 5px; padding: 4px 6px; margin-left: -6px; font-size: 9px; border: 0; border-radius: 4px; background: transparent; color: #9aa38f; }
.copy-button:hover { color: var(--teal); background: #eef2e7; }
.copy-button svg { width: 12px; height: 12px; }
.typing-dots { display: inline-flex; gap: 4px; padding-top: 8px; height: 23px; }
.typing-dots span { width: 4px; height: 4px; border-radius: 50%; background: #8b9c7e; animation: thinking 1.2s ease-in-out infinite; }
.typing-dots span:nth-child(2) { animation-delay: .16s; }
.typing-dots span:nth-child(3) { animation-delay: .32s; }
@keyframes thinking { 0%,60%,100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.composer-region { position: relative; min-height: 0; width: 100%; max-width: 878px; max-height: min(390px, 48dvh); margin: 0 auto; padding: 10px 36px 21px; overflow-y: auto; scrollbar-width: thin; }
.composer { background: #fff; border: 1px solid #dce3d4; border-radius: 13px; padding: 15px 16px 11px; box-shadow: 0 3px 16px #52624804; transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: #aebfa4; box-shadow: 0 0 0 3px #607d5006; }
.composer textarea { display: block; width: 100%; min-height: 42px; max-height: 200px; field-sizing: content; resize: none; padding: 0 1px; border: 0; outline: none; background: transparent; font-size: 13px; line-height: 1.7; color: #3d4b37; scrollbar-width: thin; scrollbar-color: #d5ddce transparent; }
.composer textarea::placeholder { color: #a1aa97; }
.composer textarea:disabled { opacity: .7; }
.composer-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 9px; min-height: 31px; }
.composer-hint { color: #a6ae9c; font-size: 9px; margin-bottom: 7px; }
.desktop-hint > span { margin: 0 5px; }
.send-button, .stop-button { display: grid; place-items: center; border: 0; border-radius: 8px; background: var(--teal); color: #fff; width: 31px; height: 31px; flex-shrink: 0; transition: background .15s; }
.send-button svg { width: 18px; height: 18px; }
.send-button:hover:not(:disabled), .stop-button:hover { background: var(--teal-hover); }
.send-button:disabled { background: #e8ede1; color: #b0bca5; }
.stop-button > span { width: 10px; height: 10px; border-radius: 2px; background: currentColor; }
.mobile-hint { display: none; }
.privacy-caption, .accuracy-caption { text-align: center; color: #939d88; font-size: 9px; margin: 11px 0 0; line-height: 1.6; }
.accuracy-caption { font-size: 8px; color: #adb4a4; margin-top: 3px; }
.notice { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; border: 1px solid #e8ddca; background: #fbf7ed; color: #8c724d; padding: 9px 12px; border-radius: 7px; font-size: 11px; line-height: 1.6; margin-bottom: 11px; }
.notice > button { background: transparent; color: #ab946e; border: 0; border-radius: 4px; padding: 0 2px; font-size: 17px; line-height: 1; flex-shrink: 0; }
.jump-button { position: absolute; top: -34px; left: calc(50% - 15px); display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #dce3d4; border-radius: 50%; background: #fff; color: #687b5c; box-shadow: 0 2px 8px #20331a09; }
.jump-button svg { width: 16px; height: 16px; }
.chat-main > .jump-button { grid-row: 3; grid-column: 1; position: relative; left: auto; top: auto; align-self: end; justify-self: center; margin-bottom: 10px; z-index: 2; }
.confirm-dialog { color: var(--ink); width: min(420px, calc(100vw - 40px)); padding: 29px; border: 1px solid #dbe3d2; border-radius: 16px; background: var(--paper); box-shadow: 0 20px 80px #20331a20; }
.confirm-dialog::backdrop { background: #15251045; backdrop-filter: blur(3px); }
.confirm-dialog h2 { font-family: var(--serif); font-size: 25px; font-weight: 400; letter-spacing: -.5px; margin: 11px 0 14px; }
.confirm-dialog p { color: var(--muted); line-height: 1.8; font-size: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; }
.dialog-actions .button { font-size: 11px; padding: 11px 13px; }
.noscript-alert { position: fixed; bottom: 0; left: 0; right: 0; background: #f8efea; padding: 15px; color: var(--danger); text-align: center; }

/* Privacy page */
.security-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); max-width: 1200px; margin: 0 auto; padding: 29px 40px; }
.security-header .button { font-size: 11px; padding: 10px 13px; }
.security-main { max-width: 1030px; margin: 0 auto; padding: 70px 40px 24px; }
.security-main > h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4.5vw, 54px); line-height: 1.13; letter-spacing: -1.5px; margin: 20px 0; }
.security-lead { font-size: 14px; line-height: 1.85; color: var(--muted); max-width: 590px; margin: 0 0 43px; }
.security-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.security-card { background: #fff; border: 1px solid var(--line); padding: 27px; border-radius: 12px; }
.card-number { display: inline-flex; color: #8a9b7d; font-size: 10px; letter-spacing: 1px; margin-bottom: 20px; }
.security-card h2 { font-size: 16px; letter-spacing: -.2px; font-weight: 550; margin: 0 0 14px; }
.security-card p { color: var(--muted); font-size: 12px; line-height: 1.85; margin: 0; }
.security-card .card-detail { margin-top: 17px; padding-top: 15px; border-top: 1px solid #eef0e9; color: #8e9983; font-size: 10px; line-height: 1.8; }
.security-boundary { display: grid; grid-template-columns: .8fr 1.2fr; gap: 45px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 35px 0; margin-top: 42px; }
.security-boundary h2 { font-family: var(--serif); font-weight: 400; font-size: 27px; line-height: 1.25; letter-spacing: -.5px; margin: 11px 0 0; }
.security-boundary p { font-size: 11px; line-height: 1.9; color: var(--muted); margin: 0 0 13px; }
.security-boundary p:last-child { margin-bottom: 0; }
.security-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 24px 0 0; color: #97a08c; font-size: 10px; }

@media (min-width: 1500px) {
  .login-story { padding-left: 72px; padding-right: 72px; }
  .app-shell { grid-template-columns: 264px 1fr; }
  .sidebar { padding: 33px 25px 24px; }
  .empty-state { max-width: 980px; }
}
@media (max-width: 1050px) {
  .login-layout { grid-template-columns: minmax(330px,.8fr) minmax(390px,1fr); }
  .login-story { padding: 34px 34px 30px; }
  .login-main { padding-left: 36px; padding-right: 36px; }
  .story-copy h1 { font-size: 54px; }
  .story-art { transform: scale(.9); margin-left: -10px; }
  .app-shell { grid-template-columns: 209px 1fr; }
  .sidebar { padding: 28px 16px 20px; }
  .sidebar .brand-name { font-size: 17px; }
  .sidebar .brand-mark, .sidebar .brand-mark svg { width: 26px; height: 26px; }
  .button-new { padding: 12px 10px; font-size: 11px; gap: 7px; }
  .sidebar-note { padding-left: 8px; padding-right: 8px; }
  .sidebar-note .eyebrow { font-size: 7px; }
  .chat-header { padding: 0 27px; min-height: 77px; }
  .empty-state { padding: 65px 27px 30px; }
  .suggestions { gap: 8px; }
  .suggestion { padding-left: 12px; padding-right: 12px; }
  .suggestion strong { font-size: 10px; }
  .suggestion > span:not(.suggestion-icon):not(.suggestion-arrow) { font-size: 8px; }
  .composer-region { padding-left: 27px; padding-right: 27px; }
}
@media (max-width: 760px) {
  .login-layout { display: block; }
  .login-story { padding: 24px 26px; background: var(--paper); border-right: 0; border-bottom: 1px solid var(--line); }
  .login-story .brand-mark, .login-story .brand-mark svg { width: 27px; height: 27px; }
  .login-story .brand-name { font-size: 19px; }
  .story-copy, .story-footer { display: none; }
  .login-main { min-height: calc(100dvh - 76px); padding: 40px 28px 88px; }
  .login-card { max-width: 380px; }
  .login-card h2 { font-size: 30px; }
  .login-footer { font-size: 9px; bottom: 25px; }
  .app-shell { display: flex; flex-direction: column; }
  .sidebar { flex-direction: row; align-items: center; justify-content: space-between; padding: 13px 19px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { margin-left: 0; }
  .sidebar .brand-name { font-size: 17px; }
  .sidebar .brand-mark, .sidebar .brand-mark svg { width: 25px; height: 25px; }
  .button-new { margin-top: 0; padding: 7px; width: auto; border-color: #d7decc; }
  .button-new > span { display: none; }
  .button-new::after { content: "New"; }
  .sidebar-note, .workspace-label { display: none; }
  .sidebar-bottom { display: flex; margin-top: 0; margin-left: auto; margin-right: 10px; order: 0; }
  .sidebar > .button-new { order: 1; }
  .nav-link { padding: 8px; }
  .nav-link > span { display: none; }
  .nav-link svg { width: 18px; height: 18px; }
  .chat-main { min-height: 0; flex: 1; }
  .chat-header { min-height: 52px; padding: 0 21px; }
  .header-title h1 { display: none; }
  .temporary-badge { font-size: 9px; border: 0; background: transparent; padding: 0; }
  .connection-status { font-size: 9px; }
  .empty-state { padding: 44px 23px 27px; max-width: 610px; }
  .welcome-symbol { width: 44px; height: 44px; border-radius: 14px; margin-bottom: 23px; }
  .welcome-symbol svg { width: 28px; height: 28px; }
  .empty-state > .eyebrow { font-size: 8px; }
  .empty-state h2 { font-size: 33px; }
  .empty-state > p { font-size: 11px; }
  .suggestions { gap: 9px; margin-top: 32px; }
  .suggestion { min-height: 126px; padding: 14px 12px; }
  .suggestion-icon { margin-bottom: 17px; }
  .suggestion strong { font-size: 10px; line-height: 1.55; max-width: 80px; }
  .suggestion > span:not(.suggestion-icon):not(.suggestion-arrow) { font-size: 8px; line-height: 1.6; }
  .suggestion .suggestion-arrow { right: 11px; top: 12px; }
  .composer-region { padding: 8px 17px 13px; }
  .composer { padding: 13px 13px 10px; border-radius: 12px; }
  .composer textarea { font-size: 16px; line-height: 1.6; min-height: 39px; max-height: 148px; }
  .composer-toolbar { margin-top: 6px; }
  .composer-hint { font-size: 8px; }
  .desktop-hint { display: none; }
  .mobile-hint { display: inline; }
  .privacy-caption { font-size: 8px; max-width: 300px; margin: 9px auto 0; }
  .accuracy-caption { font-size: 7px; }
  .messages { padding: 25px 21px 10px; }
  .message { gap: 11px; margin-bottom: 27px; }
  .message-content { font-size: 13px; line-height: 1.9; }
  .message-avatar { width: 24px; height: 24px; flex-basis: 24px; }
  .security-header { padding: 21px 23px; }
  .security-header .brand-name { font-size: 17px; }
  .security-header .brand-mark, .security-header .brand-mark svg { width: 25px; height: 25px; }
  .security-header .button { font-size: 10px; padding: 8px 10px; }
  .security-main { padding: 44px 24px 22px; }
  .security-main > h1 { font-size: 38px; }
  .security-lead { font-size: 12px; margin-bottom: 32px; }
  .security-grid { grid-template-columns: 1fr; gap: 12px; }
  .security-card { padding: 24px; }
  .card-number { margin-bottom: 15px; }
  .security-boundary { grid-template-columns: 1fr; gap: 20px; margin-top: 30px; padding: 27px 0; }
  .security-boundary h2 { max-width: 300px; }
  .security-footer { font-size: 8px; }
}
@media (max-width: 380px) {
  .sidebar { padding-left: 14px; padding-right: 14px; }
  .sidebar .brand-name { font-size: 16px; }
  .sidebar .brand { gap: 6px; }
  .nav-link { padding: 7px; }
  .empty-state { padding-left: 17px; padding-right: 17px; }
  .empty-state h2 { font-size: 30px; }
  .suggestions { gap: 6px; }
  .suggestion { padding-left: 9px; padding-right: 9px; }
  .suggestion .suggestion-arrow { display: none; }
  .security-header .button { font-size: 9px; }
}
@media (max-height: 750px) and (min-width: 761px) {
  .empty-state { padding-top: 38px; padding-bottom: 23px; }
  .welcome-symbol { margin-bottom: 16px; width: 44px; height: 44px; border-radius: 14px; }
  .welcome-symbol svg { width: 28px; height: 28px; }
  .empty-state h2 { margin: 12px 0; font-size: 36px; }
  .suggestions { margin-top: 28px; }
  .story-copy { margin-top: 40px; }
  .story-art { height: 180px; margin-top: 0; transform: scale(.8); transform-origin: top center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Saved conversations stay on the home server; this panel is fetched per session. */
.history-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; margin-top: 27px; padding: 0 1px; overflow: hidden; }
.history-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 10px; }
.history-heading .eyebrow { font-size: 9px; letter-spacing: 1.25px; color: #75816c; }
.icon-button { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 6px; color: #77876b; background: transparent; flex-shrink: 0; }
.icon-button svg { width: 15px; height: 15px; }
.icon-button:hover:not(:disabled) { background: #e7eddf; color: var(--teal); }
.icon-button:disabled { opacity: .35; }
.history-heading .icon-button { width: 25px; height: 25px; }
.history-heading .icon-button svg { width: 13px; height: 13px; }
.conversation-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #d0d9c5 transparent; }
.conversation-item { display: block; width: 100%; text-align: left; border: 1px solid transparent; border-radius: 7px; background: transparent; padding: 11px 9px 10px; margin-bottom: 4px; color: #617155; }
.conversation-item:hover:not(:disabled) { background: #e9eedf; }
.conversation-item.active { border-color: #dce5d1; background: #e7eddd; color: #3e5830; }
.conversation-item:disabled { cursor: default; }
.conversation-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 500; line-height: 1.6; }
.conversation-item time { display: block; color: #87947b; font-size: 9px; margin-top: 4px; }
.history-empty { color: #7d8a70; font-size: 11px; line-height: 1.8; padding: 5px 9px; margin: 0; }
.history-note { display: flex; align-items: center; gap: 6px; font-size: 9px; color: #88967c; padding: 20px 9px 16px; margin-top: auto; }
.history-note svg { width: 11px; height: 11px; }
.history-toggle { display: none; }
.header-title { flex: 1; min-width: 0; gap: 11px; }
.header-title h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }
.header-actions { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.header-divider { width: 1px; height: 16px; background: #e3e9da; margin: 0 9px; }
.save-status { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #dfe7d5; background: #f6f8f0; color: #7d8b6f; border-radius: 4px; padding: 4px 7px; font-size: 9px; white-space: nowrap; }
.save-status .status-dot { width: 4px; height: 4px; }
.save-status[data-state="error"] { background: #fbf3e8; border-color: #eaddc5; color: #9b7341; }
.save-status[data-state="error"] .status-dot { background: #b58a50; }
.save-status[data-state="saving"] .status-dot { background: #a2ae96; }
.notice-action { display: inline; padding: 0; margin-left: 7px; border: 0; background: transparent; color: #6c703c; font-size: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.button-danger { background: #9b483d; color: #fff; }
.button-danger:hover { background: #853a31; }
.chat-main[data-loading="true"] .messages { opacity: .55; }
@media (max-width: 1050px) {
  .header-title { flex-direction: column; align-items: flex-start; gap: 5px; }
  .header-title h1 { max-width: 300px; font-size: 12px; }
  .save-status { padding: 0; border: 0; background: transparent; font-size: 8px; }
  .save-status[data-state="error"] { background: transparent; }
  .history-note { font-size: 8px; gap: 5px; padding-left: 8px; }
  .header-divider { margin-left: 6px; margin-right: 6px; }
}
@media (max-width: 760px) {
  .sidebar { position: relative; z-index: 5; }
  .history-toggle { display: grid; place-items: center; width: 31px; height: 31px; padding: 6px; color: #6c805f; border: 1px solid #d7decc; background: #fdfdf8; border-radius: 7px; margin-left: 10px; order: 0; }
  .history-toggle svg { width: 16px; height: 16px; }
  .history-panel { position: absolute; left: 12px; right: 12px; top: calc(100% + 5px); margin: 0; min-height: 180px; max-height: min(440px, 65dvh); border: 1px solid #d9e2cf; border-radius: 12px; background: #f4f6ed; padding: 14px 9px 0; box-shadow: 0 12px 30px #243b1c17; display: none; }
  .history-panel.is-open { display: flex; }
  .history-heading { padding-bottom: 7px; }
  .history-heading .eyebrow { font-size: 10px; }
  .conversation-item { padding: 12px 10px; }
  .conversation-item strong { font-size: 12px; }
  .conversation-item time { font-size: 10px; }
  .history-note { font-size: 10px; padding-top: 12px; padding-bottom: 14px; }
  .sidebar-bottom { margin-left: auto; margin-right: 8px; }
  .chat-header { min-height: 64px; padding: 0 20px; }
  .header-title { gap: 5px; }
  .header-title h1 { display: block; max-width: 100%; font-size: 11px; }
  .header-actions { gap: 2px; }
  .header-actions .connection-status { width: 20px; overflow: hidden; padding: 7px; }
  #connection-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .header-divider { margin: 0 3px; }
  .header-actions .icon-button { width: 27px; height: 27px; }
  .save-status { font-size: 8px; }
  .privacy-caption { max-width: 350px; }
  .history-empty { font-size: 12px; }
}

/* Documents and optional research */
.files-panel { min-width: 0; min-height: 0; max-height: min(260px, 32dvh); margin: 12px 38px 0; border: 1px solid #dde5d5; border-radius: 10px; background: #f8faf4; overflow: auto; scrollbar-width: thin; }
.files-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; cursor: pointer; list-style: none; }
.files-panel > summary::-webkit-details-marker { display: none; }
.files-summary-title { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 550; color: #53654a; }
.files-summary-title > svg { width: 15px; height: 15px; }
.file-count { padding: 2px 6px; background: #e7eedf; border-radius: 4px; font-size: 11px; font-weight: 500; }
.files-summary-hint { font-size: 12px; color: #718360; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 8px; padding: 0 12px 8px; max-height: min(160px, 20dvh); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #d2dec4 transparent; }
.file-card { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; padding: 11px; border: 1px solid #e0e7d8; background: #fff; border-radius: 8px; }
.file-card.selected { border-color: #abbf9a; background: #fbfdf8; }
.file-card.generated { border-left: 3px solid #8eab7a; }
.file-select { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; cursor: pointer; }
.file-select > input { width: 16px; height: 16px; accent-color: var(--teal); margin: 0; flex-shrink: 0; }
.file-type { display: grid; place-items: center; width: 36px; height: 38px; border: 1px solid #dce5d3; background: #f2f6ec; border-radius: 5px; color: #677e53; font-size: 9px; font-weight: 650; flex-shrink: 0; }
.file-description { min-width: 0; }
.file-description strong { display: block; overflow-wrap: anywhere; white-space: normal; font-size: 13px; font-weight: 550; line-height: 1.45; color: #4c6041; }
.file-description small { display: block; margin-top: 4px; color: #768667; font-size: 12px; }
.file-card-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; margin-left: auto; }
.file-download { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; border: 1px solid #d8e2cd; border-radius: 5px; padding: 5px 9px; color: #50733d; background: #f4f8ee; font-size: 12px; font-weight: 550; }
.file-download:hover:not(:disabled) { background: #e7f0dd; border-color: #b8cba8; }
.file-download:disabled { opacity: .6; }
.file-remove { width: 32px; height: 32px; border: 0; background: transparent; color: #7f916d; font-size: 20px; border-radius: 4px; }
.file-remove:hover:not(:disabled) { background: #f4eae5; color: #a26753; }
.file-panel-note { margin: 0; padding: 1px 14px 11px; font-size: 11px; line-height: 1.6; color: #7c8b6d; }
.composer-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-width: 0; }
.composer-send { display: flex; align-items: center; align-self: flex-end; }
.attach-button { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; border: 1px solid #e1e8d8; border-radius: 6px; background: transparent; color: #687e57; padding: 0 9px; font-size: 12px; }
.attach-button svg { width: 14px; height: 14px; }
.attach-button:hover:not(:disabled) { border-color: #c2d2b4; background: #f4f8ee; color: var(--teal); }
.attach-button:disabled { opacity: .45; }
.tool-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 9px; border: 1px solid #e1e8d8; border-radius: 6px; color: #6c805c; font-size: 12px; cursor: pointer; }
.tool-toggle > input { width: 14px; height: 14px; margin: 0; accent-color: var(--teal); }
.tool-toggle:has(input:checked) { color: #3e6431; background: #edf5e5; border-color: #bfd1ad; }
.tool-toggle:has(input:disabled) { opacity: .5; cursor: default; }
.tool-disclosure { margin: 8px 1px 0; color: #7a896a; font-size: 11px; line-height: 1.6; }
.upload-progress { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; padding: 10px 12px; border: 1px solid #dce7d1; border-radius: 7px; background: #f4f9ed; color: #647e50; font-size: 12px; }
.upload-progress > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-progress button { border: 0; background: transparent; color: #72875f; padding: 2px; margin-left: auto; font-size: 12px; font-weight: 550; }
.upload-spinner { width: 11px; height: 11px; border: 1.5px solid #cfddc2; border-top-color: #6a8b53; border-radius: 50%; animation: spin .9s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.tool-progress { margin: 0 0 11px; border: 1px solid #e1e8d8; border-radius: 7px; background: #f7faf1; }
.tool-progress > summary { display: flex; align-items: center; gap: 8px; padding: 9px 12px; color: #6d815a; font-size: 12px; line-height: 1.5; list-style: none; cursor: pointer; }
.tool-progress > summary::-webkit-details-marker { display: none; }
.tool-progress > summary::before { content: ""; width: 10px; height: 10px; border: 1.5px solid #a4b893; border-radius: 50%; flex-shrink: 0; }
.tool-progress[data-state="running"] > summary::before { border-top-color: #42692d; animation: spin .9s linear infinite; }
.tool-progress[data-state="complete"] > summary::before { background: #a4b893; }
.tool-progress[data-state="error"] > summary::before { border-color: #b8935d; background: #b8935d; }
.tool-progress > summary::after { content: "+"; color: #8b9b7a; font-size: 16px; margin-left: auto; }
.tool-progress[open] > summary::after { content: "−"; }
.tool-steps { max-height: 150px; overflow-y: auto; overscroll-behavior: contain; padding: 0 12px 10px; scrollbar-width: thin; }
.tool-progress:empty { display: none; }
.tool-step { display: flex; align-items: center; gap: 7px; font-size: 12px; line-height: 1.7; color: #748661; }
.tool-step + .tool-step { margin-top: 5px; }
.tool-step-marker { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid #cbd9bc; flex-shrink: 0; }
.tool-step[data-state="running"] .tool-step-marker { border-top-color: #68884d; animation: spin .9s linear infinite; }
.tool-step[data-state="complete"] .tool-step-marker { background: #95b181; border-color: #95b181; }
.tool-step[data-state="error"] { color: #9b7950; }
.tool-step[data-state="error"] .tool-step-marker { background: #c3a278; border-color: #c3a278; }
.message-files { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 7px; }
.message-files:empty, .message-sources:empty { display: none; }
.artifact-link { display: inline-flex; align-items: center; gap: 9px; border: 1px solid #c9dabb; border-radius: 8px; background: #f4f9ef; padding: 10px 13px; color: #506d3c; text-align: left; min-width: 180px; max-width: 100%; }
.artifact-link:hover:not(:disabled) { background: #eaf3e1; border-color: #acc695; }
.artifact-link > span { min-width: 0; }
.artifact-link strong { display: block; font-size: 13px; line-height: 1.45; font-weight: 550; white-space: normal; overflow-wrap: anywhere; }
.artifact-link small { display: block; margin-top: 4px; color: #7c916a; font-size: 12px; }
.artifact-link .download-arrow { font-size: 20px; margin-left: auto; padding-left: 9px; color: #6e9253; }
.message-sources { margin-top: 14px; padding-top: 10px; border-top: 1px solid #e8eee0; }
.message-sources > strong { display: block; color: #8b9a7a; font-size: 9px; font-weight: 550; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 7px; }
.source-link { display: block; margin-bottom: 8px; color: #6f895a; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.source-title { display: block; text-decoration: underline; text-underline-offset: 3px; unicode-bidi: plaintext; }
.source-destination { display: block; color: #748269; font-size: 12px; direction: ltr; unicode-bidi: isolate; }
.source-link:hover { color: var(--teal); }
.message-content.rich { white-space: normal; }
.message-content.rich p { margin: 0 0 12px; }
.message-content.rich p:last-child { margin-bottom: 0; }
.message-content.rich h3, .message-content.rich h4 { font-size: 14px; line-height: 1.6; color: #3d5334; font-weight: 600; margin: 19px 0 9px; }
.message-content.rich h3:first-child, .message-content.rich h4:first-child { margin-top: 0; }
.message-content.rich ul, .message-content.rich ol { margin: 8px 0 13px; padding-left: 21px; }
.message-content.rich li { padding-left: 2px; margin-bottom: 5px; }
.message-content.rich code { font: .9em ui-monospace, SFMono-Regular, Consolas, monospace; background: #eef3e7; border-radius: 4px; padding: 2px 4px; color: #5b714a; }
.message-content.rich pre { margin: 13px 0; overflow-x: auto; max-width: 100%; background: #f0f4ea; border: 1px solid #e1e8d8; border-radius: 8px; padding: 15px; line-height: 1.7; white-space: pre; }
.message-content.rich pre > code { background: transparent; padding: 0; border-radius: 0; font-size: 11px; }
.response-table-wrap { overflow-x: auto; margin: 12px 0; border: 1px solid #e1e8d8; border-radius: 7px; }
.message-content.rich table { border-collapse: collapse; width: 100%; font-size: 11px; }
.message-content.rich th, .message-content.rich td { text-align: left; vertical-align: top; padding: 8px 11px; border-bottom: 1px solid #e6ecdf; min-width: 90px; }
.message-content.rich th { background: #f0f5e9; color: #5d764a; font-weight: 550; }
.message-content.rich tr:last-child td { border-bottom: 0; }
.search-privacy-card { display: grid; grid-template-columns: .8fr 1.2fr; gap: 45px; padding: 27px; margin-top: 16px; border: 1px solid #dfe8d4; border-radius: 12px; background: #f3f8ed; }
.search-privacy-card h2 { font-size: 18px; font-weight: 550; letter-spacing: -.3px; margin: 10px 0 0; }
.search-privacy-card p { color: #75866a; font-size: 11px; line-height: 1.85; margin: 0; }
@media (max-width: 1050px) {
  .files-panel { margin-left: 27px; margin-right: 27px; }
  .file-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
  .files-summary-hint { font-size: 12px; }
}
@media (max-width: 760px) {
  .files-panel { margin: 8px 17px 0; }
  .files-panel > summary { padding: 10px 11px; }
  .files-summary-title { font-size: 12px; gap: 5px; }
  .files-summary-title > svg { width: 13px; height: 13px; }
  .files-summary-hint { font-size: 12px; max-width: 120px; text-align: right; }
  .file-grid { grid-template-columns: 1fr; max-height: min(126px, 18dvh); }
  .file-description strong { font-size: 13px; }
  .file-description small { font-size: 12px; }
  .file-panel-note { display: none; }
  .composer-tools { gap: 5px; }
  .attach-button, .tool-toggle { padding-left: 7px; padding-right: 7px; font-size: 12px; min-height: 34px; }
  .attach-button svg { width: 13px; height: 13px; }
  .tool-toggle > input { width: 14px; height: 14px; }
  .tool-disclosure { font-size: 11px; }
  .message-content.rich h3, .message-content.rich h4 { font-size: 14px; }
  .message-content.rich pre { padding: 12px; }
  .search-privacy-card { grid-template-columns: 1fr; gap: 17px; padding: 24px; }
}
@media (max-width: 480px) {
  .attach-button > span { display: none; }
  .attach-button { width: 34px; justify-content: center; }
  .composer-tools { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .upload-spinner, .tool-step-marker { animation: none !important; }
}

/* Plain local sign-in. */
.login-page { background: #fff; color: #252525; }
.login-page .login-layout { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; min-height: 100dvh; padding: 24px; }
.login-page .login-main { display: block; width: 100%; max-width: 360px; min-height: 0; padding: 0; }
.login-page .login-card { max-width: none; }
.login-page .brand-name { font-size: 18px; font-weight: 600; letter-spacing: 0; }
.login-page h1 { font: 600 24px/1.3 var(--sans); letter-spacing: 0; margin: 28px 0 24px; }
.login-page .field-group { margin-bottom: 20px; }
.login-page .field-group label { font-size: 14px; font-weight: 500; }
.login-page .field-group input { height: 44px; padding: 10px 12px; border-color: #c8c8c8; border-radius: 4px; color: #252525; background: #fff; }
.login-page .password-wrap input { padding-right: 48px; }
.login-page .field-group input:focus { border-color: #555; box-shadow: none; outline: 2px solid #555; outline-offset: 2px; }
.login-page .password-toggle { color: #666; top: 3px; }
.login-page .login-submit { justify-content: center; height: 44px; margin-top: 0; padding: 10px 14px; border-radius: 4px; background: #252525; font-size: 14px; font-weight: 500; }
.login-page .login-submit:hover { background: #404040; }
.login-page .login-footer { position: static; margin-top: 24px; color: #777; font-size: 11px; line-height: 1.5; text-align: center; }
.login-page .form-alert { margin: 0 0 20px; border-radius: 4px; }
.brand-name { letter-spacing: 0; }
.empty-state h2 { font: 500 24px/1.4 var(--sans); letter-spacing: 0; margin: 0; }
@media (max-width: 480px) { .login-page .field-group input { font-size: 16px; } }
