*{box-sizing:border-box}
:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:#20253a;background:#f8f9fc;--ink:#20253a;--muted:#626c80;--accent:#364fc2;--line:#dce1eb;--focus:#3856d4;--page:min(1088px,calc(100% - 96px));font-synthesis:none}
body{margin:0;min-width:280px;min-height:100vh}
button,input,select,textarea{font:inherit;color:inherit}
button,a,select,input,textarea{-webkit-tap-highlight-color:transparent}
button,a,select{touch-action:manipulation}
button{background:none;border:0;cursor:pointer}button:disabled{cursor:default;opacity:.53}
a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
[hidden]{display:none!important}
.icon{display:inline-block;width:20px;height:20px;flex-shrink:0;vertical-align:middle;pointer-events:none}
.sr-only,.skip:not(:focus){position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.skip:focus{position:fixed;z-index:10;top:8px;left:8px;padding:12px;background:white}
.top{background:#fff;border-bottom:1px solid var(--line)}
.top-inner{width:min(1320px,calc(100% - 80px));margin:auto;min-height:73px;display:flex;align-items:center;gap:50px}
.brand{display:inline-flex;align-items:center;gap:10px;font-size:24px;letter-spacing:-1.45px;font-weight:730;line-height:1;white-space:nowrap}
.brand img{display:block}
.desktop-nav,.head-tools,.account,.sys-trigger,.view-link,.library-foot,.library-foot span,.library-foot button,.sort-field,.filters,.filter-chip,.dialog-foot,.primary,.secondary,.kicker,.chat-note{display:flex;align-items:center}
.desktop-nav{gap:5px}.view-link,.sys-trigger{gap:8px;min-height:40px;border-radius:10px;padding:0 14px;font-size:14px;font-weight:550;color:var(--muted)}
.view-link .icon,.sys-trigger .icon{width:17px;height:17px}
.view-link[aria-current="page"]{color:#304ab5;background:#edf0fd}.view-link:hover,.sys-trigger:hover,.icon-button:hover{background:#f0f2f8;color:var(--ink)}
.head-tools{gap:15px;margin-left:auto}.account{gap:8px;border-left:1px solid var(--line);padding-left:20px;font-size:13px;font-weight:600}
.avatar{background:#ebecf5;color:#41496d;border-radius:100%;width:29px;height:29px;display:grid;place-items:center;font-size:12px}
.icon-button{height:38px;width:38px;display:inline-grid;place-items:center;border-radius:9px;padding:0;color:var(--muted)}
.account .icon{width:17px}.mobile-nav{display:none}
#main{width:var(--page);margin:40px auto 64px;outline:0}
.library-hero{position:relative;isolation:isolate;overflow:hidden;background:linear-gradient(100deg,#eff2ff 4%,#e4eafa 65%,#dae4fb 100%);border:1px solid #d6def4;border-radius:20px;min-height:213px;display:flex;align-items:center}
.hero-copy{position:relative;z-index:1;padding:34px 40px;max-width:66%}
.kicker{margin:0 0 12px;gap:8px;color:#425489;text-transform:uppercase;font-size:10.5px;line-height:1.45;font-weight:730;letter-spacing:.115em}
.demo-dot{width:7px;height:7px;background:#647bcc;border-radius:2px;transform:rotate(45deg)}
h1,h2,h3,p{margin:0}h1{font-size:clamp(38px,4.75vw,62px);line-height:1.06;font-weight:660;letter-spacing:-.057em}
.lead{margin-top:13px;font-size:15px;line-height:1.55;color:#525d75;letter-spacing:-.012em}
.folio-art{position:absolute;pointer-events:none;inset:0 0 0 auto;width:38%;min-width:270px;overflow:hidden}
.folio-grid{position:absolute;inset:0;background-image:linear-gradient(90deg,#95a7e035 1px,transparent 1px),linear-gradient(#95a7e035 1px,transparent 1px);background-size:23px 23px;transform:skew(-9deg) scale(1.15);mask-image:linear-gradient(90deg,transparent,#000 48%)}
.folio-object{position:absolute;top:50%;left:50%;width:178px;height:136px;transform:translate(-51%,-45%) rotate(-12deg) skewY(-2deg);filter:drop-shadow(8px 15px 9px #47599636)}
.folio-back{position:absolute;inset:5px 13px 20px 0;border-radius:5px 9px 7px 7px;background:linear-gradient(135deg,#384fbd,#2f439c);border:1px solid #4459bc}
.folio-back:before{content:"";position:absolute;top:-10px;left:-1px;width:65px;height:15px;background:#3c53b8;clip-path:polygon(0 0,74% 0,100% 100%,0 100%);border-radius:5px}
.folio-paper{position:absolute;width:137px;height:96px;left:14px;top:1px;border:1px solid #b1bedc;border-radius:5px;background:#f8faff;box-shadow:0 2px 3px #56678e1f}
.folio-paper.rear{transform:translate(3px,-10px) rotate(8deg);background:#dbe5fc}
.folio-paper.middle{transform:translate(1px,-7px) rotate(3deg);background:#eef3ff}
.folio-paper.front{transform:translate(3px,-3px) rotate(-2deg);padding:11px;background:linear-gradient(135deg,#fff,#eaf0fc)}
.folio-paper i{height:2px;width:54px;display:block;margin-bottom:4px;background:#bbc8e2}.folio-paper i:first-child{width:32px;background:#889bc8}
.folio-cover{position:absolute;inset:32px 0 1px 1px;transform:skewX(-8deg);border:1px solid #566dd1;border-bottom:3px solid #566bc2;border-radius:4px 9px 10px 8px;background:linear-gradient(155deg,#91a6f1 0%,#758ee7 46%,#647bd3 100%);box-shadow:inset 0 1px 0 #c5d2ff,inset -2px 0 0 #91a3e7}
.folio-cover:before{position:absolute;content:"";left:3px;right:9px;top:4px;height:1px;background:#b0bef3}
.folio-label{position:absolute;left:18px;top:42px;display:flex;align-items:center;gap:2px;background:#e0e8ff;border:1px solid #c2cfec;border-radius:3px;padding:5px 7px;width:35px;height:15px}
.folio-label b{display:block;background:#8193c7;width:2px;height:6px}.folio-label b:nth-child(2){width:3px}
.folio-seam{position:absolute;right:12px;width:15px;bottom:11px;border-bottom:2px solid #455fb237;box-shadow:0 -3px #455fb237}
.library-toolbar{margin-top:30px;display:flex;gap:12px}
#search-form,.sort-field{display:flex;align-items:center;background:#fff;border:1px solid #cfd6e3;border-radius:11px;min-height:49px}
#search-form{flex:1;gap:10px;padding:0 14px;color:#697489;min-width:0}
#search-form:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px #e4e9ff}
#search-form input{background:none;border:0;outline:0!important;min-width:0;flex:1;height:46px;font-size:15px}
input::placeholder,textarea::placeholder{color:#697386;opacity:1}input[type=search]::-webkit-search-cancel-button{display:none}
kbd{border:1px solid var(--line);border-radius:4px;min-width:22px;text-align:center;color:#798293;font:12px/22px ui-monospace,monospace;background:#f8f9fc}
.sort-field{height:49px;position:relative;gap:8px;padding:0 11px;color:#4e586e}
.sort-field select{appearance:none;border:0;background:transparent;padding:0 24px 0 35px;margin-left:-34px;height:100%;font-size:13px;font-weight:550;cursor:pointer;position:relative;z-index:1}
.sort-field .icon{width:17px;height:17px}.sort-field .icon:last-child{position:absolute;right:11px;width:14px;pointer-events:none}
.list-controls{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:23px 0 13px}
.filters{gap:5px}.filter-chip{min-height:36px;justify-content:center;padding:0 13px;font-size:13px;line-height:1.2;font-weight:580;color:#5b657a;border:1px solid transparent;border-radius:8px}.filter-chip:hover{background:#ebedf4}.filter-chip[aria-pressed=true]{background:#e7ebfa;border-color:#d3dbf4;color:#344797}
.result-count,.library-foot,.library-foot button{font-size:12px;color:var(--muted)}
.file-list{background:white;border:1px solid var(--line);border-radius:15px;overflow:hidden}.file-row,.table-head{display:grid;grid-template-columns:minmax(0,1fr) 150px 88px 24px;align-items:center;column-gap:14px;padding:0 22px}
.table-head{background:#f2f4f9;color:#647086;min-height:38px;font-size:11px;font-weight:650;letter-spacing:.025em;border-bottom:1px solid var(--line)}
.file-row{width:100%;text-align:left;min-height:82px;padding-top:13px;padding-bottom:13px;background:#fff;border-bottom:1px solid #e7eaf1}
.file-row:last-child{border-bottom:0}.file-row:hover,.file-row:focus-visible{background:#f6f8ff}.file-row:focus-visible{outline-offset:-3px}
.file-identity{display:flex;align-items:center;gap:15px;min-width:0}.file-copy{min-width:0}.file-copy strong,.source-name{font-size:15px;display:block;font-weight:630;overflow-wrap:anywhere;letter-spacing:-.02em}
.file-badge{display:inline-grid;place-items:center;width:44px;height:48px;border:1px solid;border-radius:11px;flex:none}
.file-badge .icon{height:27px;width:27px}.file-badge.pdf{background:#fff1ee;border-color:#f6ddd8;color:#ad5347}.file-badge.docx{background:#eaf1ff;border-color:#d5e2f9;color:#4d70aa}.file-badge.zip{background:#fff5db;border-color:#efdfb5;color:#886822}
.file-desc,.file-snippet{display:block;color:var(--muted);line-height:1.45;font-size:12px;margin-top:4px}.file-snippet{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.file-date,.file-size{font-size:13px;color:#5a6377;font-variant-numeric:tabular-nums}.row-next{color:#76839d;width:15px;height:15px;justify-self:end}
.library-foot{margin:10px 4px 0;justify-content:space-between}.library-foot span,.library-foot button{gap:6px}.library-foot .icon{width:15px;height:15px}.library-foot button{padding:8px 4px;min-height:40px}.library-foot button:hover{text-decoration:underline;color:var(--accent)}
.empty-state{text-align:center;padding:34px 20px;line-height:1.55}.empty-state strong{display:block}.empty-state p{font-size:14px;color:var(--muted);margin:5px 0 12px}.empty-state button{margin:auto}
.chat-head{margin:4px 0 24px}.chat-head h1{font-size:clamp(34px,4vw,52px)}
.chat-shell{background:white;border:1px solid var(--line);border-radius:18px;padding:20px;display:flex;flex-direction:column;max-width:100%}
.chat-scroller{height:clamp(260px,43dvh,540px);overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
#chat-intro{padding:18px 8px;display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.assistant-mark{height:44px;width:44px;border:1px solid #d8def3;border-radius:13px;background:#edf1fd;color:var(--accent);display:grid;place-items:center}
#chat-intro h2{margin:12px 0 5px;font-size:clamp(20px,2.3vw,28px);letter-spacing:-.045em}#chat-intro p,.system-brief,.login-copy{font-size:14px;color:var(--muted);line-height:1.55}
.prompts{display:flex;justify-content:center;gap:7px;flex-wrap:wrap;margin-top:16px}
.prompts button{border:1px solid var(--line);border-radius:9px;padding:9px 10px;min-height:36px;font-size:12px;display:flex;gap:8px;align-items:center;background:#fafbfe}
.prompts button:hover,.secondary:hover{border-color:#aab8e0}.prompts .icon{width:14px;height:14px;color:#6a7eb7}
#chat-form{margin-top:12px;display:flex;align-items:flex-end;border:1px solid #cdd5e7;gap:9px;padding:6px;border-radius:12px}
#chat-form:focus-within,.password-box:focus-within{box-shadow:0 0 0 3px #e6ebfc;border-color:var(--accent)}
#chat-input{min-height:40px;max-height:100px;flex:1;min-width:0;padding:10px 7px;border:0;resize:none;outline:0;line-height:1.45;font-size:15px;background:none}
.send-button{width:40px;height:40px;display:grid;place-items:center;border-radius:9px;background:var(--accent);color:white}.chat-note{justify-content:center;color:var(--muted);gap:5px;font-size:11px;margin-top:10px}.chat-note .icon{width:12px;height:12px}
#chat-messages{display:grid;gap:18px;padding:0 8px}.message{max-width:88%;font-size:15px;line-height:1.55;overflow-wrap:anywhere}.message-user{justify-self:end;background:#eaf0fe;border-radius:13px 13px 3px 13px;padding:9px 14px;white-space:pre-wrap}.byline{font-weight:650;font-size:12px;color:#4d5d8b;margin-bottom:4px;display:flex;gap:6px;align-items:center}.byline img{width:19px;height:19px}
.sources{margin-top:7px;display:grid;gap:7px}.source-card{display:flex;align-items:center;gap:9px;border:1px solid var(--line);border-radius:10px;padding:9px;text-align:left;background:#fafbfe}.source-card:hover{background:#eef2fd}.source-card .file-badge{width:32px;height:36px;border-radius:7px}.source-card .file-badge svg{width:20px;height:20px}.source-name{font-size:13px}
dialog{border:1px solid #d5dbe8;padding:0;border-radius:18px;background:#fff;color:var(--ink);width:min(615px,calc(100% - 40px));max-height:min(86dvh,760px);box-shadow:0 22px 90px #18234038}
dialog::backdrop{background:#202b4859;backdrop-filter:blur(3px)}
.dialog-inner{display:flex;flex-direction:column;max-height:inherit}.dialog-bar{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding:6px 12px 6px 22px;font-size:12px;font-weight:600;color:var(--muted);flex:none}
.preview-heading{display:flex;gap:13px;align-items:center;padding:23px 24px 15px;flex:none;overflow-wrap:anywhere}.preview-heading h2{font-size:22px;letter-spacing:-.035em;line-height:1.17}.preview-heading p{font-size:12px;color:var(--muted);margin-top:4px;line-height:1.5}
.preview-scroll,.system-scroll{overflow:auto;overscroll-behavior:contain;min-height:0;padding:4px 24px 24px}
.preview-scroll h3,.sys-block h3{font-size:13px;font-weight:650;color:#46516b;margin-bottom:10px}
.preview-text{white-space:pre-wrap;overflow-wrap:anywhere;font:15px/1.65 inherit;font-family:inherit;font-size:15px;line-height:1.65;background:#f6f7fb;border:1px solid #e4e7ef;border-radius:10px;padding:16px;margin:0}
.archive-list,.stats,#provider-list{list-style:none;padding:0;margin:0}
.archive-list li,.stats>div,#provider-list li{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid #e9ecf3;font-size:13px}.archive-list li:last-child,.stats>div:last-child,#provider-list li:last-child{border-bottom:0}.archive-list li span{overflow-wrap:anywhere}.archive-list li small{margin-left:auto;white-space:nowrap;color:var(--muted)}
.dialog-foot{padding:13px 24px;border-top:1px solid var(--line);justify-content:space-between;gap:9px}
.primary,.secondary{justify-content:center;gap:7px;min-height:42px;border-radius:9px;padding:0 15px;font-size:14px;font-weight:580}
.primary{background:var(--accent);color:#fff}.primary:hover,.send-button:hover:enabled{background:#2941aa}.primary .icon{width:17px;height:17px}
.secondary{border:1px solid #d5dbe8;background:#fff;color:#4b566c}
#system-dialog{max-width:460px}.system-scroll{padding-top:20px}.system-scroll h2{font-size:30px;letter-spacing:-.05em}.system-brief{margin-top:3px}.sys-block{margin-top:18px}.sys-block h3{display:flex;align-items:center;gap:7px;margin-bottom:3px}.sys-block h3 .icon{width:16px;height:16px;color:#7382a4}
.stats dd,#provider-list small{margin-left:auto;text-align:right;color:#556078}.stats dd.is-ready{color:#25715e}#provider-list small{font-size:12px}#provider-list span{font-size:11px;color:var(--muted)}
.budget{padding:14px;border:1px solid var(--line);border-radius:10px;background:#f7f8fc}.budget div{display:flex;align-items:center;justify-content:space-between;gap:8px}.budget strong{font-size:13px}.budget h3{margin:0}.budget progress{width:100%;height:5px;display:block;margin-top:10px;accent-color:var(--accent);border:0}.budget progress::-webkit-progress-bar{background:#dfe4ef;border-radius:9px}.budget progress::-webkit-progress-value{background:var(--accent);border-radius:9px}
#toast{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);z-index:3;padding:12px 17px;background:#273049;color:#fff;font-size:14px;border-radius:10px;max-width:90%}
.login-page{background:radial-gradient(ellipse at 50% 28%,#edf1fc 0%,#f8f9fc 60%)}.login-layout{width:min(426px,calc(100% - 32px));margin:clamp(28px,8vh,90px) auto 40px}.login-head{text-align:center;margin-bottom:24px}
.login-sheet{background:white;border-radius:18px;border:1px solid #d8dfed;box-shadow:0 15px 55px #28345d0b;overflow:hidden}.login-art{height:117px;background:linear-gradient(110deg,#eef2ff,#dce5fc);position:relative;overflow:hidden;border-bottom:1px solid #dbe1f2}.login-art .folio-art{width:100%;min-width:0}.login-art .folio-object{transform:translate(-50%,-44%) rotate(-12deg) scale(.65)}.login-art .folio-grid{mask-image:linear-gradient(90deg,transparent,#000 45%,transparent)}
.login-content{padding:27px 30px 30px}.login-content .kicker{margin-bottom:8px}.login-content h1{font-size:34px}.login-copy{margin:9px 0 20px}
#login-form label{display:block;font-size:13px;font-weight:600;margin:14px 0 6px}
#login-form input{height:45px;background:#fff;border:1px solid #cdd4e2;border-radius:9px;font-size:16px;padding:0 11px;width:100%}
.password-box{display:flex;align-items:center;border:1px solid #cdd4e2;border-radius:9px;padding-right:3px}.password-box input{border:0!important;outline:0;min-width:0}.password-box button{flex:none}
.login-submit{width:100%;margin-top:22px;justify-content:space-between;min-height:45px}.login-error{color:#923a36;font-size:13px;margin-top:10px}
@media(min-width:1440px){#main{margin-top:50px}.library-hero{min-height:238px}}
@media(max-width:900px){:root{--page:calc(100% - 48px)}.top-inner{width:var(--page);gap:20px}.desktop-nav{gap:2px}.view-link,.sys-trigger{padding:0 10px}.head-tools{gap:6px}.account{padding-left:10px}.file-row,.table-head{grid-template-columns:minmax(0,1fr) 114px 65px 18px;gap:9px}.hero-copy{padding:30px}.folio-object{transform:translate(-49%,-43%) rotate(-12deg) scale(.91)}}
@media(max-width:680px){:root{--page:calc(100% - 32px)}.top-inner{min-height:58px;gap:8px}.brand{font-size:22px;gap:7px}.brand img{width:30px;height:30px}.desktop-nav,.head-tools>.sys-trigger{display:none}.account{padding:0;border:0;gap:5px}.account .avatar{display:none}.account .icon-button{height:44px;width:44px}.head-tools{margin-right:-7px}
#main{margin:20px auto calc(93px + env(safe-area-inset-bottom))}.mobile-nav{position:fixed;z-index:2;bottom:0;left:0;right:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:center;padding:4px max(12px,calc((100vw - 450px)/2)) calc(4px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:#fff}.mobile-nav>a,.mobile-nav>button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;min-height:50px;color:#58647a;font-size:10.5px;font-weight:550;border-radius:9px;background:transparent}.mobile-nav .icon{height:19px;width:19px}.mobile-nav [aria-current=page]{color:#344eb8;background:#eff2ff}
.library-hero{border-radius:14px;min-height:153px}.hero-copy{padding:22px 17px;max-width:70%}.hero-copy h1{font-size:clamp(29px,8vw,43px)}.kicker{font-size:9px;letter-spacing:.085em;gap:6px;margin-bottom:9px}.demo-dot{width:6px;height:6px}.lead{font-size:13px;line-height:1.45;margin-top:8px}.folio-art{width:29%;min-width:0}.folio-object{left:58%;top:49%;transform:translate(-49%,-44%) rotate(-12deg) scale(.57)}.folio-grid{background-size:16px 16px}
.library-toolbar{margin-top:18px;gap:7px}#search-form,.sort-field{border-radius:9px;min-height:44px;height:44px}#search-form{padding:0 10px;gap:7px}#search-form>.icon{width:17px}#search-form input{height:42px;font-size:16px}#search-form input::placeholder{font-size:12px}.sort-field{padding:0;width:45px;justify-content:center;flex:none}.sort-field select{opacity:0;position:absolute;inset:0;width:100%;margin:0;padding:0}.sort-field:focus-within{outline:2px solid var(--accent);outline-offset:2px}.sort-field .icon:last-child,kbd{display:none}
.list-controls{margin:14px 0 7px;gap:5px}.filters{gap:0}.filter-chip{min-height:42px;padding:0 10px;font-size:12px}.result-count{font-size:11px}
.table-head{display:none}.file-row{display:flex;gap:5px;padding:13px 12px;min-height:76px}.file-identity{gap:10px;flex:1}.file-copy strong{font-size:14px}.file-badge{width:36px;height:41px;border-radius:8px}.file-badge .icon{width:24px;height:24px}.file-date,.file-size{display:none}.file-desc{font-size:11px}.file-list{border-radius:11px}.row-next{width:14px}.library-foot{margin:5px 0 0}.library-foot,.library-foot button{font-size:11px}.library-foot button{min-height:44px}
dialog{width:100%;max-width:100%;max-height:87dvh;margin:auto 0 0;border-radius:17px 17px 0 0;border-bottom:0}#system-dialog{max-width:100%}.dialog-bar{padding:4px 10px 4px 17px}.dialog-bar button{width:44px;height:44px}.preview-heading{padding:18px 16px 14px}.preview-heading h2{font-size:20px}.preview-scroll,.system-scroll{padding-left:16px;padding-right:16px}.dialog-foot{padding:12px 16px calc(12px + env(safe-area-inset-bottom))}.system-scroll{padding-bottom:calc(20px + env(safe-area-inset-bottom))}
.chat-head{margin:0 0 15px}.chat-head h1{font-size:32px}.chat-shell{padding:10px;border-radius:12px}.chat-scroller{height:clamp(235px,43dvh,430px);scrollbar-gutter:auto}#chat-intro{padding:9px 0}#chat-intro h2{font-size:20px}#chat-intro p{font-size:12px}.assistant-mark{width:34px;height:34px;border-radius:9px}.assistant-mark .icon{width:18px}.prompts{margin-top:9px;gap:4px}.prompts button{min-height:34px;padding:5px 8px;font-size:11px}#chat-input{font-size:16px}#chat-messages{padding:4px}.message{max-width:97%;font-size:14px}.chat-note{font-size:10px}
#toast{bottom:calc(72px + env(safe-area-inset-bottom));width:max-content;max-width:88%}.login-layout{margin-top:26px}.login-head{margin-bottom:16px}.login-content{padding:22px}.login-art{height:98px}.login-content h1{font-size:30px}}
@media(max-width:360px){.result-count{font-size:10px}.filter-chip{padding:0 7px}.hero-copy{padding-left:13px}.folio-object{transform:translate(-52%,-44%) rotate(-12deg) scale(.47)}}
.mobile-size{display:none}
@media(max-width:680px){.mobile-size{display:inline}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
