:root { color-scheme: light; --paper:#f8f7f2; --surface:#fffefa; --ink:#183a38; --teal:#245a53; --muted:#66716a; --line:#dedfd4; --soft:#eeeee5; --error:#943c32; font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color:var(--ink); background:var(--paper); font-synthesis:none; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; }
button,input,textarea { font:inherit; }
button,a,input,textarea { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; }
button:disabled { cursor:wait; opacity:.6; }
a { color:inherit; }
:focus-visible { outline:3px solid #468b7b; outline-offset:4px; }
.auth-view { min-height:100svh; display:flex; flex-direction:column; padding:0 clamp(24px,6vw,92px); }
.auth-header { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:32px 0; }
.wordmark { display:inline-flex; align-items:center; text-decoration:none; font-size:35px; font-weight:650; letter-spacing:-2px; line-height:1; }
.brand-mark { display:inline-grid; place-items:center; width:32px; height:36px; margin-right:11px; color:var(--paper); background:var(--ink); border-radius:16px 16px 5px 5px; font-family:Georgia,serif; font-size:29px; font-weight:400; letter-spacing:0; }
.brand-period { color:#78988a; }
.eyebrow { font-size:10px; font-weight:650; letter-spacing:.17em; line-height:1.7; }
.auth-layout { flex:1; display:grid; grid-template-columns:1.2fr 1fr; align-items:center; gap:clamp(40px,8vw,132px); width:100%; max-width:1160px; margin:40px auto 72px; }
.auth-intro h1 { font-family:Georgia,"Times New Roman",serif; font-weight:400; font-size:clamp(40px,4.7vw,68px); letter-spacing:-.045em; line-height:1.1; margin:24px 0; }
.auth-intro>p { color:var(--muted); font-size:17px; line-height:1.75; }
.intro-rule { height:1px; width:64px; background:#a4b5a5; margin:42px 0 22px; }
.auth-intro .intro-signature { font-size:13px; }
.auth-card { width:100%; max-width:434px; padding:36px; border:1px solid var(--line); border-radius:18px; background:var(--surface); box-shadow:0 4px 28px #183a3805; }
.access-badge { display:inline-flex; align-items:center; gap:7px; background:#eaf0e7; color:#3b6152; border:1px solid #dce6d9; border-radius:20px; font-size:11px; padding:6px 10px; }
.auth-card h2 { font-family:Georgia,"Times New Roman",serif; font-size:27px; line-height:1.2; letter-spacing:-.035em; font-weight:400; margin:25px 0 10px; }
.muted { color:var(--muted); font-size:13px; line-height:1.7; }
#auth-form { margin-top:28px; }
.field { margin:18px 0; }
.field label { display:block; font-size:12px; font-weight:600; margin-bottom:9px; }
.field input { width:100%; min-height:46px; background:var(--surface); color:var(--ink); border:1px solid var(--line); padding:11px 12px; border-radius:7px; font-size:14px; }
input::placeholder,textarea::placeholder { color:#777e75; }
.primary { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; border:1px solid var(--teal); background:var(--teal); color:#fff; padding:13px 16px; min-height:46px; border-radius:7px; font-size:13px; font-weight:550; }
.primary:hover:not(:disabled) { background:var(--ink); }
.auth-footnote { border-top:1px solid var(--line); margin:26px 0 0; padding-top:20px; color:var(--muted); font-size:11px; line-height:1.8; }
.error { color:var(--error); font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.auth-footer { display:flex; align-items:center; justify-content:space-between; gap:20px; border-top:1px solid var(--line); padding:22px 0; color:var(--muted); font-size:11px; }
.noscript { margin:24px; }
.text-button { min-height:44px; border:0; background:transparent; color:var(--muted); font-size:12px; padding:10px 0; text-align:left; }
.text-button:hover:not(:disabled) { color:var(--ink); text-decoration:underline; text-underline-offset:4px; }
#auth-switch { margin-top:12px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.skip-link { position:fixed; top:-80px; left:24px; padding:12px 20px; z-index:100; background:var(--ink); color:white; border-radius:8px; }
.skip-link:focus { top:16px; }
.chat-view { height:100vh; height:100dvh; display:grid; grid-template-columns:264px minmax(0,1fr); overflow:hidden; }
.sidebar { min-height:0; display:flex; flex-direction:column; background:#eeefe7; border-right:1px solid var(--line); padding:32px 22px 16px; }
.sidebar-brand { display:flex; align-items:center; justify-content:space-between; min-height:36px; }
.sidebar-tagline { font-size:11px; color:var(--muted); margin:14px 0 34px; }
.new-chat { border:1px solid #d1d6c9; background:var(--surface); color:var(--ink); border-radius:8px; min-height:46px; padding:12px; font-size:12px; text-align:left; box-shadow:0 2px 3px #183a3803; }
.new-chat span { margin-right:6px; font-size:17px; }
.new-chat:hover:not(:disabled) { border-color:#8fa797; }
.conversation-nav { flex:1; min-height:0; overflow-y:auto; padding-top:32px; }
.conversation-nav h2 { color:var(--muted); font-weight:500; font-size:9px; margin:0 0 16px 8px; }
.empty-history { color:var(--muted); font-size:12px; line-height:1.7; margin:8px; }
.conversation-list { list-style:none; margin:0; padding:0; }
.conversation-list li { margin:3px 0; }
.conversation-button { display:block; width:100%; min-height:44px; border:1px solid transparent; text-align:left; border-radius:7px; padding:11px 10px; background:transparent; color:var(--ink); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.conversation-button:hover:not(:disabled),.conversation-button[aria-current] { background:#e1e7dc; border-color:#dce2d6; }
.sidebar-bottom { border-top:1px solid #d7dbce; padding-top:18px; margin-top:18px; }
.account { display:flex; gap:10px; align-items:center; }
.account-initial { width:32px; height:32px; flex:none; display:grid; place-items:center; background:#dfe6d8; color:#3d6353; border:1px solid #d2ddcb; border-radius:50%; font-size:12px; }
.account-details { display:flex; flex-direction:column; gap:4px; min-width:0; font-size:12px; }
#account-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account-caption { color:var(--muted); font-size:10px; }
#logout { display:flex; align-items:center; justify-content:space-between; width:100%; margin-top:8px; font-size:11px; }
.chat-main { min-width:0; min-height:0; display:flex; flex-direction:column; }
.chat-header { min-height:79px; display:flex; flex:none; align-items:center; justify-content:space-between; gap:16px; padding:14px 34px; border-bottom:1px solid #e7e8df; }
.chat-header-title { display:flex; align-items:center; gap:8px; min-width:0; font-size:12px; }
#conversation-title { text-overflow:ellipsis; overflow:hidden; white-space:nowrap; }
.header-actions { display:flex; align-items:center; gap:18px; flex-shrink:0; }
.assistant-badge { display:inline-flex; align-items:center; gap:7px; font-size:10px; color:var(--muted); }
.badge-dot { width:5px; height:5px; border-radius:50%; background:#6b8a78; }
.delete-chat { font-size:11px; }
.chat-scroll { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; }
.welcome { max-width:790px; margin:0 auto; padding:clamp(40px,8vh,100px) 34px 36px; text-align:center; }
.welcome-mark { margin:0 auto 28px; display:grid; place-items:center; width:54px; height:60px; color:var(--ink); background:#e8ede0; border:1px solid #dce3d3; border-radius:26px 26px 9px 9px; font:italic 48px/1 Georgia,serif; }
.welcome>.eyebrow { color:#728372; font-size:9px; }
.welcome h1 { font-family:Georgia,"Times New Roman",serif; font-size:clamp(31px,3vw,43px); font-weight:400; letter-spacing:-.04em; line-height:1.2; margin:16px 0; }
.welcome-description { font-size:14px; color:var(--muted); line-height:1.8; }
.suggestions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:42px; }
.suggestion { border:1px solid var(--line); border-radius:11px; background:var(--surface); padding:17px 14px; text-align:left; color:var(--ink); transition:border-color .15s,background .15s; }
.suggestion:hover:not(:disabled) { border-color:#a4b6a0; background:#f1f3e9; }
.suggestion-icon { display:block; font-size:21px; margin-bottom:17px; font-family:Georgia,serif; color:#6d8a72; }
.suggestion strong { display:block; font-size:11px; font-weight:600; margin-bottom:6px; }
.suggestion>span:last-child { display:block; color:var(--muted); font-size:10px; line-height:1.6; }
.messages { max-width:800px; margin:0 auto; padding:16px 34px; }
.messages:empty { display:none; }
.message { margin:24px 0 36px; }
.message-label { color:var(--muted); font-size:11px; font-weight:600; margin:0 0 12px; }
.message-content { color:var(--ink); font-size:15px; line-height:1.8; white-space:pre-wrap; overflow-wrap:anywhere; }
.message-user { margin-left:auto; max-width:85%; padding:16px 20px; background:#e9ede3; border-radius:14px 14px 3px 14px; }
.message-user .message-label { margin-bottom:5px; }
.message-warning { color:var(--error); font-size:11px; line-height:1.6; margin-bottom:0; }
.composer-area { flex:none; width:100%; max-width:820px; margin:0 auto; padding:8px 34px max(16px,env(safe-area-inset-bottom)); }
.composer { background:var(--surface); border:1px solid #ccd4c7; border-radius:14px; box-shadow:0 2px 5px #183a3804,0 5px 22px #183a3803; padding:16px 16px 10px; }
.composer:focus-within { border-color:#819c84; }
.composer textarea { display:block; width:100%; resize:vertical; min-height:54px; max-height:200px; border:0; outline:none; background:transparent; color:var(--ink); font-size:14px; line-height:1.6; padding:0 2px; }
.composer textarea:focus-visible { outline:2px solid #468b7b; outline-offset:5px; border-radius:2px; }
.composer-toolbar { display:flex; align-items:center; justify-content:space-between; margin-top:8px; }
.composer-identity { color:var(--muted); font-size:11px; }
.composer-identity span { margin-right:4px; }
.send-button { display:grid; place-items:center; min-width:44px; min-height:44px; border:0; border-radius:9px; background:var(--teal); color:white; font-size:22px; }
.send-button:hover:not(:disabled) { background:var(--ink); }
.send-button:disabled { cursor:default; background:#9daea1; }
.composer-help { display:flex; justify-content:space-between; gap:12px; color:var(--muted); font-size:9px; line-height:1.6; margin:10px 2px 0; }
.privacy-note { font-size:9px; line-height:1.7; color:var(--muted); margin:8px 2px 0; }
.chat-status { font-size:12px; color:var(--muted); line-height:1.6; margin:0 0 10px; }
.chat-status:empty { display:none; }
.chat-error { margin:0 0 12px; }
.icon-button { display:inline-grid; place-items:center; min-width:44px; min-height:44px; background:transparent; border:0; border-radius:6px; font-size:22px; color:var(--ink); }
.mobile-only,.sidebar-backdrop { display:none; }
@media (min-width:1500px) { .welcome { padding-top:12vh; }.suggestions { margin-top:54px; } }
@media (max-width:1000px) { .chat-view { grid-template-columns:232px minmax(0,1fr); }.sidebar { padding:26px 16px 16px; }.chat-header { padding:14px 24px; }.welcome,.messages { padding-left:24px; padding-right:24px; }.composer-area { padding-left:24px; padding-right:24px; }.suggestions { gap:8px; }.suggestion { padding:14px 10px; }.composer-help span:last-child { display:none; } }
@media (max-width:760px) {
  .chat-view { grid-template-columns:minmax(0,1fr); }
  .mobile-only { display:inline-grid; }
  .sidebar { position:fixed; z-index:40; inset:0 auto 0 0; width:min(300px,86vw); box-shadow:14px 0 50px #183a3814; transform:translateX(-105%); visibility:hidden; transition:transform .2s,visibility .2s; }
  .sidebar.is-open { transform:translateX(0); visibility:visible; }
  .sidebar-backdrop { display:block; position:fixed; z-index:30; inset:0; border:0; border-radius:0; background:#17312d55; }
  .chat-header { min-height:68px; padding:10px 16px 10px 8px; gap:6px; }
  .header-actions { gap:8px; }
  .assistant-badge { font-size:9px; max-width:115px; line-height:1.5; }
  .welcome { padding:36px 20px 26px; }.welcome-mark { margin-bottom:22px; }.welcome h1 { font-size:32px; }.welcome-description { font-size:13px; }.welcome>.eyebrow { font-size:8px; }
  .suggestions { margin-top:28px; grid-template-columns:1fr; gap:8px; }
  .suggestion { position:relative; padding:14px 14px 14px 46px; }.suggestion-icon { position:absolute; top:14px; left:16px; margin:0; }.suggestion strong { font-size:12px; margin-bottom:3px; }.suggestion>span:last-child { font-size:11px; }
  .composer-area { padding-left:16px; padding-right:16px; padding-top:8px; }.composer { padding:14px 12px 9px; }.composer textarea { font-size:16px; min-height:48px; }.composer-help { font-size:9px; }.privacy-note { font-size:9px; }
  .messages { padding:10px 20px; }.message-content { font-size:14px; }.message-user { max-width:92%; padding:14px 16px; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none !important; animation:none !important; scroll-behavior:auto !important; } }

@media (max-width:760px) { .auth-header { padding:24px 0; }.auth-header>.eyebrow { font-size:8px; letter-spacing:.1em; }.auth-layout { display:flex; flex-direction:column; align-items:stretch; gap:32px; margin:36px auto; max-width:434px; }.auth-intro h1 { font-size:42px; }.auth-intro>p { font-size:15px; }.auth-intro .intro-rule,.intro-signature,.desktop-break { display:none; }.auth-card { padding:26px; }.auth-footer { font-size:10px; align-items:flex-start; }.auth-footer span:last-child { text-align:right; } }
