/* 1.10.0 — the phone's bottom bar and «More» sheet (as MJO), shared by every page: base.html and the generated lab / case pages.
   Shown on screens up to 900px, and always inside the iPhone / Android app (html.inapp). */
.app-tb,.navsheet:not([open]){display:none}
.app-tb svg,.ns-grid svg{width:23px;height:23px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:900px){.app-tb{display:flex}}
html.inapp .app-tb{display:flex}
.app-tb{position:fixed;inset-inline:0;bottom:0;z-index:49;align-items:flex-end;background:#024724f7;-webkit-backdrop-filter:saturate(1.4) blur(10px);backdrop-filter:saturate(1.4) blur(10px);
  padding:6px 6px calc(6px + env(safe-area-inset-bottom));box-shadow:0 -6px 20px #0003;border-top:1px solid #C9A24A55;font-family:'IBM Plex Sans Arabic','IBM Plex Sans',system-ui,sans-serif}
.app-tb a,.app-tb button{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;gap:3px;color:#cfe3d7;text-decoration:none;font:600 11.5px/1.2 inherit;
  background:none;border:0;padding:6px 2px;border-radius:12px;cursor:pointer;position:relative;-webkit-tap-highlight-color:transparent;transition:color .15s,transform .15s}
.app-tb a:active,.app-tb button:active{transform:scale(.94)}
.app-tb span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.app-tb [aria-current=page]{color:#fff}
.app-tb [aria-current=page]::before{content:"";position:absolute;top:-6px;inset-inline:28%;height:3px;border-radius:0 0 3px 3px;background:#C9A24A}
/* Meem, raised in the middle like MJO's avatar: a gold-ringed disc that breathes */
.app-tb .tb-meem{justify-content:flex-end;overflow:visible}
.app-tb .tb-halo{position:absolute;top:-34px;left:50%;width:62px;height:62px;margin-left:-31px;border-radius:50%;background:radial-gradient(circle at 50% 40%,#0A8F55,#024724 70%);
  border:2.5px solid #C9A24A;box-shadow:0 6px 18px #0006,0 0 0 4px #02472455;animation:tbbreathe 3s ease-in-out infinite}
.app-tb .tb-meem svg.meem-bot{position:absolute;top:-30px;left:0;right:0;margin:0 auto;width:46px!important;height:53px!important;stroke:none;z-index:1}
.app-tb .tb-meem span:last-child{margin-top:32px;font-weight:700;color:#F3D98C}
@keyframes tbbreathe{0%,100%{box-shadow:0 6px 18px #0006,0 0 0 3px #5FE3A133}50%{box-shadow:0 6px 18px #0006,0 0 0 7px #5FE3A11a}}
@media(max-width:900px){body{padding-bottom:calc(76px + env(safe-area-inset-bottom))}#mf-btn{display:none!important}#mf{bottom:calc(80px + env(safe-area-inset-bottom))!important;max-height:calc(100dvh - 120px)!important}}
html.inapp body{padding-bottom:calc(76px + env(safe-area-inset-bottom))}html.inapp #mf-btn{display:none!important}html.inapp #mf{bottom:calc(80px + env(safe-area-inset-bottom))!important;max-height:calc(100dvh - 120px)!important}
/* «More» sheet */
.navsheet{border:0;padding:0;margin:auto auto 0;width:100%;max-width:560px;max-height:86dvh;border-radius:22px 22px 0 0;background:var(--pn,#fff);color:var(--ink,#17201b);box-shadow:0 -10px 40px #0004;font-family:'IBM Plex Sans Arabic','IBM Plex Sans',system-ui,sans-serif}
.navsheet::backdrop{background:#02150b73}.navsheet[open]{display:flex;flex-direction:column;animation:ns-up .2s ease-out}@keyframes ns-up{from{transform:translateY(30px);opacity:.6}to{transform:none;opacity:1}}
.ns-head{display:flex;align-items:center;gap:10px;padding:16px 18px 8px}.ns-head b{font-size:17px}.ns-head span{color:var(--mut,#5d675f);font-size:13px}
.ns-x{margin-inline-start:auto;width:38px;height:38px;border-radius:50%;border:1px solid var(--ln,#e4dcc6);background:var(--pn,#fff);color:var(--ink,#17201b);font-size:15px;cursor:pointer}
.ns-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:8px 14px 12px;overflow-y:auto}
.ns-grid a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:84px;border:1px solid var(--ln,#e4dcc6);border-radius:16px;text-decoration:none;color:var(--ink,#17201b);font-size:13px;font-weight:600;text-align:center;padding:8px 4px}
.ns-grid svg{color:var(--e,#024724)}.ns-grid a[aria-current=page]{border-color:#0A8F55;background:#E8F3EC;color:#024724}
.ns-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 18px calc(14px + env(safe-area-inset-bottom));border-top:1px solid var(--ln,#e4dcc6);font-size:14px}.ns-foot a{color:var(--ink,#17201b);text-decoration:none}.ns-foot .out{color:#B42318}
/* back button (as MJO): the previous page inside the app when there is one, the page's parent otherwise */
.app-back{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-width:40px;height:40px;padding:0 12px;border-radius:99px;border:1px solid #d9cfb3;background:var(--pn,#fff);color:#024724!important;text-decoration:none!important;font:600 14px/1 'IBM Plex Sans Arabic','IBM Plex Sans',system-ui,sans-serif;flex:none}
@media print{.app-tb,.navsheet{display:none!important}}
@media(max-width:900px){main.wrap>p>.backb{display:none}}
/* phones: wide tables scroll sideways instead of squeezing every word onto its own line */
@media(max-width:760px){main table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}main table th,main table td{white-space:nowrap;max-width:62vw;overflow:hidden;text-overflow:ellipsis}}
