/* Asfoura source-search UI. Existing navigation is restored when master-disabled. */
:root{--asf-height:min(46dvh,410px);--asf-nav-h:calc(72px + env(safe-area-inset-bottom,0px))}
.bottom-nav.asfoura-nav{display:flex;position:fixed;inset-inline:0;bottom:0;width:min(760px,100%);margin:auto;z-index:65;align-items:center;justify-content:center;background:#fff;border:1px solid #c7dedb;border-radius:16px 16px 0 0;padding:3px 0 calc(3px + env(safe-area-inset-bottom,0px));min-height:var(--asf-nav-h);box-shadow:0 -4px 22px #103f3c12;gap:0}
.asf-navside{display:flex;align-items:stretch;flex:1;min-width:0;gap:0}.bottom-nav.asfoura-nav .asf-navside>button{flex:1;min-width:44px;min-height:58px;max-width:none;border:1px solid #d3e4e1;border-radius:9px;background:#f7fbfa;padding:4px 1px;margin:0;color:#4a6e6b;display:flex;flex-direction:column;gap:1px;align-items:center;justify-content:center;font-size:10px;line-height:1.25;overflow-wrap:anywhere;font-family:inherit;white-space:normal}
.bottom-nav.asfoura-nav .asf-navside>button i{font-size:15px;font-style:normal;line-height:18px}.bottom-nav.asfoura-nav .asf-navside>button.active{border-color:#0b837a;color:#07685f;background:#e2f4ef;font-weight:800}.bottom-nav.asfoura-nav .asf-navside>button span{max-width:100%}
.bottom-nav.asfoura-nav .asf-center{position:relative;flex:0 0 56px;width:56px;height:56px;min-height:56px;min-width:56px;border-radius:50%;border:2px solid #087f76;background:white;display:grid;place-items:center;padding:0;box-shadow:0 5px 15px #0c655739;transform:translateY(-12px);color:#087f76}.asf-zzz{position:absolute;font-size:9px;inset-inline-end:2px;top:3px;line-height:10px;pointer-events:none}.asf-resting svg{opacity:.8}
.asfoura-open{overflow:hidden}.asfoura-open #app{height:calc(100dvh - var(--asf-height) - var(--asf-nav-h));overflow:auto;overscroll-behavior:contain}.asfoura-open .app{min-height:100%}.asfoura-open .workspace{min-height:0}.asfoura-open .main{padding-bottom:22px}
#asfoura-panel{position:fixed;inset-inline:0;bottom:var(--asf-nav-h);z-index:64;width:min(760px,100%);height:var(--asf-height);margin:auto;display:flex;flex-direction:column;min-height:0;background:white;border:1px solid #afd5ce;border-top:3px solid #0f847a;border-radius:17px 17px 0 0;box-shadow:0 -9px 28px #163e3a20;color:#244d48;font-size:13px;line-height:1.65;box-sizing:border-box}
.asf-head{display:flex;gap:8px;align-items:center;justify-content:space-between;padding:7px 11px;border-bottom:1px solid #deebe8;flex:0 0 auto}.asf-head strong{display:flex;align-items:center;gap:5px;font-size:16px}.asf-head strong svg{width:21px;height:21px}.asf-head>div{display:flex;gap:4px}#asfoura-panel button{font-family:inherit;font-size:11px;border:1px solid #bddbd5;border-radius:9px;background:#f0f8f5;color:#08675d;min-height:34px;padding:4px 9px;cursor:pointer}#asfoura-panel button:disabled{opacity:.55;cursor:default}.asf-mode{font-size:11px;color:#5e685a;background:#fff9e9;padding:4px 11px;border-bottom:1px solid #eee4c9;flex:0 0 auto}.asf-context{display:flex;gap:6px;align-items:center;justify-content:space-between;padding:5px 10px;flex:0 0 auto}.asf-context span{font-size:10px;color:#718783}
#asfoura-log{overflow:auto;overscroll-behavior:contain;flex:1;min-height:0;padding:7px 11px;scroll-behavior:auto}.asf-empty{color:#627d77;margin:5px;font-size:12px}.asf-question{width:fit-content;max-width:92%;margin:5px 0 7px auto;padding:8px 11px;border-radius:13px 13px 3px 13px;background:#0f7c72;color:white;white-space:pre-wrap;overflow-wrap:anywhere}.asf-answer{margin:5px auto 13px 0;max-width:100%;border:1px solid #d4e6df;background:#f3f9f6;border-radius:12px;padding:9px 10px;font-size:12px;overflow-wrap:anywhere}.asf-answer>p{margin:0 0 8px;font-size:11px;color:#657e73}.asf-result{background:white;border:1px solid #d7e6e1;border-radius:9px;padding:9px;margin:9px 0}.asf-result>strong{display:block;font-size:13px}.asf-result summary{font-weight:700;cursor:pointer;padding:5px 0}.asf-citation{color:#08776c;font-size:10px;margin:4px 0}.asf-quoted{white-space:pre-wrap;line-height:1.85;font-size:12px;margin:7px 0}.asf-result small{font-size:10px;color:#7b8882}.asf-source-note{border-inline-start:3px solid #c69a36;padding-inline-start:7px;background:#fff8e6;font-size:11px}.asf-source-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:7px}
#asfoura-form{display:flex;gap:6px;padding:7px 10px 9px;border-top:1px solid #d5e8e1;flex:0 0 auto}#asfoura-form input{flex:1;min-width:0;border:1px solid #bdd7cf;border-radius:11px;padding:9px 11px;background:#fff;font:inherit;font-size:12px}#asfoura-form>button{min-width:49px;background:#087b70;color:white;min-height:42px}.asf-settings{margin-top:17px}.asf-settings label{display:flex;align-items:center;gap:9px;font-size:13px;margin:12px 0}.asf-settings input{width:18px;height:18px;min-width:18px;accent-color:#0f7c72}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(min-width:761px){body.asfoura-enabled .main{padding-bottom:110px}.asfoura-open #app{width:100%}}
@media(max-width:359px){.bottom-nav.asfoura-nav .asf-navside>button{font-size:9px}.asf-head{padding-inline:7px}.asf-head strong{font-size:14px}.asf-head>div{gap:2px}#asfoura-panel button{padding-inline:7px}.asf-context{gap:3px;padding-inline:7px}.asf-context span{font-size:9px;max-width:110px}.asf-mode{font-size:10px}}
@media(prefers-reduced-motion:reduce){#asfoura-panel *{scroll-behavior:auto!important;transition:none!important}}

.asf-page-warnings{font-size:12px;line-height:1.7;background:#fff8e5;padding:8px;border-radius:8px}.asf-page-warnings li{margin-block:8px;overflow-wrap:anywhere}

#asfoura-source{min-width:0;max-width:58%;font:inherit;font-size:11px;padding:5px;border:1px solid #bddbd5;border-radius:8px;background:white;color:#185e55}.asf-context>button{max-width:42%;overflow-wrap:anywhere}#bundled-source-reader strong{display:block;overflow-wrap:anywhere;font-size:13px;margin-bottom:10px}#bundled-source-reader .btn{margin:4px}#bundled-source-reader .pdf-page-host{width:100%;overflow:auto}
