/* Visual/interaction additions only. No authentication, API or data changes. */
.view-base,.view-bots{
  --wk-xs:.8125rem;--wk-sm:.875rem;--wk-base:1rem;--wk-lg:1.25rem;
  --wk-title:clamp(1.5rem,1.25rem + 1vw,2.25rem);
  --wk-1:4px;--wk-2:8px;--wk-3:12px;--wk-4:16px;--wk-5:20px;--wk-6:24px;--wk-8:32px;
  background:var(--bg);color:var(--ink)
}
.view-base{
  --bg:#f6f6ef;--bg-2:#f0f1e7;--panel:#fffffc;--panel-2:#eeefe3;
  --ink:#2e3423;--muted:#5d6450;--faint:#646c57;
  --green:#606e37;--green-2:#4b5929;--green-soft:rgba(96,110,55,.1);
  --line:#dce0cf;--line-2:#bdc5a9
}
[data-theme="dark"] .view-base{
  --bg:#161a13;--bg-2:#1d2418;--panel:#20271b;--panel-2:#293222;
  --ink:#edf0e5;--muted:#bcc5ae;--faint:#aebba0;
  --green:#c0d38f;--green-2:#d2e4a6;--green-soft:rgba(192,211,143,.1);
  --line:#36442d;--line-2:#526343
}
.view-bots{
  --bg:#f1f7f9;--bg-2:#eaf2f5;--panel:#fff;--panel-2:#edf4f7;
  --ink:#193843;--muted:#4b6671;--faint:#526d77;
  --green:#176780;--green-2:#105368;--green-soft:rgba(23,103,128,.09);
  --line:#d6e3e8;--line-2:#adc6d0
}
[data-theme="dark"] .view-bots{
  --bg:#0f1b22;--bg-2:#14262f;--panel:#192c36;--panel-2:#203943;
  --ink:#e8f3f7;--muted:#afc7d2;--faint:#a0bbc7;
  --green:#87cbe0;--green-2:#a8dff0;--green-soft:rgba(135,203,224,.1);
  --line:#304c59;--line-2:#4d6f7d
}
.navlink.active[data-nav="base"]{color:#4b5929;background:#e9eddf}
.navlink.active[data-nav="bots"]{color:#105368;background:#e1eff4}
[data-theme="dark"] .navlink.active[data-nav="base"]{color:#d2e4a6;background:#2d3824}
[data-theme="dark"] .navlink.active[data-nav="bots"]{color:#a8dff0;background:#1b3945}
.view-base .page-head,.view-bots .page-head{padding-block:var(--wk-8) var(--wk-5)}
.view-base .page-title,.view-bots .page-title{font-size:var(--wk-title);line-height:1.25;color:var(--ink)}
.view-base .page-sub,.view-bots .page-sub{font-size:var(--wk-base);line-height:1.6;color:var(--muted);max-width:76ch}
.view-base .eyebrow{font-size:var(--wk-xs);color:var(--green-2);margin-bottom:var(--wk-2)}
.view-base .panel,.view-bots .panel{border-radius:10px;box-shadow:none;border-color:var(--line);background:var(--panel)}
.view-base [hidden],.view-bots [hidden]{display:none!important}
.view-base button,.view-bots button{font-family:var(--font)}
.view-base .btn,.view-bots .btn{box-shadow:none;min-height:44px}
.view-base .btn-primary,.view-bots .btn-primary{background:var(--green-2);border-color:var(--green-2);color:#fff}
[data-theme="dark"] .view-base .btn-primary,[data-theme="dark"] .view-bots .btn-primary{color:var(--bg)}
.view-base :is(button,a,input,summary):focus-visible,.view-bots :is(button,a,input,textarea,summary):focus-visible{
  outline:2px solid var(--green);outline-offset:3px
}
.vkw-base-head{display:flex;justify-content:space-between;align-items:center;gap:var(--wk-6)}
.vkw-open-bot{flex:none}
.view-base .base-gate{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,.8fr);
  gap:var(--wk-8);align-items:start;padding-block:var(--wk-6) var(--wk-8)}
.vkw-base-overview{min-width:0;padding:var(--wk-4) 0}
.vkw-base-overview h3{font-size:var(--wk-lg);line-height:1.4;margin-bottom:var(--wk-3)}
.vkw-overview-lead{font-size:var(--wk-base);line-height:1.7;color:var(--muted);max-width:58ch}
.vkw-features{margin-top:var(--wk-6)}
.vkw-features>div{padding-block:var(--wk-4);border-top:1px solid var(--line)}
.vkw-features dt{font-size:var(--wk-base);font-weight:700;margin-bottom:var(--wk-2)}
.vkw-features dd{font-size:var(--wk-sm);line-height:1.7;color:var(--muted);max-width:64ch;margin:0}
.view-base .gate-card{box-sizing:border-box;max-width:none;width:100%;padding:var(--wk-8);
  border-radius:10px;box-shadow:none;background:var(--panel);align-items:flex-start;text-align:left;gap:var(--wk-4)}
.view-base .gate-lock{width:48px;height:48px;border-radius:8px}
.view-base .gate-card h2{font-size:var(--wk-lg);line-height:1.45}
.view-base .gate-card p{font-size:var(--wk-sm);line-height:1.7}
.view-base .gate-card .gate-note{font-size:var(--wk-xs);font-family:var(--font)}
.view-base .gate-demo{font-size:var(--wk-sm);min-height:44px;text-align:left}
.view-base .btn-tg{background:var(--green-2);color:#fff;border-color:var(--green-2);box-shadow:none}
[data-theme="dark"] .view-base .btn-tg{color:var(--bg)}
.view-base .reader-toolbar{gap:var(--wk-4);padding-block:var(--wk-3) var(--wk-4)}
.view-base .rt-left{min-width:0;gap:var(--wk-3)}
.view-base #toggleTree{min-width:116px;min-height:46px;width:auto;height:auto;padding:var(--wk-2) var(--wk-3);
  border-radius:8px;font-size:var(--wk-sm);font-weight:600;white-space:nowrap}
.view-base #toggleTree[aria-expanded="true"]{border-color:var(--green);background:var(--green-soft);color:var(--green-2)}
.view-base .rt-search{max-width:540px;min-width:0;border-radius:8px;min-height:46px;padding:0 var(--wk-3);
  box-sizing:border-box;background:var(--panel);gap:var(--wk-2)}
.view-base .rt-search input{width:100%;min-width:0;font-size:var(--wk-sm);min-height:44px}
.view-base .rt-search input::placeholder{color:var(--muted);opacity:1}
.vkw-clear{flex:none;min-width:36px;min-height:36px;font-size:var(--wk-lg);color:var(--muted);border-radius:6px}
.vkw-clear:hover{background:var(--green-soft);color:var(--ink)}
.view-base .protected-badge{border-radius:6px;padding:var(--wk-2) var(--wk-3);font-size:var(--wk-xs);white-space:nowrap}
.view-base .reader-grid{grid-template-columns:280px minmax(0,1fr);gap:var(--wk-4);
  height:calc(100dvh - 280px);min-height:480px;padding-bottom:var(--wk-6)}
.view-base .reader-grid.tree-hidden{grid-template-columns:minmax(0,1fr)}
.view-base .vault-tree{box-sizing:border-box;min-width:0;padding:var(--wk-3);font-size:var(--wk-sm)}
.view-base .tree-label{font-size:var(--wk-sm);min-height:40px;line-height:1.5;overflow-wrap:anywhere}
.view-base .tree-file{font-size:var(--wk-sm);min-height:44px;line-height:1.5;overflow-wrap:anywhere}
.view-base .tree-caret{font-size:var(--wk-xs)}
.view-base .tree-loading{font-size:var(--wk-sm);color:var(--muted)}
.view-base .note-view{min-width:0;display:flex;flex-direction:column}
.view-base .note-content{height:auto;min-height:0;flex:1;padding:var(--wk-6) var(--wk-8);font-size:var(--wk-base);line-height:1.8}
.view-base .note-content h1{font-size:var(--wk-lg);line-height:1.5}
.view-base .note-content h2{font-size:var(--wk-lg);line-height:1.5;margin-top:var(--wk-6)}
.view-base .note-content h3{font-size:var(--wk-base);line-height:1.5}
.view-base .note-content p,.view-base .note-content li{overflow-wrap:anywhere}
.view-base .note-meta{font-size:var(--wk-xs);line-height:1.6}
.view-base .note-content table{display:block;max-width:100%;overflow-x:auto;font-size:var(--wk-sm)}
.view-base .note-content :is(img,video){max-width:100%;height:auto;object-fit:contain}
.view-base .vbx-navbar{flex:none;box-sizing:border-box;padding:var(--wk-3);margin:0;gap:var(--wk-2);font-size:var(--wk-xs)}
.view-base .vbx-navbtn{min-height:40px;padding:var(--wk-2) var(--wk-3);font-size:var(--wk-xs)}
.view-base .vbx-crumbs{font-size:var(--wk-xs);line-height:1.6;white-space:normal;overflow-wrap:anywhere}
.view-base .vbx-pdf{gap:var(--wk-3);padding:var(--wk-3)}
.view-base .vbx-pdf-name{font-size:var(--wk-sm);white-space:normal;overflow-wrap:anywhere}
.view-base .vbx-pdf-btn{min-height:44px;font-size:var(--wk-sm)}
.view-base .vbx-pdf-msg{font-size:var(--wk-xs)}
.vkw-modebar{padding-bottom:var(--wk-5)}
.view-bots .bot-switch{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--wk-3)}
.view-bots .bot-opt{min-width:0;padding:var(--wk-4);gap:var(--wk-3);min-height:76px;position:relative;background:var(--panel);border-radius:8px}
.view-bots .bot-opt.active{border-color:var(--green);background:var(--green-soft)}
.view-bots .bot-opt>span:last-child{min-width:0}
.view-bots .bot-opt strong{font-size:var(--wk-base);line-height:1.4}
.view-bots .bot-opt em{font-size:var(--wk-xs);line-height:1.55;color:var(--muted);display:block;margin-top:var(--wk-1)}
.view-bots .bot-ic{font-size:var(--wk-lg);flex:none}
.view-bots .chat-layout{grid-template-columns:260px minmax(0,1fr);gap:var(--wk-5);padding-bottom:var(--wk-8)}
.view-bots .chat-side{min-width:0;gap:var(--wk-4);padding:var(--wk-5)}
.view-bots .side-h{font-size:var(--wk-xs);letter-spacing:.04em;line-height:1.5;color:var(--muted)}
.view-bots .bot-card{padding:0;border:0;border-radius:0;background:none}
.view-bots .bot-card-top{gap:var(--wk-2);align-items:flex-start}
.view-bots .bot-card-av{width:32px;height:32px;flex:none;font-size:var(--wk-base)}
.view-bots #botCardName{font-size:var(--wk-xs);line-height:1.6;overflow-wrap:anywhere}
.view-bots .bot-card-stat{font-size:var(--wk-xs);line-height:1.6;color:var(--muted)}
.view-bots .bot-card-desc{font-size:var(--wk-sm);line-height:1.7;color:var(--muted)}
.view-bots .promo-box{background:var(--panel-2);padding:var(--wk-3);border-radius:8px;margin-top:var(--wk-4)}
.view-bots .promo-label,.view-bots .promo-hint,.view-bots .promo-msg{font-size:var(--wk-xs);line-height:1.6}
.view-bots .promo-hint{color:var(--muted);opacity:1}
.view-bots .promo-msg.err{color:#9b2d41}
[data-theme="dark"] .view-bots .promo-msg.err{color:#ffb1c4}
.view-bots .promo-msg.ok{color:var(--green-2)}
.view-bots .promo-row{flex-direction:column;align-items:stretch;gap:var(--wk-2)}
.view-bots .promo-input{min-width:0;width:100%;box-sizing:border-box;min-height:44px;font-size:var(--wk-sm)}
.view-bots .promo-btn{width:100%;min-height:44px;font-size:var(--wk-sm)}
.vkw-bot-help{border-top:1px solid var(--line);padding-top:var(--wk-3)}
.vkw-bot-help summary{font-size:var(--wk-sm);min-height:44px;line-height:1.6;cursor:pointer;color:var(--green-2)}
.vkw-bot-help p{font-size:var(--wk-xs);line-height:1.7;color:var(--muted);margin-top:var(--wk-2)}
.vkw-base-link{min-height:44px;text-align:left;font-size:var(--wk-sm);line-height:1.6;color:var(--green-2);text-decoration:underline;text-underline-offset:3px}
.view-bots .chat-main{min-width:0;height:calc(100dvh - 330px);min-height:460px;max-height:820px;overflow:visible}
.view-bots .chat-active-bar{padding:var(--wk-3) var(--wk-4);gap:var(--wk-2);font-size:var(--wk-xs);line-height:1.6;flex-wrap:wrap;
  background:var(--panel-2);border-bottom:1px solid var(--line);border-radius:10px 10px 0 0}
.view-bots #cabName{font-size:var(--wk-xs);overflow-wrap:anywhere}
.view-bots .chat-limits{display:block;flex:none;font-size:var(--wk-xs);line-height:1.6;color:var(--muted);
  padding:var(--wk-3) var(--wk-4);margin:0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
.view-bots .chat-limits .dot-live{display:none}
.vkw-quick{flex:none;padding:0 var(--wk-4);border-bottom:1px solid var(--line)}
.vkw-quick summary{font-size:var(--wk-sm);line-height:1.6;min-height:44px;display:list-item;align-content:center;
  cursor:pointer;color:var(--green-2);padding-block:var(--wk-2);box-sizing:border-box}
.vkw-quick .chat-info{padding-bottom:var(--wk-3)}
.vkw-quick .chat-info h4{display:none}
.view-bots .suggest-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--wk-2)}
.view-bots .suggest{font-size:var(--wk-xs);min-height:44px;line-height:1.55;padding:var(--wk-2) var(--wk-3);min-width:0}
.view-bots .suggest-cmds{grid-column:1/-1;gap:var(--wk-2);padding-top:var(--wk-3);margin-top:var(--wk-1)}
.view-bots .suggest-cmds-h{font-size:var(--wk-xs);letter-spacing:.04em;color:var(--muted)}
.view-bots .suggest-empty{font-size:var(--wk-sm);line-height:1.6;color:var(--muted)}
.view-bots .chat-log{padding:var(--wk-4);gap:var(--wk-4);min-height:100px}
.view-bots .msg{max-width:94%;min-width:0;gap:var(--wk-2)}
.view-bots .msg-av{width:28px;height:28px;font-size:var(--wk-sm)}
.view-bots .msg-body{font-size:var(--wk-sm);line-height:1.7;min-width:0;overflow-wrap:anywhere;padding:var(--wk-3);border-radius:8px}
.view-bots .msg-user .msg-body{background:var(--green-2);color:#fff;border:1px solid var(--green-2)}
.view-bots .msg-user .msg-av{background:var(--green-2);color:#fff}
[data-theme="dark"] .view-bots .msg-user .msg-body,[data-theme="dark"] .view-bots .msg-user .msg-av{color:var(--bg)}
.view-bots .msg-body .src,.view-bots .msg-route{font-size:var(--wk-xs);line-height:1.65;overflow-wrap:anywhere}
.view-bots .chat-input{gap:var(--wk-2);padding:var(--wk-3);background:var(--panel);align-items:stretch}
.view-bots .chat-input textarea{min-width:0;width:100%;font-size:var(--wk-sm);line-height:1.6;min-height:46px;
  padding:var(--wk-3);box-sizing:border-box;background:var(--bg-2)}
.view-bots .chat-input textarea::placeholder{color:var(--muted);opacity:1}
.view-bots .cmd-trigger{min-width:36px;width:36px;min-height:46px}
.view-bots .send-btn{width:46px;min-height:46px;border-radius:8px}
.view-bots .cmd-menu{max-height:min(280px,40dvh);left:var(--wk-3);right:var(--wk-3);bottom:calc(100% + var(--wk-2));box-shadow:none}
.view-bots .cmd-item{grid-template-columns:auto minmax(0,1fr);font-size:var(--wk-sm);min-height:44px;padding:var(--wk-3)}
.view-bots .cmd-name,.view-bots .cmd-desc,.view-bots .cmd-hint{font-size:var(--wk-xs);line-height:1.6;white-space:normal;overflow-wrap:anywhere}
.view-bots .cmd-hint{grid-column:2}
.vkw-input-hint{flex:none;font-size:var(--wk-xs);line-height:1.6;color:var(--muted);padding:0 var(--wk-4) var(--wk-3);margin:0}
.view-bots .bot-file{min-width:0;flex:1;gap:var(--wk-2);align-items:center}
.view-bots .bot-file-btn{min-width:44px;min-height:46px;font-size:var(--wk-base);display:grid;place-items:center}
.view-bots .bot-file-name{font-size:var(--wk-xs);white-space:normal;overflow-wrap:anywhere;min-width:0}
.view-bots .vkw-file-mode .send-btn{display:none}
.view-home .feature-card[data-nav="base"]{--green:#606e37;--green-2:#4b5929}
.view-home .feature-card[data-nav="bots"]{--green:#176780;--green-2:#105368}
[data-theme="dark"] .view-home .feature-card[data-nav="base"]{--green:#c0d38f;--green-2:#d2e4a6}
[data-theme="dark"] .view-home .feature-card[data-nav="bots"]{--green:#87cbe0;--green-2:#a8dff0}
@media(max-width:900px){
  .view-bots .chat-layout{grid-template-columns:220px minmax(0,1fr)}
  .view-base .base-gate{grid-template-columns:minmax(0,1fr) minmax(300px,1fr);gap:var(--wk-5)}
}
@media(max-width:760px){
  .view-base .page-head,.view-bots .page-head{padding-block:var(--wk-5) var(--wk-4)}
  .view-base .page-sub,.view-bots .page-sub{font-size:var(--wk-sm)}
  .vkw-base-head{align-items:flex-start;gap:var(--wk-3)}
  .view-base .base-gate{grid-template-columns:minmax(0,1fr);padding-top:var(--wk-2);gap:var(--wk-5)}
  .view-base .gate-card{grid-row:1;padding:var(--wk-5)}
  .vkw-base-overview{padding:0}
  .view-base .reader-toolbar{flex-wrap:wrap}
  .view-base .rt-left{width:100%;flex-basis:100%;gap:var(--wk-2)}
  .view-base #toggleTree{min-width:100px;padding-inline:var(--wk-2)}
  .view-base .rt-search{max-width:none;padding-inline:var(--wk-2)}
  .view-base .reader-grid{height:auto;grid-template-columns:minmax(0,1fr);min-height:0}
  .view-base .vault-tree{height:auto;max-height:50dvh}
  .view-base .note-view{height:72dvh;min-height:420px}
  .view-base .note-content{padding:var(--wk-5)}
  .view-base .vbx-navbar{flex-wrap:wrap}
  .view-base .vbx-crumbs{flex-basis:100%;order:2}
  .view-bots .chat-layout{grid-template-columns:minmax(0,1fr);gap:var(--wk-4)}
  .view-bots .chat-main{order:0;height:calc(100svh - 310px);min-height:420px}
  .view-bots .chat-side{order:1}
  .view-bots .bot-opt{padding:var(--wk-3);gap:var(--wk-2);min-height:80px;align-items:flex-start}
  .view-bots .bot-opt strong{font-size:var(--wk-sm)}
  .view-bots .bot-opt em{font-size:var(--wk-xs)}
  .view-bots .bot-opt .bot-ic{display:none}
  .view-bots .chat-log{padding:var(--wk-3)}
  .view-bots .msg{max-width:100%}
  .view-bots .msg-av{display:none}
}
@media(max-width:380px){
  .vkw-base-head{flex-direction:column}
  .view-bots .suggest-list{grid-template-columns:minmax(0,1fr)}
  .view-bots .chat-active-bar{gap:var(--wk-1)}
}
