:root{--text-size:1rem;--heading-size:1.5rem;--page-heading-size:2rem;font-family:Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;color:#263c35;background:#f5f6f2;font-size:87.5%;font-synthesis:none;--green:#215544;--dark:#163f35;--muted:#7a8982;--line:#e6eae4;--accent:#d9ebc5}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:wait;opacity:.55}a{color:inherit;text-decoration:none}button,input,select{outline-offset:3px} :focus-visible{outline:2px solid #579c72}input,select{min-width:0;border:1px solid #dfe5dd;border-radius:8px;background:#fff;color:#34483d;padding:10px 12px}input::placeholder{color:#9aa59e}input:focus,select:focus{border-color:#83a690}h1,h2,h3,p{margin:0}button{border:0} [hidden]{display:none!important}.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:39px;padding:9px 16px;border-radius:8px;font-weight:550;white-space:nowrap;transition:background .15s}.primary{background:var(--green);color:#fff}.primary:hover{background:#153e2f}.secondary{background:#fff;border:1px solid #dce3da;color:#455a4c}.secondary:hover{background:#f0f5ed}.text-button{background:transparent;color:#76847b}.text-button:hover{color:var(--green);background:#eef3e9}.error{color:#a43d31;font-size:var(--text-size);line-height:1.6}.muted{color:var(--muted);line-height:1.8}.brand{display:flex;align-items:center;gap:9px;font-size:26px;font-weight:650;letter-spacing:-1px;color:#fff}.brand-dot{color:#d9ebc5;margin-left:-9px}.brand-mark{font-family:Georgia,serif;display:inline-flex;align-items:center;justify-content:center;font-size:24px;font-weight:400;width:34px;height:37px;background:#d9ebc5;color:#163f35;border-radius:9px;margin-right:1px}.login-screen{min-height:100dvh;display:grid;grid-template-columns:1fr 1fr;background:#f8f9f5}.login-story{background:var(--dark);color:#fff;padding:54px 12%;display:flex;flex-direction:column;justify-content:space-between;overflow:hidden}.eyebrow,.section-kicker{font-size:var(--text-size);font-weight:600;letter-spacing:1.8px}.eyebrow{color:#afc8b7;margin-bottom:26px}.login-story h1{font-size:clamp(36px,4vw,62px);font-weight:500;line-height:1.5;letter-spacing:-2px}.login-story h1 span{color:#d9ebc5}.login-caption{color:#b3c5bb;line-height:1.8;margin-top:20px}.story-lines{display:flex;flex-direction:column;gap:12px;margin-top:46px;transform:rotate(-7deg)}.story-lines span{display:block;width:85%;height:36px;border-radius:10px;border:1px solid #426455;background:#254c40}.story-lines span:nth-child(2){width:60%;align-self:flex-end;background:#355c49}.story-lines span:nth-child(3){width:72%}.story-footer{font-size:var(--text-size);color:#9ab7a6;margin-top:50px}.login-side{display:flex;align-items:center;justify-content:center;padding:40px}.login-card{width:360px;max-width:100%}.section-kicker{color:#7f9386}.login-card h2{font-size:29px;font-weight:550;margin:15px 0}.login-card .muted{font-size:var(--text-size);margin-bottom:32px}.login-card label{display:block;font-size:var(--text-size);font-weight:600;margin-bottom:10px}.login-card input{width:100%;height:48px}.login-card .button{width:100%;margin-top:20px;height:46px;justify-content:space-between}.login-note{font-size:var(--text-size);color:#94a093;margin-top:23px;line-height:1.7}.login-card .error{margin-top:15px}.workspace{min-height:100dvh;display:grid;grid-template-columns:218px minmax(0,1fr)}.sidebar{background:var(--dark);color:#b4c8ba;padding:32px 20px;display:flex;flex-direction:column;position:sticky;top:0;height:100dvh}.sidebar .brand{padding-left:7px}.workspace-label{font-size:var(--text-size);letter-spacing:1px;color:#8eac9b;margin:43px 10px 12px}.profile-card{display:flex;align-items:center;gap:10px;padding:13px 10px;background:#244c3f;border:1px solid #365b4b;border-radius:10px;min-width:0}.profile-avatar{background:#52705a;color:#e0ecd7;border-radius:7px;width:31px;height:31px;display:grid;place-items:center;font-size:var(--text-size);flex-shrink:0}.profile-card>div{min-width:0;flex:1}.profile-card strong{font-size:var(--text-size);color:#eef3e9;display:block;overflow:hidden;text-overflow:ellipsis}.profile-card div>span{display:block;font-size:var(--text-size);color:#9ab49e;margin-top:5px;overflow:hidden;text-overflow:ellipsis}.live-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#8eba79;flex-shrink:0}.nav-label{margin-top:35px}nav{display:flex;flex-direction:column;gap:8px}.nav-item{display:flex;align-items:center;gap:11px;border-radius:8px;padding:12px 13px;color:#b5caba;background:transparent;text-align:left;width:100%;font-size:var(--text-size)}.nav-item>span:first-child{font-size:19px;width:18px}.nav-item.active{background:#d9ebc5;color:#1b4435;font-weight:600}.nav-item:not(.active):hover{background:#285042}.nav-arrow{margin-left:auto;font-size:15px}.sidebar-bottom{margin-top:auto;padding:28px 9px 0}.connection{font-size:var(--text-size);display:flex;align-items:center;gap:8px;margin-bottom:20px;color:#b1c4b4}.logout{background:none;color:#a9bfae;font-size:var(--text-size);padding:15px 0 0;border-top:1px solid #35594a;width:100%;text-align:left}.logout span{float:right}main{padding:32px 34px 15px;min-width:0}.page-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:27px;gap:16px}.breadcrumb{font-size:var(--text-size);color:#8b978d;display:flex;gap:12px;margin-bottom:21px}.breadcrumb span{color:#c0c9bc}.page-header h1{font-size:29px;font-weight:600;letter-spacing:-1px;line-height:1.3}.title-dot{color:#83a263;padding-left:4px}.page-header p{font-size:var(--text-size);color:#829083;margin-top:10px}.page-header .button{font-size:var(--text-size);align-self:flex-end}.archive{background:#fff;border:1px solid #e1e7dc;border-radius:13px;box-shadow:0 6px 22px #183b2310;overflow:hidden}.filter-bar{padding:20px 22px;display:flex;gap:12px;align-items:flex-end;border-bottom:1px solid var(--line);flex-wrap:wrap;background:#fff}.filter-field{display:flex;flex-direction:column;gap:8px;min-width:0;flex:1}.filter-field label{font-size:var(--text-size);color:#778879;font-weight:500}.filter-field input{width:100%;font-size:var(--text-size);height:39px}.keyword-field{flex:1.4}.search-wrap{position:relative}.search-wrap span{position:absolute;left:12px;top:7px;font-size:20px;color:#8f9e90}.search-wrap input{padding-left:35px}.filter-submit,.filter-bar .text-button{font-size:var(--text-size)}.filter-error{flex-basis:100%}.archive-grid{display:grid;grid-template-columns:300px minmax(0,1fr);height:calc(100vh - 280px);height:calc(100dvh - 280px);min-height:460px;max-height:1000px}.session-pane{border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:0;background:#fdfefb}.pane-heading{padding:22px 19px 13px;display:flex;justify-content:space-between;align-items:center}.pane-heading h2{font-size:var(--text-size);font-weight:600;display:flex;gap:8px;align-items:center}.count{font-size:var(--text-size);min-width:22px;text-align:center;padding:3px 6px;border-radius:5px;background:#e8eee3;color:#607853}.tiny-label{color:#96a28e;font-size:var(--text-size)}.sort-bar{display:flex;gap:8px;padding:0 18px 16px;border-bottom:1px solid var(--line)}.sort-bar select{font-size:var(--text-size);background:#f6f8f3;border-color:#e8ece3;padding:6px 5px;flex:1}.session-scroll{flex:1;overflow:auto;min-height:0;padding:9px}.session-list{display:flex;flex-direction:column;gap:5px}.session-card{display:block;padding:16px 12px;border:1px solid transparent;border-radius:8px;position:relative}.session-card:hover{background:#f1f5ed}.session-card.selected{background:#eaf1e1;border-color:#dce6cf}.session-card.selected:before{content:"";position:absolute;left:-1px;top:17px;bottom:17px;width:3px;background:#648c50;border-radius:3px}.session-card-top{display:flex;gap:8px;align-items:center;margin-bottom:10px}.session-icon{color:#7f9178;font-size:16px}.session-name{font-size:var(--text-size);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.session-card-time{font-size:var(--text-size);color:#85917e;line-height:1.6}.session-card-footer{display:flex;justify-content:space-between;align-items:center;margin-top:12px;font-size:var(--text-size);color:#8a9583;gap:8px}.source-label{font-size:var(--text-size);padding:3px 6px;border:1px solid #e1e7d8;background:#f8faf4;color:#718768;border-radius:4px;overflow:hidden;text-overflow:ellipsis;max-width:130px}.pane-footnote{padding:12px 19px;border-top:1px solid var(--line);font-size:var(--text-size);color:#99a48f}.conversation-pane{min-width:0;display:flex;background:#fff}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;text-align:center;padding:35px;gap:14px}.empty-glyph{font-size:30px;display:grid;place-items:center;width:65px;height:65px;border-radius:18px;background:#f0f4e9;color:#849c72;margin-bottom:5px}.empty-state h2{font-size:17px;font-weight:500}.empty-state p{font-size:var(--text-size);color:#93a08a;line-height:1.7}.conversation{display:flex;flex-direction:column;min-height:0;width:100%}.conversation-heading{padding:24px 27px 19px;display:flex;align-items:center;gap:15px;border-bottom:1px solid var(--line)}.conversation-title{flex:1;min-width:0}.conversation-title h2{font-size:16px;font-weight:600;margin:9px 0 7px;overflow-wrap:anywhere}.conversation-title p{font-size:var(--text-size);color:#94a08d;line-height:1.8}.source-tag{padding:5px 9px;background:#f3f6ee;border:1px solid #e3e9db;border-radius:5px;font-size:var(--text-size);color:#6f8562;max-width:100px;overflow:hidden;text-overflow:ellipsis}.conversation-note{padding:12px 27px;display:flex;align-items:center;gap:7px;background:#fcfdf9;font-size:var(--text-size);color:#87967c;border-bottom:1px solid #eff2e9;flex-wrap:wrap}.conversation-note>span:last-child{margin-left:auto;color:#a4ac9c}.message-scroll{overflow:auto;min-height:0;flex:1;padding:20px 27px 28px;scrollbar-width:thin;scrollbar-color:#dbe3d3 transparent}.messages{display:flex;flex-direction:column;gap:24px}.date-divider{display:flex;align-items:center;gap:12px;justify-content:center;font-size:var(--text-size);color:#9ba591;margin:1px 0}.date-divider:before,.date-divider:after{content:"";height:1px;background:#eef0e8;flex:1}.message{display:flex;gap:11px;align-items:flex-start}.message-avatar{height:31px;width:31px;border-radius:9px;background:#f0eae0;display:grid;place-items:center;font-size:var(--text-size);color:#8f8064;flex-shrink:0}.message.assistant .message-avatar{background:#e5eedb;color:#4d6e40}.message.tool .message-avatar,.message.system .message-avatar{background:#ebedf0;color:#697585}.message-body{flex:1;min-width:0}.message-label{display:flex;gap:9px;align-items:center;margin:2px 0 10px}.message-label strong{font-size:var(--text-size);font-weight:600}.message-label time{font-size:var(--text-size);color:#a0aa97}.message-detail{margin-left:auto;background:none;color:#8c9d82;padding:0 2px;font-size:var(--text-size);white-space:nowrap;min-height:24px}.message-detail:hover{color:#285638;text-decoration:underline}.message-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.9;font-size:var(--text-size);border:1px solid #eceee6;background:#fafbf7;border-radius:0 9px 9px 9px;padding:13px 16px;color:#4a5846}.assistant .message-text{background:#f1f6ea;border-color:#e7eedd}.message-text mark{background:#e2e5a5;border-radius:2px;color:inherit}.feedback{padding:18px;text-align:center;line-height:1.8;font-size:var(--text-size);color:#8c9982;overflow-wrap:anywhere}.feedback:empty{display:none}.feedback.error{color:#a43d31}.load-more{display:flex;width:calc(100% - 20px);margin:12px 10px;background:#f3f6ed;color:#6f825e;border:1px solid #e3e9d8;font-size:var(--text-size)}.load-more:hover{background:#e8efdd}.page-footer{display:flex;justify-content:space-between;gap:12px;margin-top:15px;color:#9ca693;font-size:var(--text-size);letter-spacing:.7px}.mobile-back{display:none}dialog{color:inherit;padding:0;border:1px solid #dfe5d8;background:#fff;box-shadow:0 20px 80px #15291930}dialog::backdrop{background:#102c234f;backdrop-filter:blur(2px)}.drawer{margin:0 0 0 auto;height:100dvh;max-height:100dvh;width:540px;max-width:100%;border-radius:15px 0 0 15px}.drawer[open],.status-dialog[open]{display:flex;flex-direction:column}.dialog-heading{display:flex;align-items:center;justify-content:space-between;padding:25px 27px;border-bottom:1px solid var(--line);gap:20px}.dialog-heading h2{font-size:21px;font-weight:550;margin-top:9px}.icon-button{background:#f3f6ee;border-radius:8px;width:34px;height:34px;font-size:25px;line-height:1;color:#7b8d70}.dialog-content{padding:25px 27px;overflow:auto;flex:1}.detail-fields{margin:0 0 26px;display:grid;grid-template-columns:105px minmax(0,1fr);font-size:var(--text-size);line-height:1.8;gap:13px}.detail-fields dt{color:#8d9b82}.detail-fields dd{margin:0;overflow-wrap:anywhere}.dialog-content h3{font-size:var(--text-size);font-weight:600;margin-bottom:12px}.detail-text{font-family:inherit;white-space:pre-wrap;overflow-wrap:anywhere;font-size:var(--text-size);line-height:1.9;background:#f7f9f2;border:1px solid #e8eddf;border-radius:8px;padding:15px;max-height:280px;overflow:auto;margin:0 0 25px}.raw-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.raw-heading h3{margin:0}.small{font-size:var(--text-size);min-height:30px;padding:6px 9px}.json-block{background:#183c30;color:#d5e3c7;padding:18px;border-radius:8px;font-size:var(--text-size);line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.status-dialog{width:510px;max-width:calc(100% - 30px);max-height:85dvh;border-radius:13px}.status-warnings{color:#a37032;font-size:var(--text-size);line-height:1.8;padding-left:18px}.status-dialog .button{margin-top:14px}@media(min-width:1600px){main{padding:38px 50px 18px}.archive-grid{grid-template-columns:340px minmax(0,1fr)}.message-text{font-size:var(--text-size)}.session-name{font-size:var(--text-size)}}@media(max-width:1200px){.workspace{grid-template-columns:185px minmax(0,1fr)}.sidebar{padding:28px 12px}main{padding:25px 22px 15px}.filter-bar{gap:9px;padding:16px}.filter-field{min-width:145px}.keyword-field{min-width:180px}.archive-grid{grid-template-columns:265px minmax(0,1fr)}.conversation-heading,.conversation-note{padding-left:20px;padding-right:20px}.message-scroll{padding:20px}.conversation-note>span:last-child{display:none}}@media(max-width:900px){.workspace{grid-template-columns:1fr}.sidebar{height:auto;position:static;padding:15px 22px;flex-direction:row;align-items:center;gap:20px}.sidebar .brand{font-size:22px;padding:0}.sidebar .brand-mark{height:30px;width:28px;font-size:20px}.workspace-label,.profile-card,.sidebar-bottom .connection{display:none}nav{flex-direction:row;margin-left:auto}.nav-item{white-space:nowrap;padding:8px 12px}.nav-arrow{display:none}.sidebar-bottom{padding:0;margin:0}.logout{padding:8px;border:0;font-size:var(--text-size)}.logout span{display:none}.page-header{margin-bottom:20px}.breadcrumb{margin-bottom:13px}.archive-grid{height:calc(100vh - 350px);height:calc(100dvh - 350px)}.login-story{padding:40px 10%}}@media(max-width:650px){.login-screen{grid-template-columns:1fr}.login-story{padding:25px 28px;min-height:270px;gap:30px}.login-story .brand{font-size:23px}.login-story h1{font-size:30px;letter-spacing:-1px}.login-story h1 br{display:none}.eyebrow{font-size:var(--text-size);margin-bottom:13px}.login-caption{margin-top:12px;font-size:var(--text-size)}.story-lines,.story-footer{display:none}.login-side{padding:35px 28px 45px}.login-card{width:100%}.login-card h2{font-size:25px}.sidebar{padding:13px 16px;gap:8px}.sidebar .brand{font-size:21px}.sidebar .brand-mark{display:none}nav{gap:0}.nav-item{font-size:var(--text-size);padding:8px}.nav-item>span:first-child{display:none}.sidebar-bottom .logout{font-size:var(--text-size);padding:5px}main{padding:20px 12px 12px}.page-header{padding:0 5px}.page-header h1{font-size:25px}.page-header p{font-size:var(--text-size)}.page-header .button{padding:8px 10px;font-size:var(--text-size)}.breadcrumb{font-size:var(--text-size);margin-bottom:14px}.filter-bar{padding:13px;gap:9px}.filter-field{min-width:0;flex:1 1 42%}.keyword-field{flex:1 1 100%}.filter-field input{font-size:var(--text-size);padding-left:8px;padding-right:8px}.search-wrap input{padding-left:31px}.filter-submit{flex:1}.filter-bar .text-button{flex:1}.archive-grid{display:block;height:600px;min-height:400px}.session-pane{height:100%;border-right:0}.conversation-pane{display:none;height:100%}.archive-grid.show-conversation .session-pane{display:none}.archive-grid.show-conversation .conversation-pane{display:flex}.mobile-back{display:inline-flex;background:#f2f5ec;padding:8px;min-height:32px}.conversation-heading{padding:19px 15px;gap:10px}.conversation-title h2{font-size:var(--text-size)}.conversation-note{padding:11px 15px}.message-scroll{padding:19px 14px}.message{gap:8px}.message-text{padding:11px 12px}.message-avatar{width:27px;height:27px}.page-footer{font-size:var(--text-size);letter-spacing:0;flex-wrap:wrap}.drawer{border-radius:0}.dialog-heading,.dialog-content{padding:22px}.session-card{padding:17px}.session-card-time{font-size:var(--text-size)}.session-name{font-size:var(--text-size)}}

.danger-outline{color:#a65245;border:1px solid #ead6d1;background:#fffaf7}.danger-outline:hover{background:#faede8}.danger{background:#a84e40;color:#fff}.danger:hover{background:#873d32}.delete-name{font-weight:600;overflow-wrap:anywhere;margin-bottom:14px}.delete-dialog .muted{font-size:var(--text-size);line-height:1.9}.delete-dialog .error{margin-top:14px}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.action-feedback{font-size:var(--text-size);line-height:1.8;padding:12px 16px;background:#eaf2e2;border:1px solid #dce7d0;border-radius:8px;margin-bottom:15px;color:#4f7141}@media(max-width:650px){.conversation-heading{flex-wrap:wrap}.conversation-heading .danger-outline{font-size:var(--text-size);padding:5px 8px;min-height:30px}.conversation-title{min-width:120px}}

.statistics{background:#fff;border:1px solid #e1e7dc;border-radius:13px;padding:22px;margin-bottom:22px;min-width:0}.statistics-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.statistics-heading h2{font-size:19px;margin:7px 0}.statistics-description,.statistics-footnote,.statistics-caption{font-size:var(--text-size);color:#829083;line-height:1.8}.statistics-total{display:flex;align-items:baseline;gap:8px;white-space:nowrap}.statistics-total strong{font-size:32px;color:var(--green);font-weight:600;font-variant-numeric:tabular-nums}.statistics-total span{font-size:var(--text-size);color:#829083}.statistics-controls{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;margin:18px 0 12px}.statistics-controls .filter-field{flex:0 1 180px}.statistics-controls .button{font-size:var(--text-size)}.statistics-scroll{overflow-x:auto;padding-top:8px;scrollbar-width:thin}.statistics-chart{display:flex;gap:8px;align-items:flex-end;min-width:100%;height:190px;border-bottom:1px solid var(--line);background:repeating-linear-gradient(to top,transparent 0,transparent 39px,#f1f4ed 39px,#f1f4ed 40px)}.statistics-column{flex:1 0 48px;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;height:100%;min-width:48px;gap:5px;position:relative}.statistics-value{font-size:var(--text-size);color:#56724b;font-variant-numeric:tabular-nums}.statistics-bar{display:block;width:68%;max-width:70px;min-height:2px;background:#789c62;border-radius:5px 5px 0 0}.statistics-column:hover .statistics-bar,.statistics-column:focus .statistics-bar{background:#315e43}.statistics-date{height:24px;flex-shrink:0;font-size:var(--text-size);color:#829083;background:#fff;width:100%;text-align:center;padding-top:5px}.statistics-footnote{margin-top:12px}.statistics-caption{margin-bottom:4px}.statistics .feedback{text-align:left;padding:10px 0}.statistics-description{max-width:410px}@media(max-width:650px){.statistics{padding:15px}.statistics-heading{align-items:flex-start;gap:10px}.statistics-total{flex-direction:column;gap:0}.statistics-total strong{font-size:27px}.statistics-controls .filter-field{flex:1 1 42%}.statistics-controls .button{flex:1;padding:9px}.statistics-description{font-size:var(--text-size)}.statistics-chart{height:175px}}

.message-format{margin-left:auto;background:none;color:#768d68;font-size:var(--text-size);padding:2px 5px;min-height:24px;white-space:nowrap}.message-format:hover{background:#e8efdf;border-radius:4px}.message-format+.message-detail{margin-left:0}.markdown-body{white-space:normal}.markdown-body>:first-child{margin-top:0}.markdown-body>:last-child{margin-bottom:0}.markdown-body p{margin:0 0 .85em}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{line-height:1.5;font-weight:650;margin:1.1em 0 .6em;color:#304d38;overflow-wrap:anywhere}.markdown-body h1{font-size:1.55em}.markdown-body h2{font-size:1.35em}.markdown-body h3{font-size:1.18em}.markdown-body h4,.markdown-body h5,.markdown-body h6{font-size:1em}.markdown-body ul,.markdown-body ol{padding-left:1.8em;margin:.6em 0 .9em}.markdown-body li{padding-left:.15em}.markdown-body li+li{margin-top:.25em}.markdown-body li p{margin:.3em 0}.markdown-body blockquote{margin:.8em 0;padding:.4em 1em;border-left:3px solid #9bb388;color:#6f8067;background:#e9efdf80}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body a{color:#356c50;text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}.markdown-body code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;background:#e6ecde;padding:.15em .35em;border-radius:4px;font-size:1em}.markdown-body pre{margin:.8em 0;padding:13px 15px;background:#1d3a30;color:#e1e9dc;overflow:auto;white-space:pre;border-radius:7px;line-height:1.7;max-height:420px;tab-size:4}.markdown-body pre code{color:inherit;background:none;padding:0;border-radius:0;overflow-wrap:normal;white-space:pre}.markdown-body hr{border:0;border-top:1px solid #dce5d3;margin:1em 0}.markdown-table{max-width:100%;overflow-x:auto;margin:.8em 0}.markdown-body table{border-collapse:collapse;font-size:inherit;min-width:100%;white-space:normal}.markdown-body th,.markdown-body td{border:1px solid #dce5d3;padding:7px 10px;min-width:75px;text-align:left}.markdown-body th{background:#eaf0e2;font-weight:600}.markdown-body tr:nth-child(even){background:#f7f9f2}.markdown-image-link{font-size:var(--text-size)}.markdown-body strong{font-weight:650}.markdown-body pre mark{color:#263522;background:#e2e5a5}

.markdown-body .markdown-align-center{text-align:center}.markdown-body .markdown-align-right{text-align:right}.markdown-body .markdown-align-left{text-align:left}

.clipboard-copy{position:fixed;left:0;top:0;width:1px;height:1px;opacity:0;pointer-events:none}

.message-status{display:flex;flex-wrap:wrap;gap:5px;align-items:center;margin:-3px 0 9px;font-size:var(--text-size);line-height:1.6}.message-status-caption{color:#71806c;margin-right:2px}.state-badge{border:1px solid #e0e5dc;border-radius:4px;padding:1px 6px;background:#f1f4ef;color:#52644d}.state-badge.active{background:#eef5e6;border-color:#dae6cc;color:#476332}.state-badge.inactive,.state-badge.unknown{background:#f2f3f4;border-color:#e1e4e6;color:#657078}.state-badge.compacted{background:#fff5e4;border-color:#ecdab7;color:#866122}.state-badge.summary{background:#eef0fa;border-color:#dcdff0;color:#5f6292}.source-state-note{font-size:var(--text-size);line-height:1.8;color:#74836d;margin-bottom:18px}.source-fields{grid-template-columns:minmax(0,145px) minmax(0,1fr)}.source-fields dt{overflow-wrap:anywhere}

/* Give nested scroll containers a definite size in WebKit, including iPad split view. */
.archive-grid{grid-template-rows:minmax(0,1fr)}
.conversation-pane{min-height:0;overflow:hidden}
.conversation{height:100%;max-height:100%;overflow:hidden}
.conversation-heading,.conversation-note{flex-shrink:0}
.message-scroll{height:0;flex:1 1 0px;overflow-y:auto;overflow-x:hidden;min-width:0;-webkit-overflow-scrolling:touch}
.session-scroll,.dialog-content{min-height:0;-webkit-overflow-scrolling:touch}
.drawer{height:100vh;max-height:100vh;height:100dvh;max-height:100dvh}

.drawer>.dialog-heading{flex-shrink:0}.drawer>.dialog-content{height:0;flex:1 1 0px;overflow-y:auto}

/* Form fields own their rows; native date controls cannot push into actions. */
.filter-bar,.statistics-controls{display:grid;align-items:end;gap:14px 12px}
.filter-bar{grid-template-columns:minmax(160px,1.2fr) repeat(2,minmax(210px,1fr)) auto}
.statistics-controls{grid-template-columns:repeat(2,minmax(180px,220px)) auto;justify-content:start}
.filter-bar .filter-field,.statistics-controls .filter-field{display:grid;grid-template-rows:auto 44px;gap:8px;min-width:0;width:100%;max-width:100%}
.filter-field label{display:block;line-height:1.5;overflow-wrap:anywhere}
.filter-field input{display:block;box-sizing:border-box;width:100%;min-width:0;max-width:100%;height:44px;min-height:44px;margin:0}
.filter-field input[type="date"],.filter-field input[type="datetime-local"]{-webkit-appearance:none;appearance:none;overflow:hidden}
.filter-field input::-webkit-date-and-time-value{min-width:0;text-align:left}
.search-wrap{min-width:0;max-width:100%;height:44px}
.search-wrap span{top:9px}
.form-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;min-width:0;max-width:100%}
.form-actions>.button{flex:0 0 auto;min-height:44px;max-width:100%;line-height:1.5}
.filter-error{grid-column:1 / -1}
@media(max-width:1200px){
 .filter-bar,.statistics-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
 .filter-bar .keyword-field,.form-actions{grid-column:1 / -1}
 .statistics-controls{justify-content:stretch}
}
@media(max-width:650px){
 .filter-bar{grid-template-columns:minmax(0,1fr)}
 .form-actions>.button{flex:1 1 auto}
 .filter-field input{font-size:16px}
}
@media(max-width:420px){
 .statistics-controls{grid-template-columns:minmax(0,1fr)}
}

.daily-card{background:#fff;border:1px solid #e1e7dc;border-radius:13px;padding:22px;margin-bottom:22px;min-width:0}.daily-schedule{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.daily-schedule h2,#daily-report-title{font-size:18px;margin-bottom:9px}.daily-schedule .muted,.daily-note{font-size:var(--text-size);line-height:1.8;color:#74836d;overflow-wrap:anywhere}.daily-note{margin:12px 0}.daily-controls{grid-template-columns:minmax(180px,300px) auto;margin-top:0}.daily-card .feedback{text-align:left;padding:12px 0}.daily-task{border:1px solid #dce5d3;background:#f4f8ef;border-radius:8px;padding:16px;margin-top:16px;font-size:var(--text-size);line-height:1.8;overflow-wrap:anywhere}.daily-task p{margin-top:6px}.daily-task.failed{background:#fff5ef;border-color:#ecd8cf}.daily-task.failed strong{color:#a43d31}#daily-result{margin-top:22px}#daily-report-body{font-size:var(--text-size);line-height:1.9;padding:20px;background:#fcfdf9}
@media(max-width:1200px){.daily-controls{grid-template-columns:minmax(0,1fr)}}
@media(max-width:900px){.sidebar{flex-wrap:wrap}.sidebar nav{order:3;flex-basis:100%;margin-left:0}.sidebar nav .nav-item{width:auto;flex:1;justify-content:center}.sidebar-bottom{margin-left:auto}}
@media(max-width:650px){.daily-card{padding:15px}.daily-schedule{align-items:flex-start}.daily-schedule .button{width:100%}#daily-report-body{padding:13px;font-size:var(--text-size)}}

#status-dialog{height:min(720px,85vh);height:min(720px,85dvh)}#status-dialog>.dialog-heading{flex-shrink:0}#status-dialog>.dialog-content{flex:1 1 0px;min-height:0;overflow-y:auto}

.gap-list{margin:16px 0;max-height:420px;overflow:auto;overscroll-behavior:contain}.gap-item{padding:16px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.gap-item p{white-space:pre-wrap;line-height:1.8;margin:8px 0}.gap-item .button{margin:5px 10px 5px 0}.gap-item details{line-height:1.8;margin:10px 0}.gap-details{margin:20px 0}.gap-details summary,#gap-rule-editor>summary{cursor:pointer;padding:12px 0}.gap-rule-form{display:flex;flex-direction:column;gap:12px;margin-top:16px}.gap-rule-form textarea{font:inherit;resize:vertical;width:100%;min-width:0;border:1px solid #dfe5dd;border-radius:8px;padding:12px;background:white}.gap-confirm{display:flex;align-items:center;gap:8px;line-height:1.6}.gap-rule-form .form-actions{display:flex;flex-wrap:wrap;gap:10px}.gap-rule-form .form-actions button{flex:0 1 auto}.daily-markdown{overflow-wrap:anywhere}.daily-markdown h1,.daily-markdown h2{margin:16px 0}.daily-markdown p,.daily-markdown ul,.daily-markdown blockquote{margin:12px 0}.daily-markdown blockquote{border-left:3px solid #abc3a0;padding-left:14px}.daily-markdown pre{overflow:auto}.daily-markdown table{display:block;overflow:auto}.daily-card>input[type=search]{margin-top:10px;width:100%}

.knowledge-form{display:flex;flex-direction:column;gap:12px;min-width:0;border:0;padding:0;margin:15px 0}.knowledge-form input:not([type=checkbox]),.knowledge-form textarea{box-sizing:border-box;font:inherit;max-width:100%;width:100%;min-width:0;border:1px solid #dfe5dd;border-radius:8px;padding:12px;background:white}.knowledge-form textarea{resize:vertical}.knowledge-form input[type=file]{font-size:var(--text-size)}.knowledge-grid{display:grid;grid-template-columns:minmax(220px,1fr) minmax(0,2fr);gap:22px;align-items:start}.knowledge-files{list-style:none;padding:0;overflow-wrap:anywhere}.knowledge-files li{padding:10px 0;border-bottom:1px solid var(--line);line-height:1.8;font-size:var(--text-size)}.knowledge-files button{margin:8px 0 0 10px}.knowledge-list{max-height:400px;overflow-y:auto;-webkit-overflow-scrolling:touch}.knowledge-list-item{display:flex;flex-direction:column;padding:14px 0;border-bottom:1px solid var(--line);text-decoration:none;color:inherit;overflow-wrap:anywhere}.knowledge-list-item:hover{background:#f4f8ef}.knowledge-list-item .daily-note{margin:4px 0}.knowledge-preview{font-size:var(--text-size);line-height:1.9;overflow-wrap:anywhere;margin-top:15px;min-width:0}#knowledge-detail h2{overflow-wrap:anywhere}#knowledge-detail details{margin:15px 0}#knowledge-view .feedback{text-align:left}#knowledge-detail summary{cursor:pointer}#knowledge-view .gap-confirm input{flex:0 0 auto;width:auto}.sidebar nav{min-width:0}
@media(max-width:1100px){.knowledge-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:650px){.knowledge-form input:not([type=checkbox]),.knowledge-form textarea{font-size:16px}.sidebar nav{flex-wrap:wrap}.sidebar nav .nav-item{flex:1 1 40%}}

/* Knowledge file editing shares the existing card and Markdown layout. */
.base-actions{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}.base-hash{overflow-wrap:anywhere}.base-raw{white-space:pre-wrap;overflow-wrap:anywhere;max-height:60vh;overflow:auto;-webkit-overflow-scrolling:touch}.base-history-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid var(--border,#e4e7eb)}#base-view{min-width:0}#base-view textarea{width:100%;box-sizing:border-box}#base-view select,#knowledge-view select{max-width:100%;padding:9px;border:1px solid #d6dbe3;border-radius:8px;background:white;color:inherit}

/* Explicit track sizes prevent long module names and Safari form controls from
   stretching tablet grid columns. Names and controls occupy separate rows. */
#base-view .knowledge-grid{grid-template-columns:minmax(0,1fr) minmax(0,1.35fr)}
#base-view .knowledge-grid>*{min-width:0;max-width:100%}
#base-view .daily-schedule>div{min-width:0;flex:1 1 240px}
#base-view h1,#base-view h2,#base-view h3,#base-view .daily-note,#audit-result a,#audit-result blockquote{overflow-wrap:anywhere;word-break:break-word}
#base-view .module-list-row{display:grid;grid-template-columns:20px minmax(0,1fr);column-gap:10px;row-gap:5px;align-items:start}
#base-view .module-list-row input[type=checkbox]{grid-column:1;grid-row:1;align-self:center;width:18px;height:18px;min-width:18px;padding:0;margin:0;box-sizing:border-box;appearance:auto;-webkit-appearance:checkbox}
#base-view .module-list-info{min-width:0;max-width:100%}
#base-view .module-name-button{display:block;appearance:none;-webkit-appearance:none;min-width:0;max-width:100%;width:100%;white-space:nowrap;text-align:left;line-height:1.6;overflow:hidden;text-overflow:ellipsis}
#base-view .module-application-state{display:block;margin-top:5px;min-width:0;font-size:var(--text-size);line-height:1.6;overflow-wrap:anywhere}
#base-view .assembly-part-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.assembly-part-name{display:block;min-width:0;max-width:100%;font-size:var(--text-size);line-height:1.6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.assembly-part-controls{display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-width:0;max-width:100%;flex:0 1 auto}
#base-view .assembly-part-controls select{flex:0 1 96px;width:96px;min-width:0;max-width:100%;box-sizing:border-box;font:inherit;line-height:normal}
#base-view .assembly-part-controls .button{flex:0 0 auto;min-height:36px;font-size:var(--text-size)}
#base-view .base-actions>.button{max-width:100%;white-space:normal;line-height:1.5}
.module-version-field{display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-width:0;margin:12px 0}
#base-view .module-version-field select{display:block;flex:0 1 320px;width:320px;min-width:0;max-width:100%;box-sizing:border-box;font:inherit}
#base-view .knowledge-form.daily-card{padding:22px;margin:0 0 22px;border:1px solid #e1e7dc}
#base-view .gap-confirm input[type=checkbox]{width:18px;height:18px;flex:0 0 18px;margin:0;padding:0}
#base-view .knowledge-preview pre,#knowledge-view .knowledge-preview pre{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
#base-view .knowledge-preview table,#knowledge-view .knowledge-preview table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
#base-view .knowledge-preview img,#knowledge-view .knowledge-preview img{max-width:100%;height:auto}
@media(max-width:1200px){#base-view .knowledge-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:650px){#base-view .knowledge-form.daily-card{padding:15px}#base-view select{font-size:16px}}

/* Shared reading size across all views. Short labels never shrink on mobile. */
body{line-height:1.6}
textarea{font:inherit}
pre,code,kbd,samp{font-size:var(--text-size)}
.page-header h1,.daily-schedule h1{font-size:var(--page-heading-size);line-height:1.35}
.login-card h2,.daily-card h2,.dialog-heading h2,.statistics-heading h2{font-size:var(--heading-size);line-height:1.4}
.pane-heading h2,.conversation-title h2,.empty-state h2,.dialog-content h3,.daily-schedule h2,#daily-report-title{font-size:1.15rem;line-height:1.5}
.message-label,.session-card-footer,.pane-heading,.page-footer{flex-wrap:wrap}
.message-label time{white-space:nowrap}
.message-format,.message-detail{flex-shrink:0}
.sort-bar select{min-width:0}
.statistics-column{flex-basis:84px;min-width:84px}
.statistics-date{height:auto;min-height:28px;white-space:nowrap}
.statistics-total{flex-wrap:wrap}
#module-heading{white-space:normal;overflow-wrap:anywhere}

/* Drag handles own touch gestures so the rest of each row still scrolls. */
.assembly-part-heading{display:flex;align-items:center;gap:10px;min-width:0;max-width:100%;flex:1 1 240px}
.assembly-part-heading .assembly-part-name{flex:1;min-width:0}
.assembly-drag-handle{flex:0 0 44px;width:44px;min-height:44px;padding:6px;touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.assembly-part-row{position:relative}
.assembly-part-row.dragging{background:#eff5e8;outline:1px dashed #648c50;outline-offset:-2px}
.assembly-part-row.dragging .assembly-drag-handle{cursor:grabbing}
.assembly-part-row.drop-before::before,.assembly-part-row.drop-after::after{content:"";position:absolute;left:0;right:0;height:3px;background:var(--green);border-radius:2px;pointer-events:none}
.assembly-part-row.drop-before::before{top:-2px}.assembly-part-row.drop-after::after{bottom:-2px}
#assembly-order-feedback:empty{display:none}

.knowledge-task-row{display:flex;align-items:center;gap:12px;min-width:0;border-bottom:1px solid var(--line);padding:8px 0}
.knowledge-task-row .knowledge-list-item{flex:1;min-width:0;overflow-wrap:anywhere;border:0}
.knowledge-task-row>.button{flex-shrink:0}
.audit-diff-module{border-top:1px solid var(--line);padding:20px 0;min-width:0}
.audit-diff-module h3,#audit-diff-state{overflow-wrap:anywhere}
.audit-diff-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;margin:12px 0;min-width:0}
.audit-diff-columns>section{min-width:0;padding:14px;border:1px solid var(--line);border-radius:8px}
.audit-diff-columns h3{font-size:var(--text-size)}
.audit-diff-columns pre{font-size:var(--text-size);white-space:pre-wrap;overflow-wrap:anywhere;max-height:60vh;overflow:auto;-webkit-overflow-scrolling:touch}
.diff-before,.diff-after{background:var(--surface,#fff)}
.audit-diff-change{margin:18px 0}
@media(max-width:650px){.audit-diff-columns{grid-template-columns:minmax(0,1fr)}}
@media(max-width:420px){.knowledge-task-row{align-items:flex-start;flex-direction:column}}

#audit-diff-result a,#audit-diff-result blockquote{overflow-wrap:anywhere;word-break:break-word}

.audit-diff-columns mark{font-weight:700;color:inherit;border-radius:2px;padding:1px 0}
.diff-before mark{background:#f6bdb4}.diff-after mark{background:#b9e0a6}

#module-delete-dialog .dialog-actions{flex-wrap:wrap}

/* Independent full-width steps: module selection, ordering, then reading panels. */
#base-view .base-workbench{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:22px;margin:18px 0 22px}
#base-view .base-workbench>.daily-card{min-width:0;max-width:100%;margin-bottom:0}
#base-view #module-list{margin-top:12px;max-height:32rem;max-height:min(50vh,32rem);overflow:auto;-webkit-overflow-scrolling:touch}
#assembly-publish-help:empty{display:none}
#assembly-publish:disabled{cursor:not-allowed}
#assembly-preview-panel,#publication-detail{min-width:0}
#assembly-preview-panel>label,#publication-detail>label,#base-view details>label{display:inline-block;margin:16px 10px 0 0}
#assembly-preview-content,#base-current-preview,#publication-preview{max-height:60vh;overflow:auto;padding:16px;border:1px solid var(--line);border-radius:8px;background:#fcfdf9;-webkit-overflow-scrolling:touch}
#assembly-preview-raw,#base-current-raw,#publication-raw{padding:16px;border:1px solid var(--line);border-radius:8px;background:#f7f8f5;line-height:1.8;font-size:var(--text-size);white-space:pre;overflow:auto;max-width:100%}
#base-view details>summary{cursor:pointer;line-height:1.8}
#publication-list .button{max-width:100%;white-space:normal;text-align:left;line-height:1.6}
#publication-parts{padding-left:24px;line-height:1.9;overflow-wrap:anywhere}
#publication-detail{border-top:1px solid var(--line);margin-top:18px;padding-top:18px}
#audit-result>.daily-card{background:#fcfdf9;margin-top:16px;margin-bottom:0;padding:18px}
#audit-result p{line-height:1.9;overflow-wrap:anywhere;margin-top:12px}
#audit-result blockquote{white-space:pre-wrap;max-height:20rem;overflow:auto;padding:12px;margin:12px 0;border-left:3px solid #abc3a0;background:#f3f6ef;line-height:1.8;-webkit-overflow-scrolling:touch}
@media(max-width:650px){#assembly-preview-content,#base-current-preview,#publication-preview,#assembly-preview-raw,#base-current-raw,#publication-raw{padding:12px}#audit-result>.daily-card{padding:12px}}
/* Progressive assembly workflow: only the active step and review view are shown. */
#assembly-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:20px 0}
#assembly-steps .button{min-width:0;white-space:normal;text-align:left;justify-content:flex-start;line-height:1.6}
#assembly-steps [aria-current=step],#assembly-review-tabs [aria-pressed=true]{background:var(--green);color:white;border-color:var(--green)}
.wizard-step{min-width:0}
#assembly-stale{border-color:#cfb77a;background:#fffaf0;line-height:1.8}
#assembly-stale .button{margin-top:12px;white-space:normal}
#assembly-selection-warning:empty,#assembly-audit-stale:empty,#assembly-preview-state:empty{display:none}
#assembly-audit-stale{color:#83531f;background:#fff7e9;border-radius:8px;padding:12px}
#assembly-complete{border-color:#a2c5ac}
#module-manager-list{margin-top:14px}
#module-manager-list .module-name-button{flex:1 1 240px;width:auto}
#module-manager-list span{flex:0 0 auto;font-size:var(--text-size)}
#module-peek-dialog{width:min(900px,calc(100vw - 32px))}
#module-peek-title{overflow-wrap:anywhere;min-width:0}
#module-peek-content{min-width:0;overflow-wrap:anywhere}
#module-peek-content pre,#module-peek-content table{display:block;max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch}
#module-peek-content img{max-width:100%}
#module-peek-manage{margin-top:16px}
@media(max-width:650px){#assembly-steps{gap:6px}#assembly-steps .button{padding:9px 8px}#assembly-review-tabs>.button{flex:1 1 auto}}
@media(min-width:651px) and (max-width:900px){.sidebar nav{flex-wrap:wrap}.sidebar nav .nav-item{flex:1 1 30%;min-width:0}}
.module-diff-controls{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:14px}
#module-diff-panel{margin:18px 0;padding:16px;border:1px solid var(--line);border-radius:10px;min-width:0}
.revision-diff-columns .diff-before mark{background:#ffe0dc;color:#842f25}
.revision-diff-columns .diff-after mark{background:#ddf1df;color:#215c33}
.revision-diff-columns pre{white-space:pre;overflow-wrap:normal;line-height:1.7;min-height:4em;overscroll-behavior:auto}
.diff-legend{grid-column:1/-1;margin:0}
.diff-removed{background:#ffe0dc;color:#842f25}
.diff-added{background:#ddf1df;color:#215c33}
.audit-diff-module>summary,.audit-issues>summary{cursor:pointer;line-height:1.8;overflow-wrap:anywhere}
.audit-issues{margin-top:16px}
#module-diff-panel .module-diff-controls .button{white-space:normal}

/* Full-width line backgrounds; generated markers never enter copied source. */
.diff-lines{display:block;width:max-content;min-width:100%}
.diff-line{display:block;position:relative;min-height:1.7em;padding:0 10px 0 26px}
.diff-line::before{content:attr(data-marker);position:absolute;left:7px;top:0;font-weight:700}
.diff-line-removed{background:#ffe0dc;color:#842f25}
.diff-line-added{background:#ddf1df;color:#215c33}
.revision-diff-columns .diff-line-removed mark{background:#f4b8b0}
.revision-diff-columns .diff-line-added mark{background:#b7dfba}
.diff-line-empty{min-width:10em}
.diff-line-empty::after{content:attr(data-placeholder);position:absolute;left:26px;top:0;font-style:italic}
.diff-line-ending{display:none}
