#mobileFilter{display:none}
@media(max-width:720px){
  html{scroll-padding-top:72px}
  .app,.sample-embedded .app{height:auto;min-height:100dvh}
  .top{overflow:visible;justify-content:space-between;min-height:56px;box-sizing:border-box}
  #mobileBankShortcut{margin-left:auto;min-height:44px}
  .mobile-attention>summary{color:var(--wait);background:var(--wait-bg)}
  .mobile-panel{scroll-margin-top:72px}
  .brand{position:static;box-shadow:none;padding:0}
  #mobileMenu>summary{min-height:44px;display:flex;align-items:center;cursor:pointer;padding:0 14px;border:1px solid var(--line);border-radius:8px}
  .mobile-menu-items{position:absolute;top:100%;left:10px;right:10px;max-height:75dvh;overflow:auto;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px;background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow)}
  .mobile-menu-items .who{grid-column:1/-1;flex-wrap:wrap}
  .mobile-menu-items .btn{white-space:normal;min-width:0;min-height:44px}
  .notice{position:static;display:block;overflow-wrap:normal;line-height:1.5;padding:12px}
  .notice.gone{display:none}
  .notice .btn{display:inline-block;white-space:normal;margin:6px 0;min-height:44px}
  .notice-item+.notice-item{border-top:1px solid var(--wait-line);margin-top:8px;padding-top:8px}
  .cols,.cols.audit-tucked,.sample-embedded .cols{display:block;overflow:visible}
  .pane.left,.cols.mobile-bank-only .pane.left{max-height:none;min-height:0;overflow:visible;border:0}
  .pane.mid{min-height:0;scroll-margin-top:72px}
  .filters,.rcap{position:static}
  #mobileFilter{display:none}
  .pane.right,.pane.right.is-tucked,.sample-embedded .pane.right{position:static;transform:none;width:auto;height:auto;max-height:none;overflow:visible;border:0;box-shadow:none;padding:0 10px 24px}
  .audit-drawer-toggle{display:none}
  .mobile-panel{min-width:0;border:1px solid var(--line);border-radius:10px;background:var(--surface);overflow:hidden}
  .mobile-panel>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:12px 14px;box-sizing:border-box;font-size:15px;font-weight:600;cursor:pointer;overflow-wrap:anywhere}
  .mobile-panel>summary::-webkit-details-marker{display:none}
  .mobile-panel>summary::after{content:'+';font-size:22px;font-weight:400;color:var(--accent);flex:none}
  .mobile-panel[open]>summary{border-bottom:1px solid var(--line)}
  .mobile-panel[open]>summary::after{content:'−'}
  summary:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
  .app>.mobile-panel,.cols>.mobile-panel{margin:10px}
  .mobile-panel[hidden]{display:none}
  .mobile-panel>.card,.mobile-panel>.facts{border:0;border-radius:0}
  .mobile-panel .section-toggle{display:none}
  .mobile-panel .section-content[hidden]{display:block}
  .mobile-panel .test-panel-section.is-collapsed .tw tbody,.mobile-panel .test-panel-section.is-collapsed .panel-history{display:block}
  .mid-in{gap:12px;padding:4px 10px 16px}
  .sample-lower-sections{gap:12px}
  .hdr h1{font-size:22px}
  .hdr .right{display:flex;flex-wrap:wrap;gap:8px}
  .hdr .btn{min-height:44px}
  .facts{grid-template-columns:repeat(2,minmax(0,1fr))}
  .fact{min-width:0;grid-column:auto!important;padding:12px}
  .fact .v{overflow-wrap:anywhere;font-size:14px}
  .card>.cap{flex-wrap:wrap;gap:8px}
  .card>.cap .btn{min-height:44px;white-space:normal}
  .track{display:flex;flex-direction:column;gap:12px}
  .seg{display:grid;grid-template-columns:24px 1fr;align-items:center;gap:10px}
  .seg .t{white-space:normal}
  .railfoot{flex-wrap:wrap;gap:8px;padding:14px 0}
  .railfoot .big{font-size:17px}
  .gates,.two{grid-template-columns:minmax(0,1fr)}
  .audit-section+.mobile-panel,.pane.right>.mobile-panel+.mobile-panel{margin-top:12px}
  .rows .row{min-width:0}
  .row .lot,.hdr,.hdr .sub{overflow-wrap:anywhere}
  .sample-embedded .cols>[data-mobile-key="bank"]{display:none}
}

/* Always-available search; controls stay in one collapsed filter dropdown. */
@media(max-width:720px){
  #mobileSearchDock{position:sticky;top:56px;z-index:19;padding:7px 10px 9px;background:var(--surface);border-bottom:1px solid var(--line)}
  #mobileSearchInput{min-height:44px;font-size:16px;background:var(--bg)}
  .pane.left #q{display:none}
  .mobile-panel>.sample-info-card>.cap{display:none}
  .mobile-panel{scroll-margin-top:116px}
  .pane.mid{scroll-margin-top:116px}
  .mobile-panel>summary{justify-content:flex-start;gap:9px}
  .mobile-panel>summary::after{margin-left:auto}
  .mobile-panel-title{min-width:0;flex:1;overflow-wrap:anywhere}
  .mobile-status{flex:0 0 auto;border:1px solid var(--line);border-radius:20px;padding:4px 8px;font:600 11px/1.2 var(--mono);background:var(--surface-2);color:var(--ink-2);white-space:nowrap}
  .mobile-status-wait{background:var(--wait-bg);border-color:var(--wait-line);color:var(--wait)}
  .mobile-status-fail{background:var(--fail-bg);border-color:var(--fail-line);color:var(--fail)}
  .mobile-status-pass{background:var(--pass-bg);border-color:var(--pass-line);color:var(--pass)}
  .mobile-status-info{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}
  .mobile-mini-progress{display:flex;align-items:center;gap:3px;flex:0 0 auto;min-width:65px;width:82px}
  .mobile-mini-segment{height:6px;min-width:0;flex:1;border-radius:2px;background:var(--line-strong)}
  .mobile-mini-segment.done{background:#2B76C8}
  .mobile-mini-segment.current{background:#2B76C8;box-shadow:0 0 0 2px rgba(43,118,200,.18)}
  .mobile-panel.mobile-attention>summary{background:var(--wait-bg);color:var(--wait)}
  .mobile-panel.mobile-attention:has(>.alert:not(.warn))>summary{background:var(--fail-bg);color:var(--fail)}
  .mobile-panel.mobile-admin-actions{display:none}
  html[data-user-role="admin"] .mobile-panel.mobile-admin-actions{display:block}
  .mobile-panel .sample-info-card>.in{padding:12px}
}

/* v2: One sticky search + filter region; results appear on focus, not in a tab. */
@media(max-width:720px){
  /* clip avoids an implicit body scroll container that breaks position:sticky */
  html,body{overflow-x:clip}
  body{overflow-y:visible}
  .app>.top{position:sticky;top:0;z-index:44;background:var(--surface)}
  #mobileSearchDock{position:sticky;top:var(--lt-mobile-top-height,56px);z-index:43;padding:7px 10px 6px;box-shadow:0 2px 8px rgba(12,25,19,.07)}
  #mobileSearchDock>.bank-filter-bar{margin-top:5px}
  #mobileSearchDock>.load-status{min-height:0;padding:3px 3px 0;line-height:1.2}
  .pane.left .filters{display:none}
  .cols .pane.left,.cols.mobile-bank-only .pane.left{position:fixed;top:calc(var(--lt-mobile-top-height,56px) + var(--lt-mobile-search-height,106px));left:0;right:0;width:100%;max-height:min(58dvh,600px);overflow:auto;z-index:42;background:var(--surface);border:1px solid var(--line-strong);border-radius:0 0 12px 12px;box-shadow:0 10px 26px rgba(12,25,19,.16);display:none}
  .cols.mobile-bank-open .pane.left,.cols.mobile-bank-only.mobile-bank-open .pane.left{display:block}
  .cols .pane.left .rows{width:100%}
  #mobileBankShortcut[aria-expanded="true"]{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-ink)}
  .mobile-panel[open]{overflow:visible}
  .mobile-panel[open]>summary{position:sticky;top:calc(var(--lt-mobile-top-height,56px) + var(--lt-mobile-search-height,106px));z-index:24;background:var(--surface);border-radius:9px 9px 0 0;box-shadow:0 2px 9px rgba(12,25,19,.08)}
  .mobile-panel.mobile-attention[open]>summary{background:var(--wait-bg)}
  .mobile-panel.mobile-attention[open]:has(>.alert:not(.warn))>summary{background:var(--fail-bg)}
  .mobile-panel{scroll-margin-top:calc(var(--lt-mobile-top-height,56px) + var(--lt-mobile-search-height,106px) + 6px)}
  .pane.mid{scroll-margin-top:calc(var(--lt-mobile-top-height,56px) + var(--lt-mobile-search-height,106px) + 6px)}
  .mobile-notice-flag{font-size:14px;background:var(--wait-bg);color:var(--wait);border-color:var(--wait-line);font-weight:700}
  html:not([data-user-role="admin"]) .hdr>.right{display:none!important}
  .sample-masthead{width:100%;gap:9px}
  .sample-masthead>h1{font-size:clamp(23px,6.5vw,29px)}
  .sample-masthead-facts{gap:6px}
  .sample-masthead-fact{min-height:40px;padding:6px 9px}
  .sample-masthead-fact>strong{font-size:13px}
  .merged-investigation-activity .rcap{display:flex}
  .merged-investigation-activity .tl{padding-bottom:12px}
}

/* v3: Make the Sample Bank a true, visible home screen on all viewports. */
.brand{color:inherit;text-decoration:none;cursor:pointer}
.brand:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.bank-help{color:var(--ink-3);font-size:11px;line-height:1.4}
@media(min-width:721px){
 .cols.bank-home:not(.sample-desk-open){grid-template-columns:minmax(0,1fr)!important;grid-template-rows:1fr}
 .cols.bank-home:not(.sample-desk-open)>.pane.left{width:100%;grid-column:1;overflow:auto;border:0}
 .cols.bank-home:not(.sample-desk-open)>.pane.mid,
 .cols.bank-home:not(.sample-desk-open)>.pane.right,
 .cols.bank-home:not(.sample-desk-open)>.audit-drawer-toggle{display:none}
 .cols.bank-home:not(.sample-desk-open) #rows{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));align-content:start}
 .cols.bank-home:not(.sample-desk-open) #rows>.sample-select-row{border-right:1px solid var(--line);min-width:0}
 .cols.bank-home:not(.sample-desk-open) .filters{display:grid;grid-template-columns:minmax(240px,2fr) minmax(320px,2fr);gap:9px 18px;align-items:center;padding:14px clamp(15px,3vw,38px)}
 .cols.bank-home:not(.sample-desk-open) .filters #q{grid-column:1}
 .cols.bank-home:not(.sample-desk-open) .filters .bank-filter-bar{grid-column:2}
 .cols.bank-home:not(.sample-desk-open) .filters #batchLoadStatus{grid-column:1}
 .cols.bank-home:not(.sample-desk-open) .filters .bank-help{grid-column:2}
 .cols.bank-home.sample-desk-open{grid-template-columns:292px minmax(0,1fr) 320px!important}
 .cols.bank-home.sample-desk-open>.pane.left{display:flex;grid-column:1}
}
@media(max-width:720px){
 .cols.bank-home:not(.sample-desk-open)>.pane.left,
 .cols.bank-home.mobile-bank-open:not(.sample-desk-open)>.pane.left{
    display:block!important;position:static;top:auto;left:auto;right:auto;width:100%;max-height:none;
    border:0;border-radius:0;box-shadow:none;overflow:visible;z-index:auto;
 }
 .cols.bank-home.sample-desk-open>.pane.left{display:none!important}
 .cols.bank-home:not(.sample-desk-open)>.pane.mid,
 .cols.bank-home:not(.sample-desk-open)>.pane.right,
 .cols.bank-home:not(.sample-desk-open)>.audit-drawer-toggle{display:none}
 .cols.bank-home:not(.sample-desk-open) #rows{padding-bottom:calc(30px + env(safe-area-inset-bottom))}
 .cols.bank-home:not(.sample-desk-open) #rows>.empty{min-height:100px}
 /* Both options live side by side in exactly one control row on phones. */
 #mobileSearchDock>.bank-filter-bar{grid-template-columns:43% 57%;width:100%}
 #mobileSearchDock .bank-filter-control{padding:5px 6px;gap:4px;font-size:10px}
 #mobileSearchDock .bank-filter-control>select{height:44px;min-height:44px;font-size:14px;padding:5px 17px 5px 5px}
 .bank-help{display:none}
 .cols.bank-home:not(.sample-desk-open)>.pane.left .bank-help{display:block;padding:10px 14px;background:var(--surface-2)}
 /* Search + filters are in the sticky dock, and the hint is below the bank. */
 #mobileSearchDock>.bank-filter-bar{min-width:0}
 #sampleTabResume{min-height:40px;white-space:nowrap;padding:7px 9px}
}

@media(max-width:720px){.rows .row{touch-action:pan-y;-webkit-user-select:none;user-select:none}.cols.bank-home:not(.sample-desk-open)>.pane.left .bank-help{border-bottom:1px solid var(--line)}}

/* Search is a Sample Bank tool, not global navigation. A hidden dock must not
   reserve a grid row, sticky offset or overlap sample-tab iframes. */
#mobileSearchDock[hidden]{display:none!important}
@media(max-width:720px){
  .sample-embedded #mobileSearchDock,
  .sample-embedded #mobileBankShortcut,
  .sample-embedded #mobileMenu{display:none!important}
  /* When viewing tabs the bank panel is normally hidden. Samples explicitly
     reopens it as an overlay, even while the multi-sample desk is active. */
  .cols.sample-desk-open.mobile-bank-open>.pane.left{
    display:block!important;position:fixed;top:calc(var(--lt-mobile-top-height,56px) + var(--lt-mobile-search-height,106px));
    left:0;right:0;width:100%;max-height:min(58dvh,600px);overflow:auto;
    z-index:42;background:var(--surface);border:1px solid var(--line-strong);
    border-radius:0 0 12px 12px;box-shadow:0 10px 26px rgba(12,25,19,.16)
  }
}

/* On desktop, show the priority queues across the full bank header, not as a
   separate filtering tier or an overlapping auto-placed grid cell. */
@media(min-width:721px){
  .cols.bank-home:not(.sample-desk-open) .filters #q{grid-column:1;grid-row:1}
  .cols.bank-home:not(.sample-desk-open) .filters .bank-filter-bar{grid-column:2;grid-row:1}
  .cols.bank-home:not(.sample-desk-open) .filters #bankQuickQueues{grid-column:1/-1;grid-row:2}
  .cols.bank-home:not(.sample-desk-open) .filters #batchLoadStatus{grid-column:1;grid-row:3}
  .cols.bank-home:not(.sample-desk-open) .filters #bankHelp{grid-column:2;grid-row:3}
}
