* { box-sizing: border-box; }
:root { color-scheme: light; --page:#f8f9f5; --side:#edf0e9; --ink:#242c26; --muted:#536257; --rule:#dbe2d8; --green:#245440; --deep:#142f26; --light:#dcebdc; font-family:"Segoe UI",system-ui,sans-serif; color:var(--ink); background:var(--page); }
[hidden] { display:none !important; }
body { margin:0; }
button,input,select,textarea { font:inherit; }
button { cursor:pointer; }
button:disabled { opacity:.52; cursor:default; }
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible { outline:2px solid #3a795b; outline-offset:3px; }
input,select { min-width:0; }
button { color:inherit; }
p { line-height:1.55; }
.brand { display:flex; gap:.66rem; align-items:center; font-size:1.12rem; font-weight:730; letter-spacing:-.035em; }
.mark { display:grid; place-items:center; border-radius:10px; color:#f2f5df; background:var(--green); width:32px; height:32px; font-size:21px; }
.auth { min-height:100dvh; display:grid; grid-template-columns:minmax(320px,1fr) minmax(370px,1fr); }
.auth-art { overflow:hidden; isolation:isolate; position:relative; min-height:100%; display:flex; flex-direction:column; justify-content:space-between; padding:clamp(2rem,6vw,5rem); color:#ecf4e9; background:var(--deep); }
.auth-art .mark { background:#daead0; color:var(--deep); }
.auth-copy { margin-bottom:12vh; position:relative; z-index:1; }
.auth-copy>span { letter-spacing:.19em; color:#bdd7bd; font-size:.75rem; }
.auth-copy h1,.empty h1 { font-family:Georgia,serif; font-weight:400; letter-spacing:-.062em; line-height:.98; }
.auth-copy h1 { font-size:clamp(4.2rem,8vw,8rem); margin:1.1rem 0 1.5rem; }
.auth-copy p { max-width:28ch; color:#c9dbcd; }
.art-orbit { z-index:-1; width:65vw; aspect-ratio:1; position:absolute; left:11%; bottom:-31vw; border:1px solid #3f6353; border-radius:49% 51% 64% 36%; transform:rotate(-25deg); box-shadow:0 0 0 32px #244437,0 0 0 33px #3f6353,0 0 0 65px #244437,0 0 0 66px #3f6353,0 0 0 99px #244437,0 0 0 100px #3f6353; }
.auth-content { display:grid; place-items:center; padding:2rem; }
.auth-form { width:min(100%,25rem); }
.auth-form h2 { font-size:2rem; margin:0; letter-spacing:-.045em; }
.auth-form p { color:var(--muted); }
.auth-form label { display:block; font-weight:650; margin:1rem 0; }
.auth-form label small { font-weight:400; color:var(--muted); margin-left:.2rem; }
.auth-form input { display:block; margin-top:.43rem; width:100%; }
.auth-form .primary { width:100%; }
.auth-form code { display:block; word-break:break-all; }
input,select { border:1px solid var(--rule); border-radius:8px; background:#fff; color:var(--ink); padding:.65rem .72rem; }
.primary,.new-chat { background:var(--green); border:1px solid var(--green); color:#fff; padding:.66rem 1rem; border-radius:9px; font-weight:650; }
.primary:hover,.new-chat:hover { background:#193f31; }
.workspace { display:grid; grid-template-columns:16.5rem minmax(0,1fr); height:100dvh; }
.sidebar { background:var(--side); border-right:1px solid var(--rule); display:flex; flex-direction:column; min-height:0; }
.sidebar-top { padding:1.3rem 1rem .55rem; display:grid; gap:.95rem; }
.sidebar .brand { padding:.15rem .25rem .5rem; }
.new-chat { text-align:left; display:flex; align-items:center; gap:.58rem; }
.new-chat span { font-size:1.2rem; line-height:1; }
nav { display:grid; gap:.18rem; }
.nav-button,.history button { border:0; background:transparent; text-align:left; border-radius:8px; padding:.58rem .65rem; }
.nav-button[aria-current],.history button[aria-current] { background:#dce7dc; color:#204633; font-weight:700; }
.nav-button:hover,.history button:hover { background:#e0e8de; }
.history-head h2 { color:var(--muted); text-transform:uppercase; font-size:.72rem; letter-spacing:.125em; margin:.45rem 0 0; }
.history { overflow:auto; display:flex; flex-direction:column; padding:0 1rem 1rem; gap:.18rem; flex:1; }
.history button { color:#34453a; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex-shrink:0; width:100%; }
.history p { font-size:.85rem; color:var(--muted); padding:0 .25rem; }
.account { border-top:1px solid var(--rule); padding:.9rem; display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:.62rem; align-items:center; }
.avatar { display:grid; place-items:center; width:36px; height:36px; border-radius:50%; background:#d4e3cf; font-weight:700; color:var(--green); }
.account strong,.account small { text-overflow:ellipsis; white-space:nowrap; overflow:hidden; display:block; }
.account strong { font-size:.83rem; }
.account small { color:var(--muted); font-size:.78rem; }
.account button,.plain,.menu { border:1px solid var(--rule); background:#fff; border-radius:7px; padding:.4rem .65rem; }
.account button:hover,.plain:hover { background:#eaf2e9; }
.main { display:flex; flex-direction:column; min-height:0; min-width:0; }
.topbar { min-height:4.25rem; border-bottom:1px solid var(--rule); display:flex; align-items:center; justify-content:space-between; padding:.65rem clamp(.85rem,3vw,2.3rem); gap:1rem; background:#fdfefa; }
.top-left,.model-control { display:flex; align-items:center; gap:.63rem; min-width:0; }
.model-control select { max-width:min(32vw,19rem); }
.status { color:#34523f; background:#e5eee2; border-radius:20px; padding:.3rem .56rem; font-size:.77rem; white-space:nowrap; }
.status[data-state="unavailable"],.status[data-state="degraded"] { color:#804022; background:#f4e6d9; }
.status[data-state="unknown"] { color:#565b4e; background:#ecede5; }
.menu { display:none; }
.chat { flex:1; display:flex; flex-direction:column; min-height:0; }
.chat-scroll { flex:1; min-height:0; overflow:auto; }
.empty { text-align:center; margin:clamp(2.5rem, 12vh, 9rem) auto 3rem; max-width:46rem; padding:0 1rem; }
.hero-mark { display:grid; place-items:center; margin:0 auto 1.15rem; width:58px; height:58px; border:1px solid #d6e2d2; border-radius:19px; color:var(--green); background:#e8efe3; font-size:33px; }
.empty h1 { margin:0; font-size:clamp(2.65rem,5.4vw,5.1rem); color:#1d392d; }
.empty p { color:var(--muted); margin:1rem 0 1.5rem; }
.examples,.attachments { display:flex; gap:.5rem; flex-wrap:wrap; justify-content:center; }
.examples button,.chip { white-space:normal; background:#fdfefb; border:1px solid var(--rule); border-radius:100px; padding:.47rem .83rem; }
.examples button:hover,.chip:hover { background:#e9efe5; }
.composer { align-self:center; width:min(calc(100% - 2rem),48rem); border:1px solid #cddace; background:#fff; border-radius:18px; padding:.72rem; margin:.75rem auto clamp(.85rem,4vh,2rem); box-shadow:0 6px 23px #22392b0b; }
.composer textarea { display:block; width:100%; border:0; resize:vertical; min-height:3.7rem; max-height:24vh; color:var(--ink); border-radius:9px; padding:.5rem .6rem; }
.composer-bar,.attach-row { display:flex; align-items:center; justify-content:space-between; gap:.5rem; }
.composer-bar { padding:.25rem .12rem 0; }
.attachments { justify-content:flex-start; }
.upload { padding:.45rem; border-radius:7px; cursor:pointer; font-weight:650; color:var(--green); }
.upload:has(+input:focus-visible) { outline:2px solid #3a795b; }
#upload-state,.fine { font-size:.83rem; color:var(--muted); }
.error { color:#a23325 !important; }
.error:empty { display:none; }
.composer p { margin:.35rem .35rem 0; }
.chat-tools,.messages { width:min(calc(100% - 2rem),48rem); margin:0 auto; }
.chat-tools { padding:1rem 0 0; display:flex; justify-content:flex-end; }
.messages { padding:1.25rem 0; display:grid; gap:1.1rem; min-width:0; }
.message { padding:1rem 1.15rem; border:1px solid var(--rule); border-radius:15px; background:#fff; max-width:100%; }
.message.user { justify-self:end; background:#eaf1e6; width:fit-content; max-width:min(100%,38rem); }
.message strong { color:var(--green); font-size:.83rem; }
.message p { margin:.45rem 0 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.message a { display:block; color:#22543d; overflow-wrap:anywhere; }
.danger { color:#983a32; }
.report { flex:1; min-height:0; overflow:auto; padding:clamp(1rem,4vw,3.8rem); }
.report h1 { color:#20382b; font:400 clamp(2.25rem,4vw,3.5rem)/1.05 Georgia,serif; letter-spacing:-.035em; margin:.3rem 0 1.2rem; }
.report h2 { margin:1.7rem 0 .65rem; font-size:1.2rem; }
.filters { display:flex; gap:.75rem; flex-wrap:wrap; align-items:flex-end; margin:1.1rem 0; }
.filters label { display:grid; gap:.25rem; color:var(--muted); font-size:.87rem; }
.stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(9rem,1fr)); gap:.75rem; margin:1.25rem 0; }
.stat { display:grid; gap:.4rem; background:#eef3e9; border:1px solid var(--rule); border-radius:10px; padding:1rem; }
.stat strong { font-size:1.45rem; color:var(--green); }
.stat span { font-size:.85rem; color:var(--muted); }
.table-wrap { overflow:auto; border:1px solid var(--rule); border-radius:10px; }
table { width:100%; border-collapse:collapse; text-align:left; background:#fff; }
th,td { padding:.7rem .85rem; border-bottom:1px solid var(--rule); white-space:nowrap; }
th { background:#eaf0e7; font-size:.83rem; }
td { font-size:.875rem; }
tr:last-child td { border-bottom:0; }
.policies { display:grid; gap:.65rem; }
.policy { border:1px solid var(--rule); border-radius:10px; padding:.85rem; background:#fff; }
.policy label input[type=number] { width:8rem; }
.alert { background:#f8ecdc; border:1px solid #ebd5b9; max-width:55rem; padding:.7rem; border-radius:7px; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
@media (max-width:850px) { .workspace { grid-template-columns:13.2rem minmax(0,1fr); } .model-control { flex-wrap:wrap; justify-content:flex-end; } }
@media (max-width:675px) { .workspace { display:block; } .main { height:100dvh; } .sidebar { display:none; } .sidebar.open { display:flex; position:fixed; inset:0 auto 0 0; width:min(85vw,17rem); z-index:3; box-shadow:0 0 0 100vw #22382b66; } .sidebar.open .account { margin-top:auto; } .menu { display:block; } .topbar { gap:.3rem; } .top-left,.model-control { gap:.35rem; } .model-control select { max-width:45vw; padding:.43rem .35rem; font-size:.85rem; } .model-control .status { display:none; } .auth { display:block; } .auth-art { padding:1.25rem; } .auth-copy { margin:1.2rem 0 .2rem; } .auth-copy h1 { font-size:3.1rem; margin:.45rem 0 .6rem; } .auth-copy p,.art-orbit { display:none; } .auth-content { padding:1.7rem 1.25rem; } .empty { margin:clamp(1.5rem,8vh,5rem) auto 1rem; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto !important; transition:none !important; } }
