body.ksm-ready .site-header .header-inner>nav{display:none!important}
body.ksm-ready .site-header .header-inner{position:relative;padding-bottom:20px!important}
#ksm-open{border:1px solid var(--line,#65706a);background:transparent;color:inherit;border-radius:8px;padding:9px 14px;min-height:44px;font-size:13px;cursor:pointer;margin:12px 0 0 auto}
#ksm-open[hidden]{display:none}
#ksm-dialog{position:fixed;inset:0 0 0 auto;margin:0;width:min(360px,90vw);height:100%;height:100dvh;max-width:none;max-height:none;border:0;border-left:1px solid var(--line,#dce1da);padding:0;background:var(--paper,#f7f8f5);color:var(--ink,#171a19);overflow-y:auto;overscroll-behavior:contain;box-shadow:-8px 0 32px #0003}
#ksm-dialog[open]{display:flex;flex-direction:column}
#ksm-dialog::backdrop{background:#0008}
#ksm-dialog .ksm-top{display:flex;align-items:center;justify-content:space-between;padding:18px 22px;border-bottom:1px solid var(--line,#dce1da)}
#ksm-title{font-size:18px;margin:0}
#ksm-close{width:44px;height:44px;border:0;background:transparent;color:inherit;font-size:30px;cursor:pointer}
#ksm-dialog .ksm-content{padding:24px 22px}
.ksm-search label{display:block;font-size:13px;margin-bottom:10px}
.ksm-search>div{display:flex;gap:8px}
#ksm-query{min-width:0;width:100%;border:1px solid var(--line,#dce1da);border-radius:6px;background:transparent;color:inherit;padding:10px;font-size:16px}
.ksm-search button{flex-shrink:0;border:0;border-radius:6px;background:var(--lime,#d3f48c);color:#172014;padding:8px 13px;cursor:pointer}
#ksm-dialog .ksm-links{display:flex;flex-direction:column;margin-top:24px}
#ksm-dialog .ksm-links a{padding:13px 2px;min-height:44px;border-bottom:1px solid var(--line,#dce1da);font-size:15px;color:inherit}
#ksm-dialog .ksm-bottom{margin-top:auto;padding:20px 22px max(22px,env(safe-area-inset-bottom));display:flex;flex-wrap:wrap;gap:8px 16px;border-top:1px solid var(--line,#dce1da)}
#ksm-dialog .ksm-bottom a{font-size:11px;line-height:1.7;color:inherit;padding:5px 0;text-decoration:underline;text-underline-offset:3px}
#ksm-dialog a:focus-visible,#ksm-dialog button:focus-visible,#ksm-open:focus-visible{outline:2px solid currentColor;outline-offset:3px}
/* v1.1: left edge handle and isolated high-contrast drawer palette. */
body #ksm-open{position:fixed!important;left:-5px!important;right:auto!important;top:clamp(130px,26vh,240px)!important;margin:0!important;z-index:99990;min-width:48px;min-height:80px;padding:12px 10px 12px 15px!important;border-radius:0 12px 12px 0!important;background:#d3f48c!important;color:#172014!important;border:1px solid #59733a!important;box-shadow:2px 3px 12px #0003;writing-mode:vertical-rl;font-size:12px!important;font-weight:700}
body #ksm-dialog{inset:0 auto 0 0!important;background:#f8fafc!important;color:#172333!important;border-left:0;border-right:1px solid #ccd4df;box-shadow:8px 0 32px #0003;width:min(380px,88vw)}
body #ksm-dialog h2,body #ksm-dialog h3,body #ksm-dialog label,body #ksm-dialog li{color:#172333!important}
body #ksm-dialog a{color:#164c7e!important;opacity:1!important}
body #ksm-dialog #ksm-close{background:#e5ebf2!important;color:#172333!important;border-radius:8px}
body #ksm-dialog #ksm-query{background:#fff!important;color:#172333!important;border:1px solid #64748b!important;opacity:1!important}
body #ksm-dialog #ksm-query::placeholder{color:#526174!important;opacity:1!important}
body #ksm-dialog .ksm-search button{background:#254b35!important;color:#fff!important}
body #ksm-dialog .ksm-auth{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:18px}
body #ksm-dialog .ksm-auth a,body #ksm-dialog .ksm-auth span{display:flex;align-items:center;justify-content:center;min-height:44px;padding:9px 4px;border:1px solid #8194a8;border-radius:7px;font-size:13px;background:#eef3f7!important;color:#173f66!important}
body #ksm-dialog .ksm-auth span{background:#e5e7eb!important;color:#4b5563!important;border-style:dashed}
body #ksm-dialog .ksm-links{margin-top:18px}
body #ksm-dialog .ksm-top,body #ksm-dialog .ksm-links a,body #ksm-dialog .ksm-bottom{border-color:#ccd4df!important}
body #ksm-dialog .ksm-recent h3{font-size:15px;margin:24px 0 10px}
body #ksm-dialog .ksm-recent ul{list-style:none;padding:0;margin:0}
body #ksm-dialog .ksm-recent li{border-bottom:1px solid #ccd4df;padding:10px 0;font-size:13px;line-height:1.7}
body #ksm-dialog .ksm-recent a{display:block;overflow-wrap:anywhere}
body #ksm-dialog .ksm-bottom{background:#edf1f5!important}
body #ksm-dialog[open]{animation:ksm-enter .18s ease-out}
@keyframes ksm-enter{from{transform:translateX(-100%)}to{transform:translateX(0)}}
@media(prefers-reduced-motion:reduce){body #ksm-dialog[open]{animation:none}}

/* v1.2: compact icon at the top-left of the viewport. */
body #ksm-open{top:calc(env(safe-area-inset-top,0px) + 12px)!important;left:-4px!important;width:48px!important;height:44px!important;min-width:48px!important;min-height:44px!important;padding:0 0 0 4px!important;writing-mode:horizontal-tb!important;display:flex;align-items:center;justify-content:center;font-size:23px!important;line-height:1!important;border-radius:0 10px 10px 0!important;}
body #ksm-open[hidden]{display:none!important}
body.admin-bar #ksm-open{top:calc(env(safe-area-inset-top,0px) + 44px)!important}
@media(max-width:782px){body.admin-bar #ksm-open{top:calc(env(safe-area-inset-top,0px) + 58px)!important}}

/* v1.3: header top-right, plain three-line icon. */
body.ksm-ready .site-header .header-inner{position:relative!important;}
body #ksm-open,body.admin-bar #ksm-open{position:absolute!important;top:12px!important;right:12px!important;left:auto!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;margin:0!important;padding:8px!important;background:transparent!important;color:inherit!important;border:0!important;border-radius:4px!important;box-shadow:none!important;writing-mode:horizontal-tb!important;}
body #ksm-open .ksm-icon{display:flex!important;flex-direction:column;justify-content:space-between;width:26px;height:20px;}
body #ksm-open .ksm-icon i{display:block!important;background:currentColor!important;width:26px;height:2px;border:0;}
body #ksm-open:hover{opacity:.75}
body #ksm-dialog{inset:0 0 0 auto!important;border-right:0!important;border-left:1px solid #ccd4df!important;box-shadow:-8px 0 32px #0003!important;}
@keyframes ksm-enter{from{transform:translateX(100%)}to{transform:translateX(0)}}
