:root{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:#152c4e;background:#fff;font-size:15px;--blue:#1260bd;--blue-dark:#0c4e9f;--muted:#7387a4;--line:#e0eaf5;--soft:#f3f7fc;--sidebar:clamp(220px,19.2vw,285px)}
*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button,a,input,textarea,select{ -webkit-tap-highlight-color:transparent}button{display:inline-flex;align-items:center;justify-content:center;gap:10px;padding:11px 17px;border:1px solid #d7e3f1;border-radius:8px;color:inherit;background:white;cursor:pointer;transition:background .16s,border-color .16s}button:hover{background:#edf5ff;border-color:#aac9ed}button:disabled{cursor:wait;opacity:.55}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #90bff7;outline-offset:3px}input:focus,textarea:focus,select:focus{outline:2px solid #a9ccf7;border-color:#6ea5e7}button.primary{color:white;background:var(--blue);border-color:var(--blue);box-shadow:0 3px 7px #0a55aa0e}button.primary:hover{background:var(--blue-dark)}.primary .icon{filter:brightness(0) invert(1)}.icon{width:22px;height:22px;flex-shrink:0;opacity:.87}.icon-button{padding:9px;border:0;background:transparent}.muted{color:var(--muted);font-size:14px;line-height:1.8}a{color:var(--blue);text-decoration:none}a:hover{text-decoration:underline}[hidden]{display:none!important}h1,h2,h3,p{margin-top:0}h1,h2,h3{letter-spacing:.015em}h2{font-size:21px}p{line-height:1.85}input,textarea,select{width:100%;border:1px solid #d7e3f1;background:white;padding:12px 14px;border-radius:8px;color:inherit}input::placeholder,textarea::placeholder{color:#8b9ab0}textarea{resize:vertical;line-height:1.75}label{display:block;font-size:14px;font-weight:500;line-height:1.7;margin-bottom:20px}label input,label select,label textarea{display:block;margin-top:8px;font-weight:400}label.check{display:flex;align-items:center;gap:10px;font-weight:400}.check input{width:17px;height:17px;margin:0;accent-color:var(--blue)}.row{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.row input{flex:1;min-width:160px}.row label{margin:0}form>.primary{min-width:120px}details{border-top:1px solid var(--line);padding-top:18px;margin-top:22px}summary{cursor:pointer;font-weight:500}details form{margin-top:24px} .badge{display:inline-flex;font-size:12px;border-radius:5px;padding:4px 9px;color:#2b7764;background:#eff8f3}.badge.unverified{color:#748398;background:#f0f3f7}
.pengbo-app{display:flex;height:100dvh;overflow:hidden}.pb-sidebar{width:var(--sidebar);flex-shrink:0;background:#f0f7ff;border-right:1px solid var(--line);padding:28px 22px 20px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:14px;text-decoration:none;color:#122b51}.brand:hover{text-decoration:none}.brand>img{width:66px;height:66px;border-radius:50%;mix-blend-mode:multiply}.brand strong{display:block;white-space:nowrap;font-size:29px;font-weight:650;letter-spacing:.015em}.brand span{display:block;font-size:14px;color:#6c87ac;white-space:nowrap;margin-top:8px;letter-spacing:.035em}.pb-sidebar>#new-chat{width:100%;min-height:56px;margin:40px 0 28px;font-size:18px;font-weight:600}.pb-sidebar nav{display:grid;gap:8px}.pb-sidebar nav button{justify-content:flex-start;border:0;background:transparent;height:50px;gap:20px;padding:12px 17px;white-space:nowrap;font-size:16px}.pb-sidebar nav button:hover,.pb-sidebar nav button.active{background:#e1efff;color:#0e5fbb}.pb-sidebar nav button.active{font-weight:600}.history-heading{border-top:1px solid #d6e6f7;margin:28px 8px 12px;padding-top:24px;color:#7d90aa;font-size:14px}#history-list{overflow:auto;flex:1;min-height:30px}#history-list button{width:100%;border:0;background:transparent;justify-content:flex-start;display:flex;padding:13px 10px;margin:3px 0;gap:12px;font-size:14px;text-align:left}#history-list button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#history-list button:hover,#history-list button.selected{background:#e2effe}.pb-sidebar>#logout{background:none;border:0;border-top:1px solid #d6e6f7;border-radius:0;padding-top:24px;justify-content:flex-start;padding-left:16px;gap:20px;margin-top:15px}
.pb-main{flex:1;min-width:0;display:flex;flex-direction:column;position:relative}.topbar{min-height:112px;padding:22px 32px;border-bottom:1px solid var(--line);display:flex;gap:16px;align-items:center;background:#fcfdff}.heading{min-width:0;flex:1}.heading h1{font-size:28px;line-height:1.3;margin:0 0 7px;font-weight:650}.heading p{margin:0;color:#627a9e;font-size:16px}.account-heading{display:flex;align-items:center;gap:11px;font-size:14px;font-weight:500}.environment{font-size:13px;border:1px solid #d3e4f9;border-radius:5px;background:#f0f7ff;color:#59779f;padding:7px 11px;white-space:nowrap}.account-heading .environment{margin-right:14px}.account-avatar{width:32px;height:32px;background:#ebf1f8;border-radius:50%;display:grid;place-items:center}#nav-toggle{display:none}#notice{position:absolute;z-index:20;top:88px;left:32px;right:32px;max-width:850px;padding:12px 36px 12px 16px;background:#f0f7ff;border:1px solid #c4dbf7;border-radius:8px;font-size:14px;box-shadow:0 5px 20px #193e6414;cursor:pointer}.pb-view{flex:1;min-height:0}.pb-view.scroll{overflow:auto;padding:36px 40px;background:#fbfcfe}.scroll>h1{font-size:27px;margin-bottom:10px}.scroll>p{color:#7588a2;margin-bottom:28px}.scroll>h2{margin-top:32px;margin-bottom:18px}#knowledge-form{max-width:850px;padding:28px;background:white;border:1px solid var(--line);border-radius:12px}#search-form{max-width:850px;margin:0 0 20px;flex-wrap:nowrap}#search-form input{width:auto}#knowledge-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:24px}.kb-card{padding:24px;background:white;border:1px solid var(--line);border-radius:10px;min-width:0}.kb-card h2{margin:14px 0 8px;font-size:19px}.kb-card>p{white-space:pre-wrap;overflow-wrap:anywhere}.kb-card>button{margin-right:8px;margin-top:8px;padding:8px 14px}.account-card{padding:18px 20px;border:1px solid var(--line);background:white;border-radius:9px;margin:12px 0;line-height:2}.account-card>button{margin:10px 10px 0 0;padding:7px 14px}.account-card a{overflow-wrap:anywhere}#draft-list .kb-card{max-width:900px;margin-bottom:18px}#weixin-state{background:#edf5ff;border:1px solid var(--line);border-radius:8px;padding:20px;max-width:680px;margin-bottom:24px}#weixin-qr{margin-top:28px;border:1px solid var(--line);border-radius:10px}#weixin-progress{margin-top:16px}#company-upload{max-width:680px;background:white}#admin-range{margin-bottom:20px;align-items:flex-end}#stats .metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:22px 0}#stats .metric{background:#fff;border:1px solid var(--line);border-radius:10px;padding:22px}#stats .metric strong{display:block;font-size:32px;margin:12px 0 0;color:#1b5ca4}#stats table{border-collapse:collapse;width:100%;font-size:14px;background:white}#stats th,#stats td{text-align:left;border-bottom:1px solid var(--line);padding:14px 16px;white-space:nowrap}#stats th{background:#f1f6fc;font-weight:500}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:8px}#account-form{max-width:650px}#employee-sessions{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.9}#employee-sessions button{margin:0 12px 12px 0}
.chat-layout{display:flex;overflow:hidden}.chat-column{flex:1;min-width:0;display:flex;flex-direction:column}#messages{flex:1;min-height:0;overflow:auto;padding:42px 28px 28px;scroll-behavior:smooth}.welcome{max-width:620px;margin:clamp(30px,12vh,130px) auto 0;text-align:center}.welcome>img{width:68px;height:68px;border-radius:50%;margin-bottom:22px}.welcome h2{font-size:26px;margin-bottom:14px}.welcome p{color:var(--muted);font-size:15px}.welcome-hints{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-top:25px}.welcome-hints button{color:#577499;font-size:14px;background:#f6f9fd}.message-row{display:flex;gap:18px;margin-bottom:32px;align-items:flex-start}.message-row>.avatar{width:46px;height:46px;border-radius:50%;flex-shrink:0;background:#e9f3ff;padding:8px}.message-row.bot>.avatar{padding:0}.message-column{min-width:0;max-width:calc(100% - 64px)}.message-label{font-size:15px;font-weight:600;margin:1px 0 13px}.msg{font-size:15px;line-height:1.95;overflow-wrap:anywhere}.msg.bot{background:#f1f5f9;border-radius:10px;padding:18px 22px}.msg.bot:empty{min-height:60px}.msg p:last-child{margin-bottom:0}.msg p{margin:0 0 15px}.msg h1,.msg h2,.msg h3{font-size:17px;margin:18px 0 10px}.msg ul,.msg ol{padding-left:22px}.msg li{margin:5px 0}.msg pre{overflow:auto;max-width:100%;background:#e6eef7;padding:14px;border-radius:6px}.msg table{border-collapse:collapse;display:block;overflow:auto;font-size:14px}.msg th,.msg td{padding:8px;border:1px solid #cedbea}.message-row.user{flex-direction:row-reverse;margin-bottom:36px}.message-row.user .msg{background:#dfeeff;border-radius:10px;padding:17px 21px;white-space:pre-wrap}.message-row.user .message-column{max-width:85%}.message-row.user>.avatar{width:40px;height:40px;margin-top:0;filter:none}.message-row.user .message-label{display:none}.message-time{font-size:12px;color:#8b9cb4;text-align:right;margin-top:9px}.answer-tools{padding-top:14px}.answer-image-button{color:#095dbd;border:1px solid #689ef2;border-radius:7px;padding:12px 16px;font-weight:500;background:white;font-size:14px}.answer-caption{color:#7e91ad;font-size:13px;margin:8px 0 0;line-height:1.7}.answer-select{border:0;background:none;color:#6984a9;font-size:12px;padding:4px 0;margin-top:7px}.generated-image{margin-top:18px;max-width:520px}.chat-img{max-width:100%;max-height:540px;border-radius:8px;display:block}.dl{font-size:13px;margin-top:8px}.composer-wrap{padding:0 20px 24px}#chat-form{display:flex;align-items:center;gap:12px;border:1px solid #d1deef;border-radius:10px;min-height:90px;padding:13px 17px 13px 20px;background:white;box-shadow:0 4px 14px #204d7c04}#chat-form:focus-within{border-color:#6e9fe0;box-shadow:0 0 0 3px #eaf3fe}#input{border:0;background:transparent;padding:3px 0;resize:none;min-height:52px;max-height:180px;outline:none;font-size:15px;flex:1}#input:focus{outline:none}.compose-actions{display:flex;gap:8px;align-items:center}#send-btn{height:50px;min-width:104px;font-size:16px}.chat-footer{display:flex;justify-content:space-between;gap:10px;color:#8b9bb2;font-size:12px;margin:15px 15px 0;line-height:1.7}.chat-footer details{position:relative;border:0;padding:0;margin:0;white-space:nowrap}.chat-footer summary{font-weight:400}.chat-footer details p{position:absolute;bottom:20px;right:0;background:#fff;padding:18px;border:1px solid var(--line);width:290px;white-space:normal;border-radius:8px;box-shadow:0 6px 22px #1c365b14;z-index:10;color:#607591}.references{width:clamp(280px,26.4vw,392px);flex-shrink:0;border-left:1px solid var(--line);display:flex;flex-direction:column;padding:32px 22px 24px;overflow:auto}.references-heading{display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--line);padding-bottom:22px;flex-shrink:0}.references-heading h2{font-size:20px;margin:0;display:flex;align-items:center;gap:13px;flex:1}.references-heading>span{font-size:14px;color:#7388a7;white-space:nowrap}.references-heading .icon{width:25px;height:25px}.reference-item{width:100%;text-align:left;border:0;border-bottom:1px solid var(--line);border-radius:0;background:white;display:flex;align-items:flex-start;gap:13px;padding:25px 0}.reference-icon{width:40px;height:44px;display:grid;place-items:center;border-radius:7px;background:#eaf4ff;flex-shrink:0}.reference-icon .icon{filter:invert(28%) sepia(79%) saturate(1527%) hue-rotate(194deg) brightness(88%)}.reference-copy{flex:1;min-width:0}.reference-copy strong{font-size:15px;line-height:1.65;display:block;font-weight:600}.reference-copy small{font-size:13px;line-height:1.7;color:#7a8eac;display:block;margin-top:7px;overflow-wrap:anywhere}.reference-item>.badge{flex-shrink:0;margin-top:3px}.reference-empty{color:#8d9db4;line-height:2;font-size:14px;text-align:center;padding:60px 0}.reference-foot{color:#8b9bb2;font-size:12px;margin:auto 0 0;padding-top:32px;text-align:right}.references-toggle,#references-close{display:none}dialog{color:inherit;border:1px solid var(--line);border-radius:14px;width:min(800px,calc(100vw - 32px));max-height:85dvh;padding:26px;box-shadow:0 20px 100px #132c4d3b}dialog::backdrop{background:#10244155}.dialog-heading{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}.dialog-heading h2{line-height:1.6;font-size:21px;margin:0}#reference-content{white-space:pre-wrap;line-height:1.9;overflow-wrap:anywhere}#reference-meta{border-bottom:1px solid var(--line);padding-bottom:16px;margin-top:12px}.typing{display:block;color:#7990ae;font-size:14px}.typing:after{content:'正在整理回答…'}.shade{position:fixed;inset:0;border:0;border-radius:0;background:#13274455;z-index:35}
.login-page{min-height:100dvh;background:#f0f6ff;display:grid;place-items:center;padding:35px}.login-shell{display:grid;grid-template-columns:1.1fr 1fr;max-width:1050px;width:100%;background:white;border:1px solid #dce8f7;border-radius:20px;overflow:hidden;box-shadow:0 20px 80px #244c7b0b}.login-intro{padding:48px;background:#eaf4ff;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;min-height:640px}.login-intro h1{font-size:36px;line-height:1.65;margin:14px 0 18px}.login-intro p{color:#6280a7;font-size:15px}.eyebrow{font-size:13px;color:#5c80ad;letter-spacing:.12em}.login-card{padding:90px 50px 50px}.login-card h2{font-size:28px;margin-bottom:10px}.login-card form{margin-top:35px}.login-card form .primary{width:100%;margin-top:8px;min-height:48px}.login-note{font-size:12px;color:#8a9bb2;margin-top:32px;line-height:2}
@media(min-width:1600px){#messages{padding-left:48px;padding-right:48px}.composer-wrap{padding-left:40px;padding-right:40px}}
@media(max-width:1250px){.account-heading .environment{margin-right:0}.brand{gap:10px}.brand>img{width:49px;height:49px}.brand strong{font-size:25px}.brand span{font-size:11px}.pb-sidebar{padding-left:16px;padding-right:16px}.topbar{padding-left:24px;padding-right:24px}.heading p{font-size:14px}.account-heading{gap:8px;font-size:12px}.references{width:280px;padding-left:18px;padding-right:18px}.reference-item{flex-wrap:wrap;gap:9px}.reference-item>.badge{margin-left:49px;margin-top:-5px}.reference-copy{min-width:180px}.reference-icon{width:34px}.message-row{gap:12px}.message-row>.avatar{width:36px;height:36px}.message-column{max-width:calc(100% - 48px)}#messages{padding:30px 20px}.msg.bot{padding:16px}.answer-image-button{padding:10px;font-size:13px}.chat-footer{margin-left:0;margin-right:0}.chat-footer>span{max-width:70%}.pb-view.scroll{padding:30px}#knowledge-list{grid-template-columns:1fr}}
@media(max-width:1100px){.references{display:none}.references.open{display:flex;position:absolute;right:0;top:112px;bottom:0;z-index:25;width:340px;background:white;box-shadow:-10px 0 40px #1a395817}.references-toggle{display:flex;align-self:flex-end;border:0;padding:10px 20px;font-size:13px;color:#6380a5}.references-toggle .icon{width:18px;height:18px}#references-close{display:flex}.references-heading{gap:6px}.references-heading h2{font-size:18px}.account-heading .environment{display:none}.message-column{max-width:90%}#messages{padding-top:22px}}
@media(max-width:760px){:root{font-size:14px}.pb-sidebar{position:fixed;left:0;top:0;bottom:0;width:270px;z-index:40;transform:translateX(-100%);transition:transform .2s}.pb-sidebar.open{transform:translateX(0)}.pb-sidebar .brand>img{width:58px;height:58px}.pb-sidebar .brand strong{font-size:27px}.pb-sidebar .brand span{font-size:13px}#nav-toggle{display:flex}.topbar{min-height:84px;padding:15px 14px;gap:8px}.heading h1{font-size:22px;margin-bottom:4px}.heading p{font-size:11px}.account-heading{max-width:100px}.account-avatar{display:none}#identity{font-size:11px;line-height:1.6}.references.open{top:84px;width:min(360px,100%)}#messages{padding:20px 16px}.message-row{gap:10px;margin-bottom:25px}.message-row>.avatar{width:32px;height:32px}.message-row.user>.avatar{width:32px;height:32px;padding:6px}.message-column{max-width:calc(100% - 42px)}.msg{font-size:14px}.msg.bot{padding:14px 16px}.message-row.user .msg{padding:13px 16px}.message-row.user .message-column{max-width:82%}.message-label{font-size:14px;margin-bottom:9px}.composer-wrap{padding:0 12px 14px}#chat-form{padding:10px 12px;gap:6px;min-height:76px}#input{font-size:14px;min-height:48px}#send-btn{min-width:65px;height:43px;padding:10px;font-size:14px;gap:5px}#send-btn .icon{width:17px}#stop-btn{font-size:11px;padding:10px 8px}.chat-footer{font-size:10px;margin:10px 0 0}.chat-footer>span{max-width:78%}.answer-image-button{font-size:12px;gap:7px;padding:10px}.answer-image-button .icon{width:18px}.answer-caption{font-size:11px}.welcome{margin-top:40px}.welcome h2{font-size:23px}.welcome p{font-size:13px}.welcome>img{width:58px;height:58px}.pb-view.scroll{padding:24px 18px}.scroll>h1{font-size:24px}#knowledge-form{padding:20px 16px}#stats .metrics{gap:8px}#stats .metric{padding:15px 10px;font-size:12px}#stats .metric strong{font-size:26px}#notice{top:73px;left:12px;right:12px;font-size:12px}.login-page{padding:18px}.login-shell{grid-template-columns:1fr;max-width:480px}.login-intro{min-height:0;padding:27px;gap:20px}.login-intro>div{display:none}.login-intro>.environment{display:none}.login-card{padding:30px 27px}.login-card h2{font-size:25px}.login-card form{margin-top:25px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

/* Visual QA: retain source spacing while accommodating real document titles. */
@media(min-width:1251px){.topbar{height:112px;min-height:112px;padding-top:19px;padding-bottom:19px}.msg{font-size:16px}.message-label{font-size:16px}.answer-image-button{font-size:16px}.answer-caption{font-size:14px}.composer-wrap{padding-bottom:40px}.chat-footer{font-size:13px}#input{font-size:16px}.reference-copy strong{font-size:16px}.reference-copy small{font-size:14px}.reference-item{padding:26px 0}.pb-sidebar nav .icon{width:25px;height:25px}.pb-sidebar>#logout{margin-bottom:8px}}
.answer-image-button .icon,.pb-sidebar nav button.active .icon{filter:invert(26%) sepia(85%) saturate(1800%) hue-rotate(194deg) brightness(87%)}
.generated-image:empty{display:none}
@media(max-width:760px){.account-heading{max-width:96px;min-width:0}#identity{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}}
/* User refinement: compact everyday workspace, 14px body / 22px heading. */
:root{font-size:14px;--sidebar:232px}
.pb-sidebar{padding:23px 18px 16px}.brand{gap:11px}.brand>img{width:50px;height:50px}.brand strong{font-size:24px}.brand span{font-size:11px;margin-top:5px}
.pb-sidebar>#new-chat{font-size:15px;min-height:44px;margin:30px 0 20px}.pb-sidebar nav{gap:5px}.pb-sidebar nav button{height:43px;font-size:14px;gap:15px;padding:10px 13px}.pb-sidebar nav .icon{width:21px;height:21px}
.history-heading{margin:23px 6px 10px;padding-top:20px;font-size:13px}#history-list button{font-size:13px;padding:10px 8px}.pb-sidebar>#logout{font-size:13px;padding-top:18px;margin-bottom:0}
.topbar{height:88px;min-height:88px;padding:17px 26px}.heading h1{font-size:22px;margin-bottom:5px}.heading p{font-size:13px}.account-heading{font-size:12px}.environment{font-size:12px;padding:5px 9px}
#messages{padding:30px 26px 22px}.message-row{gap:14px;margin-bottom:25px}.message-row>.avatar{width:36px;height:36px}.message-column{max-width:calc(100% - 50px)}.message-label{font-size:14px;margin-bottom:10px}.msg{font-size:14px;line-height:1.85}.msg.bot{padding:15px 19px}.message-row.user .msg{padding:14px 18px}.message-row.user>.avatar{width:34px;height:34px}.message-time{font-size:11px}
.answer-image-button{font-size:14px;padding:10px 13px;gap:8px}.answer-image-button .icon{width:19px;height:19px}.answer-caption{font-size:12px;margin-top:7px}.answer-tools{padding-top:12px}
.references{width:clamp(260px,24vw,330px);padding:26px 19px 20px}.references-heading{padding-bottom:18px}.references-heading h2{font-size:17px;gap:10px}.references-heading>span{font-size:12px}.references-heading .icon{width:22px;height:22px}.reference-item{padding:21px 0;gap:10px;flex-wrap:nowrap}.reference-copy{min-width:0}.reference-copy strong{font-size:14px}.reference-copy small{font-size:12px;margin-top:6px}.reference-icon{width:34px;height:38px}.reference-item>.icon{width:17px;height:17px;opacity:.45;margin-top:9px}
.composer-wrap{padding:0 20px 26px}#chat-form{min-height:76px;padding:10px 14px 10px 17px}#input{font-size:14px;min-height:44px}#send-btn{height:43px;min-width:88px;font-size:14px}.chat-footer{font-size:11px;margin-top:12px}
.scroll>h1{font-size:23px}.kb-card h2{font-size:17px}.kb-card{padding:21px}.welcome h2{font-size:23px}.welcome p{font-size:14px}.welcome>img{width:58px;height:58px}
@media(max-width:1100px){.references.open{top:88px}}
@media(max-width:760px){.pb-sidebar{width:250px}.topbar{height:74px;min-height:74px;padding:13px 12px}.heading h1{font-size:20px}.heading p{font-size:11px}.references.open{top:74px}#messages{padding:18px 14px}.message-row{gap:10px}.message-row>.avatar{width:30px;height:30px}.message-column{max-width:calc(100% - 40px)}.msg{font-size:14px}.message-label{font-size:13px}.answer-image-button{font-size:12px}.answer-caption{font-size:11px}.composer-wrap{padding:0 12px 13px}#chat-form{padding:9px 11px}#send-btn{min-width:65px}.chat-footer{font-size:10px}.pb-sidebar .brand>img{width:50px;height:50px}.pb-sidebar .brand strong{font-size:24px}.pb-sidebar .brand span{font-size:11px}}
/* Original-document reader: fixed controls, independently scrolling paper/body. */
#reference-dialog{width:min(1180px,calc(100vw - 36px));height:92dvh;max-height:92dvh;padding:0;overflow:hidden;border-radius:12px}
#reference-dialog[open]{display:flex;flex-direction:column}#reference-dialog.reader-expanded{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border:0;border-radius:0;margin:0}
.reader-header{padding:20px 26px 0;background:#fff;flex-shrink:0}.reader-eyebrow{font-size:11px;letter-spacing:1px;color:#7e91ab;margin:0 0 5px}.reader-header .dialog-heading h2{font-size:19px;line-height:1.45}.reader-header #reference-meta{margin:8px 0 0;padding:0;border:0;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.reader-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 0 14px;flex-wrap:wrap}.reader-modes{display:flex;background:#edf2f8;border-radius:7px;padding:3px;gap:3px}.reader-modes button{font-size:13px;border:0;background:transparent;padding:8px 15px;color:#667b97}.reader-modes button[aria-pressed=true]{background:white;color:#265ca9;box-shadow:0 1px 4px #183d6a18}.reader-actions{display:flex;align-items:center;gap:15px;font-size:13px}.reader-actions button{font-size:13px;padding:7px 11px}.reader-actions a{color:#2b61ad;text-decoration:none}
.reader-panel{min-height:0;flex:1;overflow:hidden}#reader-preview{display:flex;flex-direction:column;background:#e8edf3;border-top:1px solid #d8e1ec}#reader-preview[hidden],#reader-text-panel[hidden]{display:none}.reader-page-controls{display:flex;gap:12px;align-items:center;justify-content:center;padding:10px 16px;background:#f7f9fc;border-bottom:1px solid #d8e1ec;flex-wrap:wrap;font-size:12px;flex-shrink:0}.reader-page-controls[hidden]{display:none}.reader-page-controls button{padding:6px 11px;font-size:12px}.reader-page-controls label{display:flex;align-items:center;gap:5px}.reader-page-controls input{width:54px;padding:5px 6px;font-size:12px}.reader-page-controls select{width:auto;padding:5px 8px;font-size:12px}.reader-zoom-label{margin-left:15px}#reader-status{padding:20px;margin:0;font-size:14px;line-height:1.8;text-align:center;color:#60738e}#reader-paper-scroll{flex:1;min-height:0;overflow:auto;padding:24px;overscroll-behavior:contain}#reader-paper{width:100%;min-width:100%;margin:auto}#reader-page-image{display:block;width:100%;height:auto;max-width:none;box-shadow:0 2px 12px #182c491f;background:white}#reader-page-image[hidden]{display:none}
#reader-text-panel{overflow:auto;background:#fff;padding:24px 36px;overscroll-behavior:contain}.reader-text-note{max-width:780px;margin:0 auto 22px;background:#f2f6fb;padding:12px 15px;font-size:12px;color:#6b7e97;line-height:1.8}#reference-content.reader-article{white-space:normal;max-width:780px;margin:auto;font-size:15px;line-height:1.9;color:#28394d}.reader-article h1{font-size:22px}.reader-article h2{font-size:19px}.reader-article h3{font-size:17px}.reader-article h1,.reader-article h2,.reader-article h3{margin:24px 0 12px}.reader-article p{margin:0 0 16px}.reader-article pre{overflow:auto;padding:16px;background:#f2f6fb}.reader-article table{border-collapse:collapse;display:block;overflow:auto;max-width:100%;font-size:14px}.reader-article td,.reader-article th{border:1px solid #d5deea;padding:8px 12px}.reader-article th{background:#f2f6fb}.reader-bottom{font-size:11px;color:#7789a2;padding:9px 24px;border-top:1px solid #e2e9f2;background:white;flex-shrink:0;line-height:1.6}
@media(max-width:650px){#reference-dialog{width:calc(100vw - 12px);max-width:none;height:96dvh;max-height:96dvh;border-radius:8px}.reader-header{padding:14px 14px 0}.reader-header .dialog-heading h2{font-size:17px}.reader-toolbar{gap:10px;padding:12px 0}.reader-actions{gap:10px;font-size:12px}.reader-actions button{font-size:12px}.reader-modes button{padding:7px 11px;font-size:12px}.reader-page-controls{gap:8px;padding:8px}.reader-zoom-label{margin-left:0}.reader-page-controls button{padding:6px 8px}#reader-paper-scroll{padding:10px}#reader-text-panel{padding:18px 16px}.reader-bottom{padding:8px 14px}}
.reader-page-controls label{margin-bottom:0}.reader-page-controls label input,.reader-page-controls label select{margin-top:0}

/* One intake flow, shared by company and employee knowledge. */
.ingest-tabs{display:flex;gap:8px;margin:22px 0 16px;border-bottom:1px solid var(--border,#e1e8f2);padding-bottom:12px}
.ingest-tabs button[aria-pressed="true"]{color:#285c9b;background:#eaf2fc;border-color:#c7d9f0}
.upload-destination{display:flex;align-items:center;gap:12px;margin:16px 0;color:#66788f;font-size:13px;flex-wrap:wrap}
.upload-dropzone{border:1.5px dashed #aebfd7;border-radius:16px;padding:32px 20px;text-align:center;background:#f8fbff;transition:background .15s,border-color .15s}
.upload-dropzone>.icon{width:32px;height:32px;opacity:.65}.upload-dropzone h2{font-size:18px;margin:14px 0 8px}.upload-dropzone p{margin:8px 0 18px;color:#62748c}
.upload-dropzone.dragging{background:#e9f2ff;border-color:#2e5f9f}.upload-dropzone.is-busy{opacity:.7}
.upload-picker{position:relative;display:inline-flex!important;align-items:center;padding:10px 23px;border-radius:8px;background:#2d5d9b;color:white;cursor:pointer;margin:0 auto!important;overflow:hidden}
.upload-picker input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%;padding:0}
.upload-picker:focus-within{outline:3px solid #9ebee7;outline-offset:3px}
.upload-job{background:white;border:1px solid #dce5f1;padding:22px;border-radius:14px;margin:16px 0}.upload-job-heading{display:flex;gap:12px;align-items:center;justify-content:space-between}.upload-job h2{font-size:16px;overflow-wrap:anywhere;margin:0}.upload-job .badge{flex-shrink:0}.upload-job label{max-width:none}.upload-job>button{margin:12px 10px 0 0}.upload-warning{background:#fff7e5;color:#795617;border-radius:8px;padding:12px;line-height:1.7}.upload-summary{line-height:1.8;background:#f5f8fc;padding:14px;border-radius:8px}.upload-extracted{white-space:pre-wrap;overflow:auto;max-height:320px;font:13px/1.8 inherit;background:#f7f9fc;padding:16px;overflow-wrap:anywhere}.upload-job details{margin:14px 0}.upload-job summary{cursor:pointer;color:#2d5d9b}.upload-help{line-height:1.8;margin-top:20px}
#upload-progress:empty{display:none}#upload-progress{padding:12px 0;color:#2d5d9b}#reader-plain-original{white-space:pre-wrap;overflow-wrap:anywhere;font:14px/1.8 monospace;padding:24px;background:white;color:#20324b}
@media(max-width:600px){.upload-dropzone{padding:24px 14px}.upload-job{padding:16px}.upload-job-heading{align-items:flex-start;flex-direction:column}.upload-job>button{width:100%;margin-right:0}.upload-destination{gap:6px;font-size:12px}}
/* Catalog and account controls: compact reading, explicit actions. */
.catalog-heading,.employee-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:20px}
.catalog-heading h1,.employee-heading h2{margin:0 0 8px}.catalog-heading p,.employee-heading p{margin:0}
.library-tabs,.catalog-categories{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px}
.library-tabs button{font-size:15px;padding:11px 22px}.library-tabs [aria-pressed=true]{background:#2c5b98;color:white;border-color:#2c5b98}
.catalog-categories button{font-size:13px;padding:7px 12px}.catalog-categories [aria-pressed=true]{background:#e9f1fc;color:#254f83;border-color:#94b3df}
.catalog-subcategory{max-width:640px;margin-bottom:16px}.catalog-subcategory label{gap:6px}
#knowledge-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:18px}
#knowledge-list .catalog-card{margin:0;padding:22px;display:flex;flex-direction:column;min-width:0}
#knowledge-list .catalog-card h2{font-size:17px;line-height:1.6;margin:14px 0 10px;overflow-wrap:anywhere}
.catalog-card .badge{align-self:flex-start;font-size:12px}.catalog-card p{font-size:13px;line-height:1.7;margin:4px 0}
.catalog-meta{color:#677e98;overflow-wrap:anywhere}.catalog-source{color:#66768a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.catalog-actions{display:flex;gap:8px;margin-top:auto;padding-top:18px}.catalog-actions button:first-child{color:#2c5b98;background:#f0f5fc;border-color:#dae6f6}
.catalog-empty{grid-column:1/-1;padding:40px 12px;color:#687b92}#catalog-more{margin:24px auto;display:block}
.new-employee-panel{background:#f5f8fd;border:1px solid #cdddf1;border-radius:16px;padding:28px;margin-top:24px}
.new-employee-panel h2{font-size:22px;margin-top:0}#account-form{display:grid;grid-template-columns:1fr 1fr;gap:20px;max-width:850px}
#account-form label{margin:0;min-width:0}#account-form input{font-size:16px;min-height:48px}#account-form .primary{align-self:end;min-height:48px;font-size:16px}
#employee-create-status{grid-column:1/-1;margin:0}#new-employee-focus{font-size:16px;padding:13px 22px;white-space:nowrap}
.settings-card{max-width:600px;background:white;border:1px solid #dce5ef;border-radius:16px;padding:28px}.settings-card h2{margin-top:0}.settings-card input{min-height:46px}
.confirmation-explainer{max-width:850px;background:#f1f6fd;border:1px solid #dce6f4;border-radius:12px;padding:20px;margin:24px 0}.confirmation-explainer h2{font-size:17px;margin-top:0}
.history-heading{display:flex;justify-content:space-between;align-items:center;gap:4px}.history-heading #trash-open{font-size:11px;padding:3px 5px;background:transparent;border:0;color:#73849a}
#history-list .history-row{display:flex;align-items:center;gap:2px;min-width:0}#history-list .history-open{flex:1;min-width:0;width:auto}#history-list .history-delete{flex:0 0 28px;width:28px;justify-content:center;font-size:19px;padding:4px;color:#8a98ac}#history-list .history-delete:hover{background:#ffeded;color:#a73232}
#account-settings{display:flex;align-items:center;gap:10px;text-align:left;background:transparent;border:0;color:#62748d;padding:10px 12px;margin-top:8px}
#trash-dialog{width:min(620px,calc(100vw - 32px));max-height:80vh;border:1px solid #dce5ef;border-radius:16px;padding:24px;color:#233f63}#trash-dialog::backdrop{background:#142d4c66}.trash-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 0;border-bottom:1px solid #e6edf6}.trash-row span{overflow-wrap:anywhere}.trash-row button{flex-shrink:0}
.references-toggle{display:flex;align-self:flex-end;margin:8px 24px 0}.references-heading #references-close{display:flex}
@media(max-width:760px){#knowledge-list{grid-template-columns:1fr}.catalog-heading,.employee-heading{align-items:flex-start;flex-direction:column;gap:12px}#account-form{grid-template-columns:1fr}.new-employee-panel,.settings-card{padding:20px}.catalog-categories{gap:6px}.catalog-categories button{font-size:12px}.references-toggle{margin:6px 12px 0}}
.catalog-management{font-size:12px;margin-top:14px;padding:10px}.catalog-management>div{display:flex;flex-wrap:wrap;gap:8px;padding:10px 0}.catalog-management>div>span{flex-basis:100%}.catalog-management button{padding:5px 10px;font-size:12px}
@media(min-width:761px) and (max-height:820px){.pb-sidebar{padding-top:20px;padding-bottom:16px}.pb-sidebar>#new-chat{margin:22px 0 14px;min-height:44px}.pb-sidebar nav{gap:3px}.pb-sidebar nav button{height:42px}.history-heading{margin-top:16px;padding-top:16px}.pb-sidebar>#logout{padding-top:16px;margin-top:8px}}
.catalog-result-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px}.catalog-result-bar p{margin:8px 0}.catalog-result-bar button{font-size:12px;padding:7px 12px;flex-shrink:0}
.inline-confirmations{margin-top:16px}.inline-confirmation{padding:20px;margin:12px 0;border:1px solid #bfcfe5;border-radius:12px;background:#fff;min-width:0}.inline-confirmation h3{font-size:16px;margin:0 0 8px}.inline-confirmation p{font-size:13px;line-height:1.7;margin:6px 0}.confirmation-preview{max-height:260px;overflow:auto;background:#f5f8fc;padding:12px;border-radius:8px;margin:14px 0;white-space:pre-wrap;overflow-wrap:anywhere}.confirmation-actions{display:flex;gap:10px;margin-top:14px}.confirmation-status{color:#3a638c}.inline-confirmation input{width:100%;min-width:0}#other-confirmations{max-width:850px;margin:24px auto}#other-confirmations>h3{font-size:16px}#other-confirmations>.muted{font-size:13px}

/* Knowledge-grounded conversation starters. */
.welcome-suggestions{margin-top:24px;text-align:left}.welcome-suggestions-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;color:#7388a7;font-size:13px}.welcome-refresh{border:0;background:transparent;color:#37669f;padding:6px 0;font-size:13px}.welcome .welcome-status{font-size:13px;text-align:left;margin:12px 0}.welcome-suggestions .welcome-hints{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}.welcome-hints .welcome-question{display:flex;flex-direction:column;gap:9px;align-items:flex-start;text-align:left;padding:16px;min-width:0;background:#f8fafd}.welcome-question strong{font-size:14px;line-height:1.65;font-weight:500;color:#264f81}.welcome-question-source{font-size:12px;line-height:1.6;color:#7a8da7;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}.welcome-question small{font-size:11px;color:#8a9bb1;margin-top:auto}.welcome-question:hover{border-color:#7da6d8;background:#eff5fc}@media(max-width:760px){.welcome-suggestions .welcome-hints{grid-template-columns:1fr}.welcome-hints .welcome-question{padding:13px}.welcome-suggestions{margin-top:20px}}

/* Keep the welcome cards focused on the worker's question alone. */
.welcome-hints .welcome-question{min-height:70px;justify-content:center;padding:16px 18px}.welcome-question strong{font-size:14px;line-height:1.7;font-weight:500}

/* One row per account, with channel detail beneath each total. */
.person-stats td{vertical-align:middle}.person-stats td>strong{font-size:16px;font-variant-numeric:tabular-nums}.stats-breakdown{display:block;margin-top:5px;font-size:12px;line-height:1.5;color:#7387a4;white-space:nowrap}
