/* Shared application surfaces. Route and role guards are kept explicit below. */
:root{--navy:#102c3c;--navy-deep:#0d2331;--teal:#087f79;--teal-dark:#066762;--teal-soft:#e9f5f2;--ink:#1b3341;--muted:#71828d;--line:#e2e9ed;--paper:#fff;--canvas:#f5f7f9;--shadow:0 5px 24px #102c3c05;color-scheme:light}
*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:90px}body{margin:0;background:var(--canvas);color:var(--ink);font:14px/1.7 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;-webkit-font-smoothing:antialiased}a{color:var(--teal);text-decoration:none}a:hover{text-decoration:underline}button,input,textarea,select{font:inherit}button,a,input,textarea,select,summary{-webkit-tap-highlight-color:transparent}button{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--teal);border:1px solid transparent;border-radius:8px;color:#fff;cursor:pointer;padding:10px 18px;font-weight:600;margin:12px 8px 0 0;transition:background .16s,box-shadow .16s}button:hover:not(:disabled){background:var(--teal-dark)}button.secondary{background:#f1f6f7;color:#385966;border-color:#e1eaed}button.secondary:hover:not(:disabled){background:#e7eff1}button:disabled{opacity:.5;cursor:not-allowed}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #73bdb2;outline-offset:3px}input,textarea,select{width:100%;border:1px solid #d6e0e5;border-radius:8px;background:#fff;padding:11px 12px;color:var(--ink);transition:border .15s,box-shadow .15s}input::placeholder,textarea::placeholder{color:#94a2ab;font-weight:400}input:focus,textarea:focus,select:focus{outline:0;border-color:#69afa6;box-shadow:0 0 0 3px #087f7910}input[type=checkbox]{accent-color:var(--teal);width:auto}input[type=file]{font-size:13px;background:#f9fbfc}textarea{min-height:110px;resize:vertical}label{display:block;font-size:13px;font-weight:600;margin:18px 0 7px}h1,h2,h3,h4,p{overflow-wrap:anywhere}h1,h2,h3,h4{line-height:1.45}h2{font-size:26px;letter-spacing:-.03em;margin:0 0 10px;font-weight:650}h3{font-size:16px;margin:26px 0 12px}h4{font-size:15px}p{margin:10px 0}ul{padding-left:22px}.hint,.section-intro{color:var(--muted);font-size:13px}.section-intro{font-size:14px;margin:0 0 20px;line-height:1.8}.hidden,[hidden]{display:none!important}.sr-only,.skip-link:not(:focus){position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.skip-link:focus{position:fixed;top:10px;left:10px;background:#fff;padding:12px;z-index:2000}.ui-icon{width:18px;height:18px;flex:0 0 18px;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.eyebrow,.guide-kicker{display:block;font-size:10px;letter-spacing:.15em;font-weight:700;color:var(--teal);margin-bottom:10px}.status-dot{display:inline-block;flex:none;width:7px;height:7px;border-radius:50%;background:#58baa7;box-shadow:0 0 0 4px #58baa714}.soft-badge{display:inline-flex;align-items:center;white-space:nowrap;border:1px solid #dcebe7;background:#f3faf7;color:#458175;padding:4px 10px;border-radius:5px;font-size:11px}
/* Application frame */
.app-header{height:76px;position:sticky;top:0;z-index:30;display:flex;align-items:center;gap:32px;padding:0 32px;background:white;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:12px;color:var(--navy);min-width:238px}.brand:hover{text-decoration:none}.brand-symbol{display:grid;place-items:center;width:39px;height:42px;border-radius:12px 12px 12px 3px;background:var(--navy);color:#fff;font-size:21px;font-weight:500}.brand strong{display:block;letter-spacing:.08em;font-size:20px;line-height:1.4}.brand small{display:block;font-size:8px;font-weight:600;letter-spacing:.14em;color:#85969f}.header-context{display:flex;align-items:center;gap:12px;color:#6a7d88;font-size:13px}.environment-badge{font-size:10px;padding:1px 7px;color:#a17a3f;border:1px solid #ecdfc9;border-radius:4px;background:#fcf8f0}.header-actions{margin-left:auto;display:flex;align-items:center;gap:22px;white-space:nowrap;font-size:12px}.header-actions a{display:flex;align-items:center;gap:6px;color:#536a77}.header-actions .ui-icon{width:15px;height:15px;flex-basis:15px}.header-logout{display:none;margin:0;padding:5px 10px;background:#f5f7f8;color:#5a6b76;font-size:12px}.layout{display:grid;grid-template-columns:246px minmax(0,1fr);max-width:1800px;margin:0 auto;min-height:calc(100vh - 76px)}aside{background:var(--navy);color:#cedbe2;padding:31px 18px 22px;position:sticky;top:76px;align-self:start;height:calc(100vh - 76px);overflow:auto;display:flex;flex-direction:column;scrollbar-width:thin;scrollbar-color:#466171 transparent}.sidebar-brand{padding:0 14px 23px}.sidebar-brand .eyebrow{color:#729b9f;font-size:9px;margin-bottom:6px}.sidebar-brand strong{font-size:13px;color:#dbe7eb;font-weight:500}.card{background:var(--paper);border:1px solid var(--line);border-radius:13px;padding:28px;box-shadow:var(--shadow);margin-bottom:22px}.nav-card{border:0;box-shadow:none;padding:0;margin:0;background:transparent;border-radius:0}nav a{display:flex;align-items:center;gap:12px;padding:10px 13px;border-radius:7px;margin:3px 0;color:#b4c7d0;font-size:13px;font-weight:450;position:relative}nav a:hover{background:#ffffff08;color:#fff;text-decoration:none}nav a[aria-current=page]{background:#ffffff10;color:#fff;font-weight:600}nav a[aria-current=page]::after{content:"";position:absolute;right:12px;width:5px;height:5px;border-radius:50%;background:#6cceba}.nav-group{font-size:10px;color:#74919e;margin:21px 14px 8px;letter-spacing:.08em}.nav-group:first-child{margin-top:0}.nav-secondary{margin-top:20px!important;border:0!important;background:transparent!important;padding:0!important}.nav-secondary>summary{color:#7c99a7;padding:10px 14px;font-size:11px}.nav-secondary a{font-size:12px}.sidebar-note{margin:30px 13px 0;padding-top:23px;border-top:1px solid #ffffff12;font-size:11px;color:#7596a4}.sidebar-note .status-dot{width:5px;height:5px;margin-right:7px}.sidebar-note strong{color:#bbd2d8;font-size:11px;font-weight:500}.sidebar-note p{font-size:11px;line-height:1.8;margin:8px 0 12px}.sidebar-note a{font-size:11px;color:#8ab5b5}main{padding:28px 36px 40px;min-width:0}main:focus{outline:0}.page-context{display:flex;align-items:center;justify-content:space-between;font-size:11px;color:#91a0aa;margin-bottom:22px}.context-trail>span[aria-hidden]{margin:0 10px;color:#c0ccd3}#current-page-label{color:#4c6573}.context-note{font-size:10px;letter-spacing:.06em}.workspace-notice{display:flex;align-items:center;gap:10px;border:1px solid #e5ebee;background:#f9fbfc;padding:10px 15px;border-radius:7px;font-size:11px;line-height:1.7;color:#83929b;margin-bottom:25px}.notice-icon{flex:none;border:1px solid #aebfc9;border-radius:50%;width:14px;height:14px;text-align:center;line-height:13px;font-size:10px}.section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:24px}.section-heading h2{margin-bottom:8px}.section-heading .section-intro{margin:0}.section-heading>button{margin:0}.section-heading>.soft-badge{margin-top:18px}.message{color:#b34039;white-space:pre-wrap;overflow-wrap:anywhere}.message:empty{display:none}#error:not(:empty){position:sticky;top:86px;z-index:25;display:block;background:#fff1ef;border:1px solid #f2d1ca;border-radius:8px;padding:12px 16px;margin:0 0 20px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:26px}.item{border:1px solid #e0e9ed;border-radius:9px;border-left:3px solid #afd3cd;background:#fafcfc;margin:12px 0;padding:16px;overflow-wrap:anywhere;white-space:pre-wrap;font-size:13px;line-height:1.85}.item .item{background:white}.status{font-weight:600;color:var(--teal);padding:8px 0}.alert,.guide-boundary{background:#fcf8ef;border:1px solid #eee3cb;padding:13px 17px;border-radius:8px;font-size:12px;color:#907546;margin:15px 0}.guide-boundary strong{font-size:13px}.guide-boundary p{margin:5px 0 0}details{border:1px solid var(--line);border-radius:9px;padding:6px 16px;margin:17px 0;background:#fbfcfd}summary{cursor:pointer;color:#365763;font-size:13px;font-weight:550;padding:8px 0}.quick-start{display:flex;gap:10px;flex-wrap:wrap}.quick-start button{margin:0}.quick-start a,.task-new-links a{border:1px solid #dbe9e6;padding:11px 15px;border-radius:8px;background:#f5faf8;font-size:13px}.start-title{font-size:14px;font-weight:600;margin:22px 0 12px}.task-new-links{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:22px}.guide-grid,.identity-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}.guide-grid>div,.guide-grid article{border:1px solid var(--line);border-radius:10px;padding:8px 20px 20px}.guide-grid article>span{font-size:11px;color:var(--teal)}.guide-grid h4{margin:8px 0}.guide-grid p{font-size:13px;color:var(--muted)}.guide-grid a{font-size:12px}.guide-flow{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:20px 0}.guide-flow>div{background:#f5f9fa;border:1px solid var(--line);padding:16px;border-radius:8px}.guide-flow b{color:#91abae}.guide-flow strong,.guide-flow span{display:block;margin-top:6px}.guide-flow span{font-size:12px;color:var(--muted)}.primary-guide{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:28px 0}.primary-guide a{padding:24px;border:1px solid #dce9e5;background:#f5faf7;border-radius:10px}.primary-guide b{display:block;color:var(--teal);font-size:15px;margin-bottom:10px}.primary-guide span{font-size:13px;color:var(--muted)}.internal-guide{background:#fff}.internal-guide>summary{font-weight:600}.bridge-layout{display:grid;grid-template-columns:1fr 1fr;gap:20px}.bridge-panel{border:1px solid var(--line);padding:22px;border-radius:10px}.bridge-panel h3{margin-top:0}
/* Conversation workspace */
#chat{padding:0;border:0;box-shadow:none;background:transparent}#chat>.section-heading{padding:0 2px;margin-bottom:24px}.chat-workspace{display:grid;grid-template-columns:218px minmax(0,1fr);border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden;min-height:650px}.chat-history{padding:20px 15px;background:#f9fbfc;border-right:1px solid var(--line);min-width:0}.chat-history #chat-new{margin:0;width:100%;font-size:12px;background:var(--navy);padding:11px}.chat-history #chat-new:hover{background:#1e4757}.history-heading{display:flex;align-items:center;justify-content:space-between;margin:25px 4px 12px}.history-heading h3{font-size:11px;color:#899aa4;letter-spacing:.05em;font-weight:500;margin:0}.icon-button{margin:0;padding:4px;background:transparent;color:#78909c}.icon-button:hover:not(:disabled){background:#eaf0f1}.icon-button .ui-icon{width:14px;height:14px;flex-basis:14px}#chat-list{font-size:12px;color:#8a9ba5;max-height:400px;overflow:auto}#chat-list>button{width:100%;justify-content:flex-start;text-align:left;border:0;border-radius:6px;background:transparent;margin:2px 0;font-weight:400;color:#6c7e89;padding:9px 11px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#chat-list>button:hover{background:#edf3f4}#chat-list>button[aria-current=true]{background:#e8f3ef;color:#287a6a;font-weight:600}#chat-list>p{font-size:10px}.coverage-panel{background:transparent;border:0;border-top:1px solid var(--line);border-radius:0;padding:12px 3px;margin:28px 0 0}.coverage-panel>summary{font-size:10px;color:#81959f;font-weight:400}.coverage-panel .hint{font-size:11px;white-space:pre-line}.chat-stage{min-width:0;display:flex;flex-direction:column;padding:0 28px 18px}.chat-stage-heading{display:flex;gap:10px;align-items:center;min-height:58px;border-bottom:1px solid #f0f3f5}.chat-stage-heading h3{font-size:12px;color:#4c6471;margin:0;font-weight:500;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-stage-heading .status-dot{width:5px;height:5px}.stage-caption{font-size:10px;color:#98a8b1;white-space:nowrap}.chat-empty{padding:40px 0 24px;text-align:center;margin:auto 0}.assistant-mark{display:grid;place-items:center;margin:0 auto 17px;width:55px;height:55px;background:#edf7f3;color:var(--teal);font-size:32px;border:1px solid #dbeee7;border-radius:17px}.chat-empty .eyebrow{font-size:8px;color:#93a8a8;letter-spacing:.19em}.chat-empty h3{font-size:24px;letter-spacing:-.03em;font-weight:550;margin:12px 0;color:var(--navy)}.chat-empty p{font-size:12px;color:#94a1a8;line-height:1.9;margin:9px 0 24px}.chat-empty small{display:block;color:#a8b4bb;font-size:10px;margin-top:13px}.question-suggestions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.question-suggestions button{text-align:left;display:block;position:relative;padding:14px 12px;background:#fff;border:1px solid #e3eaed;border-radius:8px;margin:0;color:#536c79}.question-suggestions button:hover{background:#f5faf8;border-color:#b4d6cb}.question-suggestions button>span:first-child{font-size:9px;color:#91a49c;display:block;font-weight:400;margin-bottom:5px}.question-suggestions strong{font-size:11px;font-weight:500;display:block;padding-right:6px}.question-suggestions button>span:last-child{position:absolute;right:10px;top:11px;color:#9aafb5;font-size:11px}#chat-messages{padding-top:22px;padding-bottom:14px;min-width:0}#chat-messages:empty{display:none}.chat-turn{margin-bottom:28px;scroll-margin-top:95px}.message-label{display:flex;align-items:center;gap:8px;font-size:11px;color:#718996;font-weight:500;margin-bottom:9px}.message-avatar{width:24px;height:24px;display:grid;place-items:center;border-radius:7px;background:#eaf5ef;color:#217c68;font-size:12px}.user-message{background:#f3f7f9;border:1px solid #e8eef1;border-radius:10px 2px 10px 10px;padding:14px 17px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;margin-left:28px;color:#405c6b}.assistant-message{margin-top:22px}.answer-content{padding-left:32px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.95;font-size:13px;color:#385363}.answer-note{font-size:10px;color:#9aaab2;margin:10px 0 0 32px}.citation-group{margin:16px 0 0 32px}.citation-heading{font-size:11px;color:#7c968c;margin-bottom:8px}.citation-group details{padding:4px 12px;background:#f7faf8;border-color:#e3ece6;margin:8px 0}.citation-group summary{font-size:11px;color:#4c7d6c}.citation-group p{font-size:12px;white-space:pre-wrap;color:#70837a}.chat-composer{border:1px solid #cbded9;border-radius:11px;padding:13px 15px 10px;background:#fff;box-shadow:0 3px 12px #267e6d06;margin-top:auto}.chat-composer:focus-within{border-color:#74b4a4;box-shadow:0 0 0 3px #087f7909}.chat-composer label{font-size:10px;color:#9aabae;font-weight:400;margin:0 0 4px}.chat-composer textarea{border:0;box-shadow:none!important;padding:6px 0;min-height:86px;max-height:240px;resize:vertical;font-size:13px;line-height:1.8}.composer-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#a4b0b7;font-size:9px}.composer-toolbar button{margin:0;font-size:11px;padding:8px 13px;border-radius:6px}.composer-toolbar button span{font-size:15px;margin-left:4px}#chat-status{font-size:10px;margin:10px 2px 0;color:#839ba3;line-height:1.7}.runtime-details{background:transparent;border:0;padding:0;margin:7px 2px 0}.runtime-details summary{font-size:10px;color:#9baab2;padding:0;font-weight:400}.runtime-details .hint{font-size:11px}.chat-loading{display:flex;align-items:center;gap:8px;color:#4c8b7a;font-size:12px}.chat-loading::before{content:"";width:12px;height:12px;border:2px solid #c3e2d7;border-top-color:var(--teal);border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
/* Management overview and knowledge workflow */
#admin-home{background:transparent;border:0;box-shadow:none;padding:0}.admin-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin:28px 0 12px}.metric{display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:10px;padding:22px 22px 17px;color:var(--ink)}.metric:hover{border-color:#b2d1c6;text-decoration:none;box-shadow:0 4px 16px #102c3c05}.metric>span{font-size:12px;color:#7c8e99}.metric>strong{font-size:35px;font-weight:500;line-height:1.5;margin:11px 0;color:var(--navy);font-variant-numeric:tabular-nums}.metric:first-child>strong{color:var(--teal)}.metric>small{display:flex;justify-content:space-between;color:#99a7af;font-size:10px}.metric>small>span{color:#6c988b}#admin-summary{font-size:10px;color:#96a5ae;margin:12px 0 26px}.admin-dashboard-grid{display:grid;grid-template-columns:1.4fr 1fr;gap:22px}.dashboard-panel{border:1px solid var(--line);border-radius:11px;background:#fff;padding:25px}.panel-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}.panel-heading h3{margin:0;font-size:15px}.panel-heading .soft-badge{font-size:9px}.workflow-list>a{display:flex;align-items:center;gap:17px;padding:23px 0;border-bottom:1px solid #eff3f4;color:var(--ink)}.workflow-list>a:last-child{border-bottom:0}.workflow-list>a:hover{text-decoration:none}.workflow-list>a:hover strong{color:var(--teal)}.step-number{display:grid;place-items:center;width:34px;height:34px;flex:none;border:1px solid #e0ece5;background:#f3f9f5;border-radius:10px;color:#44836a;font-size:12px}.workflow-list strong{display:block;font-size:13px;font-weight:600}.workflow-list small{display:block;color:#91a0a9;font-size:11px;margin-top:4px}.step-arrow{margin-left:auto;color:#99afb3}.panel-note{border-radius:6px;background:#f5f8f9;color:#8a9ca7;font-size:10px;padding:9px 12px;margin-top:12px}.quality-panel{background:linear-gradient(150deg,#f9fcfb,#fff);padding:28px}.quality-panel .eyebrow{font-size:9px;margin-bottom:13px}.quality-panel h3{font-size:19px;margin:0 0 12px;font-weight:550}.quality-panel>p{font-size:12px;color:#8a9ca5;line-height:1.85;margin-bottom:24px}.dashboard-link{display:flex;align-items:center;gap:10px;padding:14px 0;border-bottom:1px solid #eaf0ee;color:#456c65;font-size:12px}.dashboard-link>span{margin-left:auto;color:#a4b8b4}.quality-panel>small{display:block;font-size:10px;color:#a2b0b7;margin-top:22px}.admin-bottom-row{display:flex;justify-content:space-between;gap:15px;margin:24px 0;color:#98a8b0;font-size:10px}.admin-bottom-row>a{color:#7c9c98}.records-toolbar{margin-bottom:14px}.records-toolbar h3{margin-top:0}.records-toolbar input{font-size:12px;background:#fbfcfd}.records-toolbar>span{font-size:11px}.records-toolbar+ #documents{max-height:500px;overflow:auto;padding-right:4px}#knowledge .grid{grid-template-columns:minmax(260px,.8fr) minmax(0,1.2fr);gap:26px}#knowledge-intake{margin-top:0}#knowledge-intake[open]>summary{padding-bottom:14px;border-bottom:1px solid var(--line)}#doc-review{margin-top:20px;padding-top:4px;border-top:1px solid var(--line)}#chat-grant-panel{padding:16px 20px;background:#f3f9f6;border:1px solid #dcebe1;border-radius:9px;margin:22px 0}#chat-grant-panel h3{margin-top:0}.identity-page details{margin-top:22px}.identity-page .item:empty{display:none}.help-action-group{display:inline-flex;align-items:center;white-space:normal}.feature-help{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;width:17px;height:17px;min-width:17px;margin:0 4px;padding:0;border:1px solid #cbdadf;border-radius:50%;background:#fff;color:#91a5af;font:600 10px/1 system-ui}.feature-help:hover:not(:disabled),.feature-help[aria-expanded=true]{background:var(--teal);color:white}.hidden+.feature-help{display:none}.feature-tooltip{position:fixed;z-index:1000;width:max-content;max-width:min(370px,calc(100vw - 24px));max-height:calc(100vh - 24px);overflow:auto;padding:14px 17px;border-radius:9px;background:var(--navy);color:#fff;box-shadow:0 10px 30px #102a3d35;font-size:12px;line-height:1.9;white-space:pre-line}
/* Login */
.login-form .account-card{box-shadow:none;border:0;padding:0;margin:0}.login-form .account-card>details{border:0;background:transparent;padding:0;margin:0}.login-form .account-card>details>summary{display:none}.login-form>h2{font-size:27px;margin-top:9px}.login-form>.eyebrow{font-size:9px;color:#a4b1b8}.login-form{padding:46px 48px;background:#fff}.login-form .section-intro{font-size:12px;margin-bottom:24px}.login-form #login{width:100%;padding:12px;margin:22px 0 0}.login-form #logout{display:none}.login-form #access-status{display:none}.login-form #login-status{font-size:11px}.login-form label{font-size:12px}.login-form details details{padding:4px 12px;background:#f9fbfc}.login-form summary{font-size:11px}.login-copy{padding:50px 48px;background:var(--navy);color:#fff;position:relative;overflow:hidden;display:flex;flex-direction:column}.login-copy::after{content:"";position:absolute;width:350px;height:350px;border:1px solid #ffffff0b;border-radius:50%;right:-170px;top:180px;box-shadow:0 0 0 60px #ffffff03,0 0 0 120px #ffffff02;pointer-events:none}.login-tag{align-self:start;color:#9abebd;font-size:10px;letter-spacing:.07em}.login-copy h2{font-size:34px;font-weight:500;line-height:1.6;margin:40px 0 14px;letter-spacing:0}.login-copy>p{font-size:13px;line-height:2;color:#93adb9;margin:0}.login-benefits{display:grid;gap:20px;margin:40px 0;color:#598c8e;font-size:10px;letter-spacing:.08em}.login-benefits b{font-weight:400;color:#bcced3;font-size:12px;letter-spacing:0;margin-left:15px}.login-copy>small{margin-top:auto;color:#678b9b;font-size:10px}.login-form #demo-login-notice{background:#f2f9f6;border-radius:6px;padding:8px 11px;font-size:10px;color:#7e9d90}
/* Existing route and access contracts */
main>section{display:none}
html[data-section=route-login] main>#route-login,html[data-section=route-not-found] main>#route-not-found,html[data-section=settings] main>#settings,html[data-section=platform-guide] main>#platform-guide,html[data-section=admin-home] main>#admin-home,html[data-section=my-work] main>#my-work,html[data-section=chat] main>#chat,html[data-section=conversations] main>#conversations,html[data-section=mock-devices] main>#mock-devices,html[data-section=cases] main>#cases,html[data-section=tasks] main>#tasks,html[data-section=knowledge] main>#knowledge,html[data-section=sources] main>#sources,html[data-section=feedback] main>#feedback,html[data-section=release] main>#release,html[data-section=organizations] main>#organizations,html[data-section=users] main>#users,html[data-section=audit] main>#audit,html[data-section=overview] main>#overview,html[data-section=bridge] main>#bridge,html[data-section=service-home] main>#service-home{display:block}
html[data-view=user] .admin-only,html[data-view=user] #bridge,html[data-view=user] #sources,html[data-view=user] #release,html[data-view=user] #identity,html[data-view=user] #overview{display:none!important}html[data-view=admin] .user-only,html[data-view=admin] #my-work,html[data-view=admin] #conversations,html[data-view=admin] #mock-devices,html[data-view=admin] #chat{display:none!important}html[data-view=admin]:not([data-admin-access=allowed]) main>section:not(#route-login){display:none!important}html[data-role=reviewer] .admin-role,html[data-view=admin][data-admin-access=forbidden] .identity-page{display:none!important}.external-only{display:none}html[data-role=enterprise] .external-only,html[data-role=individual] .external-only{display:block}html[data-role=enterprise] nav>*:not(.external-only):not(.chat-nav),html[data-role=individual] nav>*:not(.external-only):not(.chat-nav){display:none!important}html[data-role=enterprise] header .admin-only,html[data-role=individual] header .admin-only{display:none!important}
#login-welcome{display:none}html[data-view=admin]:not([data-admin-access=allowed]) #login-welcome{display:block}html[data-view=admin][data-admin-access=forbidden] #login-welcome{display:none}
html[data-task-page=list] #task-form,html[data-task-page=list] #result,html[data-task-page=new] #task-lists,html[data-task-page=new] #result,html[data-task-page=detail] #task-form,html[data-task-page=detail] #task-lists{display:none!important}html[data-task-page=detail] .task-new-links{display:none}html[data-case-page=list] #case-detail-pane,html[data-case-page=detail] #case-list-pane{display:none!important}#cases .grid{grid-template-columns:1fr}html[data-conversation-page=list] #conversation-detail-pane{display:none!important}html[data-conversation-page=detail] #conversation-list,html[data-conversation-page=detail] #conversations>details{display:none}html[data-device-page=list] #device-detail-pane,html[data-device-page=detail] #device-list-pane{display:none}.knowledge-version-area{display:none}html[data-knowledge-page=versions] #knowledge .grid>div:first-child,html[data-knowledge-page=versions] #knowledge .grid>div:nth-child(2)>:not(.admin-only),html[data-knowledge-page=versions] #knowledge .grid>div:nth-child(2)>.admin-only>:not(.knowledge-version-area){display:none}html[data-knowledge-page=versions] .knowledge-version-area{display:block}html[data-knowledge-page=versions] #knowledge .grid{display:block}html[data-view=user] #knowledge .grid{grid-template-columns:1fr}html[data-view=user] .user-document-pane{display:none}html[data-view=user][data-knowledge-page=detail] .user-document-pane{display:block}html[data-view=user][data-knowledge-page=detail] #user-documents,html[data-view=user][data-knowledge-page=detail] #knowledge .grid>div:nth-child(2)>h3,html[data-view=user][data-knowledge-page=detail] #knowledge .grid>div:nth-child(2)>label,html[data-view=user][data-knowledge-page=detail] #search-query,html[data-view=user][data-knowledge-page=detail] #search-mode,html[data-view=user][data-knowledge-page=detail] #search-doc,html[data-view=user][data-knowledge-page=detail] #search-results{display:none}html[data-release-page=evaluation] .version-area{display:none}html[data-release-page=version] .evaluation-area{display:none}html[data-session=active] .header-logout{display:inline-flex}html:not([data-session=active]) .login-form label[for=org-select],html:not([data-session=active]) .login-form #org-select{display:none}html[data-session=active] .login-form #logout{display:inline-flex}
html[data-section=route-login] .layout{display:block;max-width:1100px;min-height:0;margin:6vh auto}html[data-section=route-login] aside,html[data-section=route-login] main>.workspace-notice,html[data-section=route-login] #login-welcome,html[data-section=route-login] .page-context{display:none!important}html[data-section=route-login] main>.login-page{display:grid!important;grid-template-columns:1.05fr 1fr;padding:0;overflow:hidden;min-height:570px;border:1px solid #e0e6ea;box-shadow:0 16px 70px #1232420b;border-radius:16px}html[data-section=route-login] main{padding:0 24px 40px}#mobile-nav-toggle{display:none}
/* Responsive layouts */
@media(min-width:1600px){main{padding-left:48px;padding-right:48px}.chat-workspace{min-height:710px}.chat-stage{padding-left:40px;padding-right:40px}.chat-empty{padding-top:55px;padding-bottom:38px}}
@media(max-width:1200px){.app-header{padding:0 24px;gap:20px}.brand{min-width:205px}.layout{grid-template-columns:218px minmax(0,1fr)}main{padding:24px}.chat-stage{padding-left:22px;padding-right:22px}.chat-workspace{grid-template-columns:180px minmax(0,1fr)}.keyboard-hint{display:none}.question-suggestions{grid-template-columns:1fr}.question-suggestions button{padding:10px 13px;display:flex;gap:12px;align-items:center}.question-suggestions button>span:first-child{margin:0;min-width:42px}.question-suggestions strong{font-size:11px}.chat-empty{padding-top:26px}.chat-empty h3{font-size:22px}.admin-metrics{gap:10px}.metric{padding:17px 14px}.metric small{font-size:9px}.admin-dashboard-grid{grid-template-columns:1fr}.workflow-list>a{padding:20px 0}.guide-flow{grid-template-columns:repeat(3,minmax(0,1fr))}.header-actions{gap:15px}}
@media(max-width:900px){.header-context{display:none}.brand{min-width:0}.layout{grid-template-columns:190px minmax(0,1fr)}aside{padding:26px 12px}.sidebar-brand{padding-left:10px}.sidebar-brand strong{font-size:12px}nav a{font-size:12px;padding-left:10px}.chat-workspace{grid-template-columns:minmax(0,1fr)}.chat-history{border-right:0;border-bottom:1px solid var(--line);padding:12px 16px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}.chat-history #chat-new{width:auto;font-size:11px;padding:8px 12px}.history-heading{margin:0}.history-heading h3{display:none}#chat-list{display:flex;gap:6px;max-height:72px;overflow:auto;flex:1;min-width:100px}#chat-list>button{width:auto;max-width:160px;flex:none;font-size:11px;margin:0;padding:7px}.coverage-panel{margin:0;padding:0;border:0;flex-basis:100%}.coverage-panel[open]{max-height:160px;overflow:auto}.chat-stage{min-height:550px}.grid,#knowledge .grid,.bridge-layout{grid-template-columns:minmax(0,1fr)}.admin-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.section-heading>.soft-badge{display:none}.primary-guide{grid-template-columns:1fr}.primary-guide a{padding:18px}.guide-flow{grid-template-columns:repeat(2,minmax(0,1fr))}.login-form{padding:36px}.login-copy{padding:40px}.login-copy h2{font-size:29px}.context-note{display:none}}
@media(max-width:700px){.app-header{height:64px;padding:0 18px;gap:14px}.brand-symbol{width:30px;height:34px;font-size:18px;border-radius:9px 9px 9px 2px}.brand{gap:8px}.brand strong{font-size:17px}.brand small{font-size:6px}.header-actions{gap:12px;font-size:10px}.header-actions .ui-icon{display:none}.header-logout{font-size:10px;padding:4px 7px}.header-actions>a:last-of-type{display:none}.layout{display:block;min-height:calc(100vh - 64px)}aside{position:relative;top:0;height:auto;max-height:none;padding:10px 16px}.sidebar-brand,.sidebar-note{display:none}#mobile-nav-toggle{display:inline-flex;background:#ffffff0c;color:#baceD6;font-size:12px;margin:0;padding:7px 12px;border:1px solid #ffffff15;width:100%;justify-content:space-between}#mobile-nav-toggle::after{content:"⌄"}nav{display:none;padding-top:16px}nav.is-open{display:block}nav a{padding:11px 13px;font-size:13px}.nav-group:first-child{margin-top:2px}.nav-secondary{margin-top:10px!important}main{padding:20px 16px 28px}.page-context{margin-bottom:16px;font-size:10px}.workspace-notice{font-size:10px;padding:9px 11px;margin-bottom:22px;align-items:flex-start}.notice-icon{margin-top:2px}.card{padding:22px 18px;border-radius:10px}h2{font-size:23px}.section-heading{gap:10px;margin-bottom:20px}.section-heading .section-intro{font-size:12px}.section-heading .eyebrow{font-size:8px}#chat>.section-heading{margin-bottom:20px}.chat-workspace{border-radius:10px;min-height:0}.chat-stage{padding:0 18px 15px;min-height:590px}.stage-caption{font-size:9px}.chat-stage-heading h3{font-size:11px}.chat-empty{padding:29px 0 25px}.chat-empty h3{font-size:22px}.chat-empty p{font-size:12px}.chat-empty .eyebrow{font-size:7px}.question-suggestions{gap:7px}.question-suggestions button{padding:12px 10px}.question-suggestions strong{font-size:11px}.chat-composer{padding:11px 12px 9px}.chat-composer textarea{font-size:13px;min-height:90px}.chat-composer label{font-size:9px}.composer-toolbar button{padding:8px 11px}.chat-history{gap:8px}#chat-list>button{max-width:130px}.coverage-panel>summary{font-size:9px}#chat-status{font-size:10px}.answer-content{padding-left:0;font-size:13px}.citation-group{margin-left:0}.answer-note{margin-left:0}.user-message{margin-left:18px}.admin-metrics{gap:10px;margin-top:22px}.metric{padding:17px 15px}.metric>span{font-size:11px}.metric>strong{font-size:30px;margin:6px 0}.metric>small{font-size:9px}.admin-dashboard-grid{gap:16px}.dashboard-panel{padding:22px 18px}.panel-heading{align-items:flex-start;flex-wrap:wrap}.panel-heading h3{font-size:14px}.workflow-list>a{gap:12px;padding:19px 0}.workflow-list small{font-size:10px}.workflow-list strong{font-size:12px}.step-number{width:29px;height:29px;font-size:11px}.admin-bottom-row{font-size:9px;flex-wrap:wrap}.section-heading>button{font-size:10px;padding:8px 11px;white-space:nowrap}.section-heading>button .ui-icon{width:13px;height:13px;flex-basis:13px}.guide-flow{grid-template-columns:1fr}.guide-grid,.identity-grid{grid-template-columns:1fr}.task-new-links a{font-size:11px;padding:8px 10px}.help-action-group{max-width:100%}.item{padding:13px 12px;font-size:12px}.grid{gap:18px}input,textarea,select{font-size:16px}label{font-size:12px}button{font-size:12px;padding:10px 13px}#error:not(:empty){top:72px;font-size:12px}html[data-section=route-login] .layout{margin:20px auto}html[data-section=route-login] main{padding:0 16px 30px}html[data-section=route-login] main>.login-page{grid-template-columns:1fr;min-height:0}.login-copy{padding:30px}.login-copy h2{font-size:26px;line-height:1.5;margin:22px 0 12px}.login-copy>p{font-size:12px}.login-benefits{gap:10px;margin:20px 0}.login-copy>small{font-size:9px}.login-form{padding:30px}.login-form>h2{font-size:24px}.login-form input{font-size:16px}.login-copy::after{top:100px}.quality-panel h3{font-size:18px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{transition:none!important;animation:none!important}}
/* Readability and detail-page hierarchy */
.workspace-notice{color:#647b88;font-size:12px}.section-intro{color:#647b88}.context-trail{color:#748b98}.chat-empty p{font-size:13px;color:#748894}.question-suggestions strong{font-size:12px;color:#45616e}.question-suggestions button>span:first-child{font-size:10px;color:#65877c}.chat-empty small{color:#788f9a;font-size:11px}.composer-toolbar{color:#7c919c;font-size:10px}.chat-composer label{color:#708b97;font-size:11px}.chat-composer textarea::placeholder{color:#8296a1}.stage-caption{color:#7e959f}.runtime-details summary{color:#778e9a;font-size:11px}.metric>span{color:#607b8a;font-size:13px}.metric>small{color:#708b98;font-size:11px}.workflow-list small{font-size:12px;color:#738b98}.quality-panel>p{font-size:13px;color:#738b98}.panel-note,.quality-panel>small{font-size:11px;color:#728b98}#admin-summary{font-size:11px;color:#7a919e}.admin-bottom-row{font-size:11px;color:#7a919e}.history-heading h3{font-size:12px;color:#758d9a}.coverage-panel>summary{font-size:11px;color:#748d98}#chat-status{font-size:11px;color:#617d8b}.knowledge-steps{display:flex;align-items:center;gap:18px;background:#f6faf8;border:1px solid #e2ece6;border-radius:8px;padding:12px 17px;margin:18px 0;font-size:12px;color:#608174}.knowledge-steps b{font-size:10px;font-weight:500;color:#8cac9b;margin-right:5px}.knowledge-steps i{color:#b1c4ba;font-style:normal}.back-link{font-size:12px}.records-toolbar+ #documents .item:first-child{margin-top:0}html[data-view=admin][data-knowledge-page=detail] #knowledge .grid{display:block}html[data-view=admin][data-knowledge-page=detail] #knowledge-intake,html[data-view=admin][data-knowledge-page=detail] .records-toolbar,html[data-view=admin][data-knowledge-page=detail] #documents{display:none}html[data-view=admin][data-knowledge-page=detail] #doc-review{border-top:0;margin-top:0;padding-top:0;max-width:900px}html[data-knowledge-page=versions] .knowledge-steps{display:none}#context-status:empty+#cancel-context,#context-status:empty+#cancel-context+.feature-help,#supplement-status:empty+#cancel-supplement,#supplement-status:empty+#cancel-supplement+.feature-help{display:none}
@media(max-width:700px){.workspace-notice{font-size:11px}.question-suggestions strong{font-size:12px}.stage-caption{font-size:10px}.metric>span{font-size:12px}.metric>small{font-size:10px}.workflow-list small{font-size:11px}.knowledge-steps{font-size:10px;gap:9px;padding:11px}.knowledge-steps b{font-size:9px;margin-right:2px}.admin-bottom-row{font-size:10px}}
@media(max-width:700px){.card.nav-card{padding:0}}
html[data-role=enterprise] .staff-entry,html[data-role=individual] .staff-entry,html[data-role=enterprise] .internal-guide,html[data-role=individual] .internal-guide{display:none!important}
/* Keep the question field within reach on a phone; examples remain horizontally browsable. */
@media(max-width:700px){
  .chat-stage{min-height:0}.chat-stage-heading{min-height:46px}.chat-empty{padding:18px 0 15px;margin:0}.chat-empty .assistant-mark,.chat-empty>.eyebrow,.chat-empty>p,.chat-empty>small{display:none}.chat-empty h3{font-size:18px;margin:0 0 15px}.question-suggestions{display:flex;overflow-x:auto;gap:8px;padding-bottom:5px;scroll-snap-type:x proximity;text-align:left}.question-suggestions button{flex:0 0 auto;padding:9px 11px;scroll-snap-align:start}.question-suggestions button>span:first-child{display:none}.question-suggestions button>span:last-child{position:static;margin-left:10px}.question-suggestions strong{font-size:11px;padding:0}.chat-composer textarea{min-height:76px}.chat-history{padding:12px 15px}.chat-stage>#chat-messages:empty{padding:0}.chat-stage #chat-status:empty{display:none}
}

html[data-section=general-knowledge] main>#general-knowledge{display:block}#kb-unit-list textarea{min-height:180px}#kb-summary{margin:12px 0}#kb-files button{margin-right:8px}

html[data-view=admin][data-section=model-settings] main>#model-settings{display:block!important}
html[data-section=model-settings] #login-welcome{display:none}
html:not([data-platform-superadmin=true]) .platform-superadmin-only{display:none!important}
