/* Approved workbench V2: navigation / account / conversation / context. */
:root{--red:#204d45;--nav:#173f38;--ink:#283c36;--muted:#7b8781;--line:#e4e8e2;--paper:#f1f3ef;--accent:#a56640}
body{font-size:14px;background:var(--paper)}button,input,select,textarea{font:inherit}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,a:focus-visible{outline:2px solid #a67955;outline-offset:3px}.sr-only{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%);padding:0!important;margin:0!important}button{transition:background .15s}.sidebar{width:204px;padding:32px 16px;color:#e9eee7}.brand{padding:0 8px;gap:11px;margin-bottom:48px}.brand strong{font-size:17px;letter-spacing:.4px}.brand small{font-size:11px;letter-spacing:3px;color:#a6bbb0;font-weight:400}.brand-mark.small{border:1px solid #8fa59b;width:34px;height:38px;background:none;color:#eee;border-radius:4px;font:24px Georgia,serif}.nav-label{font-size:10px;letter-spacing:2px;color:#90a99d}.sidebar nav button{border-left:0;min-height:45px;color:#b9cbc0;font-size:13px;padding:12px 14px}.sidebar nav button.active{background:#31564d;box-shadow:inset 2px 0 #c4956c;border:0}.sidebar nav button span{display:none}.sidebar-note{border-color:#3b5a50;font-size:12px}.sidebar-note p{display:none}.sidebar-note .role-label{display:block;margin-top:6px;font-size:11px}main{margin-left:204px;padding:0 32px;max-width:none}.topbar{height:64px;background:#fafbf8;margin:0 -32px;padding:0 32px;font-size:12px}.topbar>div{gap:12px}.topbar .muted{font-size:11px}.accountbar{display:flex;align-items:center;gap:13px;padding:24px 0}.account-avatar{width:44px;height:44px;border-radius:12px;background:#e3eadd;border:1px solid #d4ded1;display:grid;place-items:center;color:#547353;font:20px Georgia,serif;flex-shrink:0}.account-identity{min-width:0}.accountbar #home-chat-account{width:auto;max-width:320px;padding:0 20px 0 0;min-height:25px;border:0;background:transparent;font-size:17px;font-weight:600;border-radius:0}.accountbar p{font-size:11px;color:var(--muted);margin:4px 0 0}.account-actions{margin-left:auto;display:flex;align-items:center;gap:20px;font-size:11px;color:#5f776a}.account-actions .quiet{border:1px solid #d9e0d8;background:#fafbf8;padding:8px 14px;font-size:12px}.page-heading{padding:0 0 20px}.page-heading h1{font-size:21px}.page-heading p{font-size:12px}.status-strip{display:none}.work-area{display:grid;grid-template-columns:minmax(0,1fr) 282px;gap:0;align-items:stretch;padding:0;background:white;border:1px solid #dce2d9;border-radius:10px;overflow:hidden;min-height:640px}.work-area.is-chat{height:calc(100dvh - 186px)}.work-area:not(.is-chat){display:block;background:transparent;border:0;overflow:visible;min-height:0}.work-area>#home-chat{display:flex;flex-direction:column;min-width:0;min-height:0;border:0;border-radius:0;padding:0;overflow:hidden}.chat-heading{padding:24px 28px 20px;margin:0;gap:12px}.chat-heading h2{font-size:21px;letter-spacing:-.4px;margin:0}.chat-heading p{margin:6px 0 0;font-size:12px;color:var(--muted)}.subtle-tag{font-size:10px;white-space:nowrap}#work-overview-toggle{display:none}.chat-history{height:auto;max-height:none;flex:1;min-height:0;padding:24px 28px;overflow:auto}.chat-message{margin:0 0 25px}.chat-meta{font-size:11px;margin-bottom:8px}.chat-bubble{font-size:13px;line-height:1.9;max-width:94%}.chat-message.mine .chat-bubble{background:#edf2eb;border:1px solid #e4eadd;border-radius:9px 2px 9px 9px;padding:12px 16px}.chat-message.assistant .chat-bubble{border:0;background:none;padding:0 0 0 31px;max-width:100%}.chat-message.assistant .chat-meta{color:#3a594a}.chat-message.assistant .chat-meta:before{content:'文';display:inline-grid;place-items:center;width:23px;height:23px;background:#edf1e9;border-radius:7px;font-size:11px;margin-right:8px}.chat-wait{font-size:10px;color:var(--accent)}.chat-day{display:flex;align-items:center;gap:18px;color:#99a095;font-size:10px;margin-bottom:24px}.chat-day:before,.chat-day:after{content:'';height:1px;background:#eef0eb;flex:1}#home-chat-form{display:block;margin:0 24px 20px;border:1px solid #d9e0d4;border-radius:8px;padding:14px 16px 12px;box-shadow:0 3px 12px #28463505}#home-chat-form:focus-within{border-color:#819d83}#home-chat-body{border:0;border-radius:0;resize:vertical;outline:0;min-height:58px;max-height:180px;padding:0;font-size:13px;line-height:1.7}#home-chat-body::placeholder{color:#a0a69b}.composer-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:8px}.composer-bottom>span{font-size:10px;color:#8c9788}#home-chat-form button{margin:0;min-height:38px;font-size:12px;padding:8px 14px;border-radius:6px}#home-chat-form button:disabled{background:#e5e9e2;color:#808e7e;opacity:1}#home-chat-result{font-size:11px;margin:8px 0 0;color:var(--accent)}.empty{background:transparent;padding:65px 20px}.work-area>#view{background:#f7f8f3;border-left:1px solid #e1e6dc;padding:23px 22px;min-width:0;overflow:auto}.context-heading{display:flex;align-items:center;justify-content:space-between;font-size:10px;color:#8d9685}.context-heading h2{font-size:14px;margin:0;color:var(--ink)}.context-section{border-bottom:1px solid #e4e8dd;padding:24px 0}.context-section .eyebrow{font-size:10px;letter-spacing:0;color:#8d9685;margin-bottom:12px}.context-section h3{font-size:13px;line-height:1.7;font-weight:600;margin:0}.context-section p{font-size:12px;color:#7e8877;line-height:1.85;margin:9px 0 0;overflow-wrap:anywhere}.context-state{display:inline-block;font-size:11px;color:var(--green);background:#eaf0e2;padding:3px 7px;border-radius:4px;margin:14px 0 3px}.context-section .side-action{font-size:12px;padding:8px 0}.context-result{display:block;width:100%;text-align:left;padding:12px 0;border-bottom:1px solid #e7ebdf}.context-result strong{display:block;font-size:12px;font-weight:400;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.context-result small{display:block;color:#8c9683;font-size:10px;margin-top:5px}#view>.panel{display:block!important;background:transparent;border:0;border-bottom:1px solid #e4e8dd;border-radius:0;padding:18px 0;margin:0}#view summary{font-size:12px}#view .side-note{font-size:10px;line-height:1.9;margin:12px 0;color:#8d9785}.draft-card{margin:12px 0 25px 31px;border:1px solid #dae2d5;border-radius:7px;overflow:hidden;max-width:430px;background:#fcfdf9}.draft-top{padding:10px 15px;background:#f3f5ee;display:flex;justify-content:space-between;font-size:10px;color:#738369}.draft-main{padding:16px}.draft-main h3{font-size:14px;margin:0 0 10px;line-height:1.7}.draft-main p{font-size:12px;color:var(--muted);margin:0 0 10px}.draft-main button{font-size:12px;color:var(--red);padding:6px 0;min-height:36px}.panel{border-radius:8px;box-shadow:none}#rules-panel{display:grid;grid-template-columns:minmax(0,1fr) 282px;gap:20px}#rule-editor{padding:26px}#account-status{background:#f7f8f3}#rule-editor>label[for=rule-account],#rule-account{display:none}.profile-picker{margin:0 0 22px;padding:0 0 20px;border-top:0}.profile-picker #active-profile-status{font-size:12px;background:#edf2e8;padding:10px 12px;border-radius:5px;color:#4d6749}.rule-toggle{background:#f6f8f2;padding:12px 14px;font-size:13px}.settings-section summary{font-size:14px}.rule-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.network-panel{background:#f7f8f3;border:1px solid #e5e9df;padding:20px}#members-list{grid-template-columns:repeat(auto-fit,minmax(245px,1fr))}#members-list button{background:#fafbf7;border-radius:6px}#member-editor{margin-top:18px}#records-panel{padding:26px;min-height:540px}.record-categories{gap:24px}.record-row{padding:21px 0;grid-template-columns:80px minmax(0,1fr) 110px 105px 15px;gap:14px}.record-type{width:fit-content;background:#f0f3eb;padding:3px 8px;border-radius:4px;font-size:11px}.record-state,.record-row time{font-size:11px}.record-drawer{background:white;width:min(520px,100vw);box-shadow:-12px 0 45px #213c3915;padding:28px}.drawer-heading{background:white;top:-28px}.drawer-heading h2{font-size:18px}#record-detail h3{font-size:21px;line-height:1.6}#record-detail .text-content{font-size:13px;line-height:2;color:#607065}footer{padding:16px 0;font-size:10px}.login-form{box-shadow:0 10px 40px #243e3708}.login-copy h1{font-size:30px}
@media(max-width:1100px){.sidebar{width:170px;padding:28px 12px}.brand{padding:0}.brand strong{font-size:14px}.brand-mark.small{width:28px}main{margin-left:170px;padding:0 22px}.topbar{margin:0 -22px;padding:0 22px}.work-area{grid-template-columns:minmax(0,1fr) 230px}.work-area>#view{grid-column:2;grid-row:1;padding:22px 17px}.work-area>#home-chat{grid-column:1;grid-row:1}.chat-heading{padding:22px}.chat-heading h2{font-size:18px}.subtle-tag{display:none}.chat-history{padding:22px}#home-chat-form{margin:0 18px 18px}.composer-bottom>span{max-width:140px}.accountbar #home-chat-account{max-width:240px}.account-actions{gap:12px}#rules-panel{grid-template-columns:minmax(0,1fr) 230px}#rule-editor{grid-column:1;grid-row:2 / span 2}#account-status{grid-column:2;grid-row:2}.record-row{grid-template-columns:65px minmax(0,1fr) 95px 15px}.record-row time{display:none}}
@media(max-width:800px){.sidebar{position:static;width:100%;padding:12px 16px;flex-direction:row;align-items:center;gap:14px}.brand{margin:0;white-space:nowrap}.brand strong{font-size:13px}.brand small,.brand-mark.small,.nav-label,.sidebar-note{display:none}.sidebar nav{margin-left:auto;flex-direction:row;gap:2px}.sidebar nav button{font-size:12px;min-height:38px;flex:none;white-space:nowrap;padding:9px 10px}.sidebar nav button.active{box-shadow:inset 0 -2px #c4956c}main{margin:0;padding:0 12px}.topbar{height:42px;min-height:42px;margin:0 -12px;padding:0 16px;font-size:10px}.topbar>div{gap:3px}#last-sync{display:none}.topbar .quiet{font-size:10px;min-height:34px;padding:5px 7px}.accountbar{padding:17px 4px;gap:10px}.accountbar #home-chat-account{font-size:15px;max-width:190px;min-height:26px}.accountbar p{font-size:10px}.account-avatar{width:36px;height:38px;font-size:17px;border-radius:9px}.account-actions{font-size:10px;gap:0}.account-actions .quiet{display:none}.page-heading{padding:2px 4px 18px}.page-heading h1{font-size:19px}.page-heading p{font-size:11px}.work-area{display:flex;flex-direction:column;min-height:500px}.work-area.is-chat{height:calc(100dvh - 191px)}.work-area>#home-chat{flex:1;min-height:0}.work-area>#view{display:none;border-left:0;padding:20px}.work-area.show-overview>#view{display:block;flex:1;min-height:0}.work-area.show-overview .chat-history,.work-area.show-overview #home-chat-form{display:none}.work-area.show-overview>#home-chat{flex:none}.chat-heading{padding:17px 16px}.chat-heading h2{font-size:17px}.chat-heading p{font-size:10px}#work-overview-toggle{display:block;border:1px solid var(--line);font-size:10px;padding:6px 9px;min-height:36px;white-space:nowrap}.chat-history{padding:20px 16px}.chat-bubble{font-size:12px;max-width:100%}.chat-message.assistant .chat-bubble{padding-left:0}.draft-card{margin-left:0}.draft-main h3{font-size:13px}#home-chat-form{margin:0 12px 12px;padding:12px}#home-chat-body{font-size:12px;min-height:48px}.composer-bottom>span{font-size:9px;max-width:145px}#home-chat-form button{font-size:11px;min-height:38px;padding:8px 12px}#rules-panel{display:flex;flex-direction:column;gap:0}#rule-editor,#account-status{width:100%;padding:20px}.rule-grid{gap:8px 12px}.rule-grid input{min-width:0}.profile-picker{margin-top:0}#records-panel{padding:18px 14px}.record-row{grid-template-columns:53px minmax(0,1fr) 79px;gap:8px;padding:19px 0}.record-title{font-size:12px}.record-state{font-size:10px}.record-categories{gap:20px}.record-categories button{font-size:11px}.record-drawer{padding:24px}.drawer-heading{top:-24px}.record-drawer h2{font-size:17px}.panel{padding:20px}.login-shell{padding:30px 20px}.login-copy h1{font-size:26px}footer{font-size:9px;line-height:1.8}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
/* Global account selection is shared across all three work areas. */
#records-account{display:none}.filters label:has(#records-account){display:none}
